From patchwork Thu Jul 15 15:39:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 1505770 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GQdqt3Cvjz9sWq for ; Fri, 16 Jul 2021 01:40:42 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0A2E782BEE; Thu, 15 Jul 2021 17:40:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id A2B3182000; Thu, 15 Jul 2021 17:40:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 60B8281FC6 for ; Thu, 15 Jul 2021 17:40:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sebastian.reichel@collabora.com Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id EE5851F42028 Received: by jupiter.universe (Postfix, from userid 1000) id D1E124800C6; Thu, 15 Jul 2021 17:40:04 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel , u-boot@lists.denx.de Cc: Simon Glass , Tom Rini Subject: [PATCHv2 0/2] Introduce mcp230xx support Date: Thu, 15 Jul 2021 17:39:58 +0200 Message-Id: <20210715154000.92119-1-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi, Add driver for mcp230xx devices, which are quite common. Changes since PATCHv1: * add new patch adding dm_i2c_reg_clrset() as suggested by Simon Glass * Use | instead of + to build device register (resulting number is the same) * Properly handle GPIOD_IS_OUT_ACTIVE flag * Use bool for local variables in mcp230xx_set_flags() * Add Reviewed-by from Simon Glass -- Sebastian Sebastian Reichel (2): i2c: add dm_i2c_reg_clrset gpio: mcp230xx: Introduce new driver drivers/gpio/Kconfig | 10 ++ drivers/gpio/Makefile | 1 + drivers/gpio/mcp230xx_gpio.c | 235 +++++++++++++++++++++++++++++++++++ drivers/i2c/i2c-uclass.c | 15 +++ include/i2c.h | 14 +++ test/dm/i2c.c | 29 +++++ 6 files changed, 304 insertions(+) create mode 100644 drivers/gpio/mcp230xx_gpio.c