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 97D7AC001E0 for ; Fri, 20 Oct 2023 00:21:49 +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=0Z9NJ09mzIn460Sit2vQVtPRNNf3htUNoeehaMr7u7U=; b=4KIhvbhmw2zZgp Cs2cp5WxvRQynxR2PD7JXIdjGELaaDEW9agvfeOElzNw8Z/NSkM5TA807m9YS3XEt0DBI3yZlLqWN 9BHwFAdwz4caDglKvbHghEvTcwYG7VKxHzwoT8ogulo9DJ6CKhgTGLhrFYuZqoL5BI6al8+A0iqMR 2WE3rWTP2FUenjyBtp4os+CXlms0TrML9dykPTa2uxqO2GGkvqWveoyUadGSZjqP2LN9vkJEKe1vf 17dPvdUnWvOHGNUWDPh2k47lLh04a3P7BSo2XCU90UF8/PawFL/hkJQcpEdUwmMf3wHP8UFPgu57B +kZ9dTm6bXkppe2+IPxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qtdGN-000veM-1z; Fri, 20 Oct 2023 00:21:15 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qtdGK-000vdu-13 for linux-arm-kernel@lists.infradead.org; Fri, 20 Oct 2023 00:21:14 +0000 Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-27d21168d26so74461a91.0 for ; Thu, 19 Oct 2023 17:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697761267; x=1698366067; 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=AazS8e3mWG6qdiQRzyWIWi2ZxzZq0l/gtqP+3nsv/Jw=; b=w06oKZSq8cc9FSLgh7RtTSD6Zt4WqYGpOTnJ6X6IJvtrtHURlvRp3C8BRz3N+L51p4 8Z6m70P58sP81yIRC7sckwZd49kQ6Pi5GokMCBsM18Ro+WcgRdFJkk4EiIqc7fC1kqxW q0ERWc0g2dbjPYtmUjEFXoJdHLDlmLnbevo9pHxo9YJwWcl1rCOsYdbpC2JHGpyaWind Me8rESIWyOUEkEwFZ9BsroIjgZF3EPp1wRIm2kx7i/w0uO6+vUA1FOvoC1ndSIModM8B 1Z0QqU/A2HyKp5IbxQ2yDGTwK0kOOAy2Q+obaWUHQa/sxhOkBMi/twKloXBSXtMm8Q53 s5Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697761268; x=1698366068; 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=AazS8e3mWG6qdiQRzyWIWi2ZxzZq0l/gtqP+3nsv/Jw=; b=ShrmrkwoSp+H0aJ9CWNiMztZLVi9v2bu0Rqx3bDkQ1y+wV9qgscGwVCfoqImnn1EpO 5p2zbcYwnsJKCu2F0k/H4EZ1Lo8rc8Vgm8Da4O6yyFmkdv3MwawlDYQIwa/COwlq41DH zMoZT9InCQZAXZ2h9vyVjwlNsenxqiuPHdYdYRxSXSNw5ziS7pPOx9XPldfVghcro1fV iftjMribu6F3Ip3ppBHe/UFAUV7Naa9es5bTB66HOxa1yKye2w07Nk1JDk6IchHH3PIm EpdOx966vK2uN/1YcdFPMrv79hXYoXp1zx56FwXW3oG5sdpVo6Tc5VQRlGI1/tPjdfc6 +GRg== X-Gm-Message-State: AOJu0YxtWbkz6f+tfDAykhyHayfjM9GZBLe092p7tXTBYgsOjFqBkg1w bRMQ+OvOdRKvTphxq7Usqauhhw== X-Google-Smtp-Source: AGHT+IGs8jvjaM8tAopk/BiBZwpdGjzq5RLDH6wWLbZD7+wzqgc9cO8iiFexYNATXB3GHDxFUwhTOA== X-Received: by 2002:a17:90b:33c4:b0:274:60c7:e15a with SMTP id lk4-20020a17090b33c400b0027460c7e15amr461810pjb.4.1697761267551; Thu, 19 Oct 2023 17:21:07 -0700 (PDT) Received: from octopus ([2400:4050:c3e1:100:8685:4bd3:8dc9:1f68]) by smtp.gmail.com with ESMTPSA id cx3-20020a17090afd8300b0027d1366d113sm2060953pjb.43.2023.10.19.17.21.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 17:21:07 -0700 (PDT) Date: Fri, 20 Oct 2023 09:21:02 +0900 From: AKASHI Takahiro To: andy.shevchenko@gmail.com 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: Mail-Followup-To: AKASHI Takahiro , andy.shevchenko@gmail.com, 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 References: <20231005025843.508689-1-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-20231019_172112_456971_E80F6623 X-CRM114-Status: GOOD ( 31.05 ) 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 Andy, On Fri, Oct 20, 2023 at 12:27:58AM +0300, andy.shevchenko@gmail.com wrote: > 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? My apologies. I will add you in Cc. > I definitely have some comments against the code (no DT, > though). Please, use (up-to-date) MAINTAINERS in your v3. Please don't hesitate to make comments here on v2 so that I can include your reviews in v3. Thanks, -Takahiro Akashi > > -- > With Best Regards, > Andy Shevchenko > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel