Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp628658rdb; Thu, 19 Oct 2023 14:29:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFPcpNnw1WRrXJEJ57ejDhNalAKSwA3tQNUVmGAZKIPcJU8FRHFiphVb//11TaImMMIIo43 X-Received: by 2002:a17:903:2347:b0:1c9:b5a6:44a0 with SMTP id c7-20020a170903234700b001c9b5a644a0mr161413plh.23.1697750982003; Thu, 19 Oct 2023 14:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697750981; cv=none; d=google.com; s=arc-20160816; b=K0uEOCx/2YcSlLf1hvGZ3WZseK+47wpACkZ2VfcmzvzJmNMH510eHt8ABosTDK2MN7 BIkyUuKGc9dlGQcvkfX9giENePYlq9xokfhtZspde7Gh4LOHo9kEmcvdAsmAl2S4kG29 A/RFqbH2EuFi1HeoqFZUMixiXON1GA5mnkVx4dmAasQ1IztZfh7biw/fn3zpvgZunGzH 1wXuCLjsM4KSXklXqlSLhILS7/U/GICa9KULehVYSwtY+NrTBMBDR7K25LNok8Gi7H1E 9AyVbz7sNLw5hK9fWpmadMjjTXn+yCjh55RPziOA9+FRjltTOXAxMRhTTml2N+Qx5vbY 3E9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from; bh=+hNl+pzSvgSWFeTzMDQqqOI7lNTKszY7p3CNf/YD/Wg=; fh=AEJQO+HXVbiUc2tHB5VkqZddVXhUU1J5I89nXfLyXM4=; b=v9p4wkHRiMno0QY0jOZXbyEaj16KfIJW6MhQTYR+t7GTmGVkjAaP2gyc4ZfuFFht73 iRpksgsfN5ZeIdnmN6WGq25Zk1kKtAp2PVS9CXFmxOLaw/9C2xAgZz592TY/CBhC8Ebc QeUL0RehCbOg5I451s9O0ZRspfRVTKMmu+XrAlRvxT214InNsEbPyI7+GmZzbrjor36Y GCHBb7tPrsN4h8aeGLxy9RPpqF/EfOaFvCuQmnOqLItCo0F2WU+97BA7u7QfVfeKhbgj acaqEQGrlNmhB/HGEIq4C5VdXZlU3YJW+cAKr7enuBGsq1M6e8455G65IRgcVADd4PGn FgEw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id 13-20020a170902c14d00b001c5fc13fb2dsi357513plj.294.2023.10.19.14.29.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 14:29:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 760338238B4C; Thu, 19 Oct 2023 14:29:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345256AbjJSV3H (ORCPT + 99 others); Thu, 19 Oct 2023 17:29:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346602AbjJSV3G (ORCPT ); Thu, 19 Oct 2023 17:29:06 -0400 X-Greylist: delayed 62 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 19 Oct 2023 14:29:04 PDT Received: from fgw22-7.mail.saunalahti.fi (fgw22-7.mail.saunalahti.fi [62.142.5.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D2A393 for ; Thu, 19 Oct 2023 14:29:04 -0700 (PDT) Received: from localhost (88-113-24-34.elisa-laajakaista.fi [88.113.24.34]) by fgw22.mail.saunalahti.fi (Halon) with ESMTP id 5fac9ca2-6ec6-11ee-a9de-005056bdf889; Fri, 20 Oct 2023 00:27:58 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Fri, 20 Oct 2023 00:27:58 +0300 To: AKASHI Takahiro Cc: sudeep.holla@arm.com, cristian.marussi@arm.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linus.walleij@linaro.org, Oleksii_Moisieiev@epam.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [RFC v2 0/5] gpio: add pinctrl based generic gpio driver Message-ID: References: <20231005025843.508689-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231005025843.508689-1-takahiro.akashi@linaro.org> X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 14:29:11 -0700 (PDT) Thu, Oct 05, 2023 at 11:58:38AM +0900, AKASHI Takahiro kirjoitti: > This is a revised version of my previous RFC[1]. Although I modified > the commits to make them look SCMI-independent, they are still posted > as RFC because I have never tested them on real hardware. > > (background) > I'm currently working on implementing SCMI pinctrl/gpio drivers > on U-Boot[2]. Although the pinctrl driver for the kernel[3] was submitted > by EPAM, it doesn't contain the gpio driver and I believe that we should > discuss a couple of points on the kernel side to finalize my design for > U-Boot. > > So this RFC is intended for reviews, especially to raise some issues. > > 1) how to obtain a value on an input pin > All the existing gpio drivers are set to obtain a value on an input > pin by accessing the hardware directly. In SCMI case, however, this is > just impossible in its nature and must be supported via a protocol > using "Input-value" configuration type. (See the spec[4], table-23.) > > The current pinconf framework is missing the feature (the pinconf > parameter and a helper function). See patch#1, #2 and #3. > > Please note that there is an issue around the pin configuration in > EPAM's current pinctrl driver as I commented[5]. > > 2) DT bindings > I would like to propose a generic binding for pinctrl based gpio driver. > This allows a "consumer" driver to handle gpio pins like as other > normal gpio controllers support. (patch#5) > > 3) generic GPIO driver > Based on (2), I tried to prototype a generic driver in patch#4. > Thanks to a set of existing pinctrl_gpio helper functions, except (1), > It seems that the driver can be implemented not relying on pin controller > specific code, at least for SCMI pinctrl. > > I will appreciate any comments. Any comment here: I'm listed as a designated reviewer of GPIO patches, why am I not Cc'ed on this? I definitely have some comments against the code (no DT, though). Please, use (up-to-date) MAINTAINERS in your v3. -- With Best Regards, Andy Shevchenko