From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 46B9DC4332F for ; Thu, 10 Nov 2022 10:14:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LA5v7+6bUI+06jt4ibp/coaSSD+kHBEJFuN0tee9yEg=; b=xIckisGpm8kP9i z6/zCnL3qEmkwHwntBBKKM3zwsF1D7a2/f/Su2VtyaJcgOq6PrYxhIZyBdlUyqah4B+nCK9pYsHtB iZPxMHpOzPQPYSUBeGcwMeSw0pV1jEF4EH0ctwsf3DPsHAEjpxZaQM3Jt7PVNeJS72lcNN5qwdAIt u69EEKd34Y8dlcnCss4O3iB2y9imBBuBKtiLS65crtSlIgqU7d7wPyhHAg8MJiMzPJUKFFyb1njjF ge+MQQjQdvTIfAU+AfqDcfO36bAz0CSzp9Jzc+Qx5PmfmF46I1kAyA86VJhmZph48QKleq+Z4Tu8w KWh6fJhzxxiUgihPCo7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ot4YU-004zrf-48; Thu, 10 Nov 2022 10:13:06 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ot4YR-004zpV-Fc for linux-arm-kernel@lists.infradead.org; Thu, 10 Nov 2022 10:13:04 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2AAACcU7040064; Thu, 10 Nov 2022 04:12:38 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1668075158; bh=pPJpv7QuroGfs3mkuiQ1JtikR8UCmpSuhiAcetSYzaU=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=rYVPRTTAPYD9gVtdc38ppB5nvX34iE1WNzEp6omsZF3fNiFXpA6E/Y9W3NvQzo8tO fnM03PsYx+dKugIfrC6FnlPdtaofO8u+nS1kZTKkGL14O8STeAcG00kRJlHWmwcSuk hAcOL55n8UYIS6gJWHDNP5ce571Dg8hXh8nQycOQ= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2AAACcS7109089 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 10 Nov 2022 04:12:38 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Thu, 10 Nov 2022 04:12:38 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Thu, 10 Nov 2022 04:12:38 -0600 Received: from ubuntu (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with SMTP id 2AAACM0p033066; Thu, 10 Nov 2022 04:12:25 -0600 Date: Thu, 10 Nov 2022 02:12:21 -0800 From: Matt Ranostay To: Linus Walleij CC: , , , , , , , , , , , , Keerthy Subject: Re: [PATCH v3 4/7] gpio: tps6594x: add GPIO support for TPS6594x PMIC Message-ID: References: <20221109065546.24912-1-mranostay@ti.com> <20221109065546.24912-5-mranostay@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221110_021303_666478_64187A53 X-CRM114-Status: GOOD ( 17.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Nov 09, 2022 at 10:59:08AM +0100, Linus Walleij wrote: > On Wed, Nov 9, 2022 at 7:56 AM Matt Ranostay wrote: > > > Add support for TPS6594X PMICs GPIO interface that has 11 that can be > > configured as input or outputs. > > > > Tested-by: Keerthy > > Signed-off-by: Matt Ranostay > > (...) > > +config GPIO_TPS6594X > > + tristate "TI TPS6594X GPIO driver" > > + depends on MFD_TPS6594X > > + help > > + Select this option to enable GPIO driver for the TPS6954X > > + PMIC chip family. There are 11 GPIOs that can be configured. > > select GPIO_REGMAP > > This driver is an archetypical example of a driver that can make great > use of GPIO_REGMAP helpers, so rewrite it to use them. > Look in drivers/gpio/gpio-sl28cpld.c for an example. Linus, Those helpers look great for this usecase on the surface but however I think there could be some issues. For GPIO direction it isn't configured by a bitmap on a register(s) but by a bit on a range of registers (with a register for each GPIOx). For set/get values the gpio helper would work though. - Matt > > Yours, > Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel