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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37E47C4332F for ; Thu, 10 Nov 2022 10:13:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229723AbiKJKNS (ORCPT ); Thu, 10 Nov 2022 05:13:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229973AbiKJKNR (ORCPT ); Thu, 10 Nov 2022 05:13:17 -0500 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 651C96334; Thu, 10 Nov 2022 02:13:15 -0800 (PST) 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-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-rtc@vger.kernel.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