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 67F0CCDB465 for ; Thu, 12 Oct 2023 01:08:57 +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=OhH7f11bc94L40UXRvPP4hSXTaxrsh8SndAoYkw2+XY=; b=INRcz7s9hGWtVO jn4Eb8+UjlmrD2YJylubZAtqeqGfFQl23v24pOTTNUl03Q8UUbnrUahVwxc1U/7U3mQ7+rB0RAmf3 UYAIToB/QG6/XCLH0a3Df/YKbrWEYXOHl+6skLOrXe4a4vPWtoVXznJkEOKSU4XoxrLr2BThu0V4L FiUOZczH09x1ZWqc6gm8FzyjZK7JLq2dmKNhIUrTnGQTgIyJM4dxuL9fw3MnnG8q8up/f7RQjBQIw mISdtvFeVxPCND+FJv8ui94fsP8CSc2CcXzyNjQClSpNzxAvzrBY36GkP9ewboTRnzAVMpfy35QOU Fz/SxzNI1G2dGHUF4ndg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqkBg-00H6VN-32; Thu, 12 Oct 2023 01:08:28 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqkBd-00H6UR-2M for linux-arm-kernel@lists.infradead.org; Thu, 12 Oct 2023 01:08:27 +0000 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-692af7b641cso106678b3a.1 for ; Wed, 11 Oct 2023 18:08:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697072903; x=1697677703; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=5Hqg5K5lCDwesjzlytbXw7y9NPHtgi5OC1j95rwRDts=; b=uxXr4TD61t3zJHn6MBas0Fp8czmZk1GwL49JE/fqLRQ6WQhNxmM2cEk3HCZx04tBiy nWTwhz4wDPRX+7atafikB70z7cGx5XoWUxB/RkizM+mLyfwphiWzz1H/+9uPWhIa64t8 lAoHUpVOPDHgMhv91kWxG6wyasiwaMcXeynTgm3V341RouTH59XksRafntyMlLl901PX YTesFlYSwPphnL4ytoWrOKwGAXNYgFQhlFSugkvWTt8rHyeO+b0J5qh8haF0dH18QiST ov2TxjyOYy0SzrjVN8/k0uh7fZEYuvt9qjhBK1fao+hCCEiVErThkZLPXcGtrmaeLJd0 pOHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697072903; x=1697677703; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5Hqg5K5lCDwesjzlytbXw7y9NPHtgi5OC1j95rwRDts=; b=MSeag4wWdH6fwOwBZOwqH7EPvPkTy7sAbFCaLE01ZBSPiqi8/1vEa3V+l6b0caKMYU rMC7xQBHegf8/2bniJV4Z1zHQJoqbXwEE19m+iw6qw15FbCPnr6PKl8tLzOjTpAcDtYa mM1jRc9ZUBYO6IB7RskuHYc7Mx6Dt5u8ERHxarkRTUlrKfA/70NjztY8X/r28ecOPkWj 7EWcFzbNdgVm3WW8oUis16cDHW1H37URt5qcFG6sYo/oVm3fOsgXgiqVS7IRAZgfCtks qf2rYhe6kT5YSupBfV1baDPWiZXi5kd3iDVkUR1Zvkt2UMCS5BkPJHGSgk+1JELFgsQZ r3LA== X-Gm-Message-State: AOJu0YwWO+UAzehHl0zIiuIgk5LhFwp49Y+IVU1P09e1tk5/pvgT3vmF E7UitwrQE6RGNtSZWrBrqxi4Jg== X-Google-Smtp-Source: AGHT+IGpxl6YkWuTo1INXVAtkAIE60MX0AlQ4nrSuCV88LRkBuh+MynPfutMlVzITCYoPfp66FDd1g== X-Received: by 2002:a05:6a20:8408:b0:172:55c1:f1d4 with SMTP id c8-20020a056a20840800b0017255c1f1d4mr6361133pzd.4.1697072903036; Wed, 11 Oct 2023 18:08:23 -0700 (PDT) Received: from octopus ([2400:4050:c3e1:100:f7a8:3d44:f8cb:28e]) by smtp.gmail.com with ESMTPSA id jd22-20020a170903261600b001bc930d4517sm526508plb.42.2023.10.11.18.08.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 18:08:22 -0700 (PDT) Date: Thu, 12 Oct 2023 10:08:17 +0900 From: AKASHI Takahiro To: Linus Walleij , Oleksii_Moisieiev@epam.com Cc: Bartosz Golaszewski , sudeep.holla@arm.com, cristian.marussi@arm.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [RFC v2 4/5] gpio: add pinctrl based generic gpio driver Message-ID: Mail-Followup-To: AKASHI Takahiro , Linus Walleij , Oleksii_Moisieiev@epam.com, Bartosz Golaszewski , sudeep.holla@arm.com, cristian.marussi@arm.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org References: <20231005025843.508689-1-takahiro.akashi@linaro.org> <20231005025843.508689-5-takahiro.akashi@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231011_180825_794552_CD4ABCAE X-CRM114-Status: GOOD ( 23.13 ) 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 Hi Linus and Oleksii, On Tue, Oct 10, 2023 at 02:00:40PM +0200, Linus Walleij wrote: > On Thu, Oct 5, 2023 at 4:59???AM AKASHI Takahiro > wrote: > > > > Some pin controllers provide not only a method to set up lines but > > also gpio function. With this commit, a new generic gpio driver will > > be provided. It is implemented purely by using pinctrl interfaces. > > One of such pin controllers is Arm's SCMI. > > > > Signed-off-by: AKASHI Takahiro > > --- > > RFC v2 (Oct 5, 2023) > > RFC v2 looks very good to me, definitely something that can be merged > as a starting point once the hardware has been tested. Thank you for your support. I think the easiest and best way to test the code is that Oleskii will try my patch on his platform, r-car, on which I believe that SCMI FW for pin controller is already available since he tested his pinctrl driver. @Oleskii, can you please take a time for the test? (I will assist you in case of any error.) > > +static int pin_control_gpio_direction_input(struct gpio_chip *chip, > > + unsigned int offset) > > +{ > > + return pinctrl_gpio_direction_input(chip->gpiodev->base + offset); > > +} > > + > > +static int pin_control_gpio_direction_output(struct gpio_chip *chip, > > + unsigned int offset, int val) > > +{ > > + return pinctrl_gpio_direction_output(chip->gpiodev->base + offset); > > +} > > IIRC Bartosz is working on a patch set getting rid of this kludge having to > call with base + offset in every driver, replacing it with generic calls that > you can just assign in the gpio_chip. > > When this gets applied these changes will likely be in place so you will > get rid of this too. I will try to keep eyes on Bartosz's patch. Thanks, -Takahiro Akashi > Yours, > Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel