Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp700786rdb; Thu, 19 Oct 2023 17:21:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFXRdPn2K0stzmDaPhV8oQ/+kVBcNmDTzJyRqdihg8ZVms6B08uZUAJDbVMtBkBNPjjJVvA X-Received: by 2002:a05:6a20:3b2a:b0:140:c838:2b2e with SMTP id c42-20020a056a203b2a00b00140c8382b2emr327151pzh.22.1697761285535; Thu, 19 Oct 2023 17:21:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697761285; cv=none; d=google.com; s=arc-20160816; b=zkz08gZi5Lk0EWXbnWISdbI9lHI7TFocFZYD4GquBMu9NNOzZtDnbecAlar/svP8U4 SkvO6DeaQWyibgIZPd7xSyrygAR7uVjXfQDsm9FphBmu026eiY8FvUzVzNXb0km+3lse +SbeL9lNgiZRJ5sd6OlYuAuT/hyAhBYeDPiJmN1qBvdEuaXJDqrD/GOmAbfvN+ryLEZC BTLPX+EyyTTuXQwoiorE8hhIDn4RTvZ1tJE+R/Gk73BgQPxAuH/qPNm+/kUxe+HiW1k0 6AMe1AIN5FuGy7/A95QYRjGn5QI1+oEdBz282VgBjvWhQo7TMt05Paaao553GQtF7KPZ WSaw== 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:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=AazS8e3mWG6qdiQRzyWIWi2ZxzZq0l/gtqP+3nsv/Jw=; fh=cnKDVRNzNfBOijxwSOY+0/UujWquXG2tcyE5kCcyZCA=; b=Yep8prXKugEsat5rDQSmCnBU9/l46MzxEz3AI7zGe4bF2pwmYiIJEP+RLu0+ZLf9E6 abpJejBEdSqmbgFv+5NH9F4mg/RRBqm3q2wkBsm5qv0OqFy9gY/Uog+CMFYXpuF55v+b CRrBAdYqn3592ve4N1RtfqoSngFFZ2L3iFMmo896wzYfJuF5E6mDNlzMlZ2z4gJHXPLl VDbk/UreeQJ5Msv7TjK/qoEvuWnc0MrJwC3aAQeqFjo65dpp1KvhPU6T9FJb6zs+GWT5 ny8skQ4geKRstS6AfwE/ndcJKhcQxwtCLIu6DUuagrDYTvLCSyY8SJz7TT3qbLXtZvKq j2kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FHp5a9aG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id d8-20020a170902cec800b001c3fa95ca18si646672plg.333.2023.10.19.17.21.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 17:21:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FHp5a9aG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 9CF668158324; Thu, 19 Oct 2023 17:21:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346768AbjJTAVM (ORCPT + 99 others); Thu, 19 Oct 2023 20:21:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346748AbjJTAVK (ORCPT ); Thu, 19 Oct 2023 20:21:10 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B3C911F for ; Thu, 19 Oct 2023 17:21:08 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-27d21168d26so74463a91.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=1697761268; x=1698366068; darn=vger.kernel.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=FHp5a9aGsUNZjUm8d8jjYNZGyAjt53FYzftWu/t8lLZHuKS/ESqwnZkrquB3aJ/fGv hHa1nKM2Z/mpfNFngMG4QhJ7pot1gOQfU0Gz5hDteOd4NXfad/ekVJKM3Cl+AaJNM+fx 5Sly5ZWteChv5dA5MJNTxagT6yjhkv0ZWt3A4nZxJGMu+3z0CNpXa7OALwiqFQFZTKWU DTBQqKbBxXgU3N9qGkieTezxt9LG4rAAlXqRLUbEM4+CTf+x6ig1fKI+Jm0HY5ZGvxVD T3I88VC80A2PjKMDp/txl3DgFAvj/guh8ZYRnK27KgcqKnOm4rU3sxwmC/84g5fkHy9H AXLA== 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=cgiLwTNDqfZenaZWD8ytvWTmR+3F4fZ7YXFdBmOS6/K4Z6ECJNssEKFnJw/CgW8mhG 9kKcJkxKu09IhhXAVGZyYYI2MZiz1VWvuMJUB86Gj1kPTjrk0avRbQueDuSeRwAC965M ZZCPP7TsgydIo0Bc+utOo1wTQ+/4aHYbST1I+aSPex/WXgqYFXm75yYVaW46cnG7giBd 7Oqxvqzz/XBrZLPFSzMcLVcQOkrIot/5P/JA1+2hFWci63DrHhSaMcO6jZNXiz38VD9O tbYEjBydaoKxM1M7kw96qD1lz+SltABM4FmZpqGG1X5lxVmz0ryQnql5Ro/enZSLaAjj v/ww== X-Gm-Message-State: AOJu0YzWsRNkVHNEaKTmXa6R9XcIYJwBmaL+bdC42S4gOmPYrW0mgLEs oKOAbLkaAJbS1EF2bTswnrkAtQ== 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Thu, 19 Oct 2023 17:21:23 -0700 (PDT) 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 > >