[{"id":1775446,"web_url":"http://patchwork.ozlabs.org/comment/1775446/","msgid":"<20170926125518.kulkohinaojty2zl@flea>","list_archive_url":null,"date":"2017-09-26T12:55:18","subject":"Re: [PATCH v2 01/10] pinctrl: move gpio-axp209 to pinctrl","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/people/12916/","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"content":"On Tue, Sep 26, 2017 at 12:17:11PM +0000, Quentin Schulz wrote:\n> To prepare the driver for the upcoming pinctrl features, move the GPIO\n> driver AXP209 from GPIO to pinctrl subsystem.\n> \n> Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>\n\nI'm not sure we actually need to do this. Can't we just keep the\ndriver here?\n\nMaxime","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"EXcLDknD\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1gtj2FGFz9tXn\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 22:56:13 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpPD-00036G-Q2; Tue, 26 Sep 2017 12:56:07 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpOx-0002kI-7Z for linux-arm-kernel@lists.infradead.org;\n\tTue, 26 Sep 2017 12:55:53 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 4F9CC208DD; Tue, 26 Sep 2017 14:55:28 +0200 (CEST)","from localhost (unknown [195.81.232.10])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 2D058208CB;\n\tTue, 26 Sep 2017 14:55:18 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=z/OsXTngFJttqYAZrnOR/uTc/HlTCsrkkwasf4d/rV8=;\n\tb=EXcLDknDyzGhwMMRpxiRTmy1B\n\tHGke9SANWo0Vx3TpqB9uZDIh4Vd1aKdsZUDVUL/kyLwe8IpJ+Zmh2h0PVM9SdB5jy//K9IbR6qkrN\n\tArGUzRs8945nqLf6G73LY4IidHkSUXzxqotQ5y8okjI0IOna7V7xJym8sU1AC61G8A/DxX0sY6NAO\n\ttY+obulao/443crgBXhaIq3ParOZzT35xZhlRYC77yTroWmA2y3VEoB+z3GpqWGfBBXIydHJi2/F/\n\thuUzlWtXYRb1cwTqm2I5q5RjT0VIcDdpxigHE7Lr89imtOHROdTMNzJ4FGzh9t3gGAzO4e/PIeSE9\n\taMYkFcwYw==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0","Date":"Tue, 26 Sep 2017 14:55:18 +0200","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Quentin Schulz <quentin.schulz@free-electrons.com>","Subject":"Re: [PATCH v2 01/10] pinctrl: move gpio-axp209 to pinctrl","Message-ID":"<20170926125518.kulkohinaojty2zl@flea>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<e193f8efe9092171ebeffb77ab77422179fd3cab.1506428208.git-series.quentin.schulz@free-electrons.com>","MIME-Version":"1.0","In-Reply-To":"<e193f8efe9092171ebeffb77ab77422179fd3cab.1506428208.git-series.quentin.schulz@free-electrons.com>","User-Agent":"NeoMutt/20170914 (1.9.0)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170926_055551_545093_E15E24D6 ","X-CRM114-Status":"UNSURE (   9.01  )","X-CRM114-Notice":"Please train this message.","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"mark.rutland@arm.com, devicetree@vger.kernel.org,\n\tlinus.walleij@linaro.org, \n\tlinux-sunxi@googlegroups.com, linux@armlinux.org.uk,\n\tlinux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, wens@csie.org, \n\trobh+dt@kernel.org, lee.jones@linaro.org,\n\tthomas.petazzoni@free-electrons.com, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============1864765971960388653==\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1775452,"web_url":"http://patchwork.ozlabs.org/comment/1775452/","msgid":"<cca522e6-1dbf-b682-b8fe-907fa293f335@free-electrons.com>","list_archive_url":null,"date":"2017-09-26T12:59:38","subject":"Re: [PATCH v2 01/10] pinctrl: move gpio-axp209 to pinctrl","submitter":{"id":69366,"url":"http://patchwork.ozlabs.org/api/people/69366/","name":"Quentin Schulz","email":"quentin.schulz@free-electrons.com"},"content":"Hi Maxime,\n\nOn 26/09/2017 14:55, Maxime Ripard wrote:\n> On Tue, Sep 26, 2017 at 12:17:11PM +0000, Quentin Schulz wrote:\n>> To prepare the driver for the upcoming pinctrl features, move the GPIO\n>> driver AXP209 from GPIO to pinctrl subsystem.\n>>\n>> Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>\n> \n> I'm not sure we actually need to do this. Can't we just keep the\n> driver here?\n> \n\nThat's not what I understood from:\nhttps://lkml.org/lkml/2016/11/24/360 and the following answers from\nLinus on the first version.\n\nQuentin","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"ZE2ABgdM\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1gzY61Yyz9tXj\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 23:00:25 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpTK-0006KK-I8; Tue, 26 Sep 2017 13:00:22 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpTG-00051P-2L for linux-arm-kernel@lists.infradead.org;\n\tTue, 26 Sep 2017 13:00:20 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 2BEF720850; Tue, 26 Sep 2017 14:59:55 +0200 (CEST)","from [192.168.0.13] (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr\n\t[90.63.216.87])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id D0EB62081E;\n\tTue, 26 Sep 2017 14:59:44 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=Ce64nhdujeT1UWCv3ivjQ9Mr6mhA5d12Bv5qzFaqJ1A=;\n\tb=ZE2ABgdMF3U3g9474/wI0fiQi\n\tWtaLU68aXykhCvTGjaWZFBdftt+1cli5659NKcVbkXM3zeygfzhs22DQO47wW2iLFP8+3vOFQPQcM\n\tU+ZH7nBnAI5DAWBJB0Av1Z+GFjOQE/j8obtRncXeA2h3cPsBgM/tOS6lxEKGdBq0x9ce7vvysTJhy\n\tHwcftdcTJocdp8VPbw8cTIl0BWR5O9gFoASOPc46NjC107kIRoV0SDUZodJc1x7To3CeEbPkd06bs\n\tYWMTeH6Jv/aRq0s2R6PGvviowtvuNmEgGtrZU4sY/CJOZgkVSV1QquWpajpKX5+Hj7VF5czTyIFkH\n\tTnJPpq3bw==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0","Subject":"Re: [PATCH v2 01/10] pinctrl: move gpio-axp209 to pinctrl","To":"Maxime Ripard <maxime.ripard@free-electrons.com>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<e193f8efe9092171ebeffb77ab77422179fd3cab.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<20170926125518.kulkohinaojty2zl@flea>","From":"Quentin Schulz <quentin.schulz@free-electrons.com>","Message-ID":"<cca522e6-1dbf-b682-b8fe-907fa293f335@free-electrons.com>","Date":"Tue, 26 Sep 2017 14:59:38 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170926125518.kulkohinaojty2zl@flea>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170926_060018_445689_2E674B27 ","X-CRM114-Status":"GOOD (  12.15  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"mark.rutland@arm.com, devicetree@vger.kernel.org,\n\tlinus.walleij@linaro.org, \n\tlinux-sunxi@googlegroups.com, linux@armlinux.org.uk,\n\tlinux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, wens@csie.org, \n\trobh+dt@kernel.org, lee.jones@linaro.org,\n\tthomas.petazzoni@free-electrons.com, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============8378965183101808411==\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1775454,"web_url":"http://patchwork.ozlabs.org/comment/1775454/","msgid":"<20170926130009.r5isgrjvkwmm44nn@flea>","list_archive_url":null,"date":"2017-09-26T13:00:09","subject":"Re: [PATCH v2 02/10] pinctrl: axp209: add pinctrl features","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/people/12916/","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"content":"On Tue, Sep 26, 2017 at 12:17:12PM +0000, Quentin Schulz wrote:\n> +static const struct axp20x_desc_pin axp209_pins[] = {\n> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(0, \"GPIO0\"),\n> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\"),\n> +\t\t   AXP20X_FUNCTION(0x3, \"ldo\"),\n> +\t\t   AXP20X_FUNCTION(0x4, \"adc\")),\n> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(1, \"GPIO1\"),\n> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\"),\n> +\t\t   AXP20X_FUNCTION(0x3, \"ldo\"),\n> +\t\t   AXP20X_FUNCTION(0x4, \"adc\")),\n> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(2, \"GPIO2\"),\n> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\")),\n> +};\n\nIf all the functions are the same, and at the same offset, can't we\njust hardcode it, instead of having (and duplicate) all the logic\nbelow?\n\n> +\tpctrl_desc = devm_kzalloc(&pdev->dev, sizeof(*pctrl_desc), GFP_KERNEL);\n> +\tif (!pctrl_desc)\n> +\t\treturn -ENOMEM;\n> +\n> +\tpctrl_desc->name = dev_name(&pdev->dev);\n> +\tpctrl_desc->owner = THIS_MODULE;\n> +\tpctrl_desc->pins = pins;\n> +\tpctrl_desc->npins = gpio->desc->npins;\n> +\tpctrl_desc->pctlops = &axp20x_pctrl_ops;\n> +\tpctrl_desc->pmxops = &axp20x_pmx_ops;\n\nThe strict flag needs to be set too in order to avoid concurrent uses\nof GPIO and other functions.\n\nMaxime","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"EII9LTW+\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1h060pFBz9tXt\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 23:00:54 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpTi-0006ev-W1; Tue, 26 Sep 2017 13:00:47 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpTc-0006Jt-F4 for linux-arm-kernel@lists.infradead.org;\n\tTue, 26 Sep 2017 13:00:45 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 0097820915; Tue, 26 Sep 2017 15:00:18 +0200 (CEST)","from localhost (unknown [195.81.232.10])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id CADB2208DD;\n\tTue, 26 Sep 2017 15:00:08 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=ByK/6Z5HSkE7tIBmEZhBjIJLcUhtzPdTSL924GmvKG4=;\n\tb=EII9LTW+zdlmhISvh7F/wt2Vd\n\toYYGXsd4eIz9SqgOxfTkOObzoNKElQxImhOHLzOHIwko/24jllg0ODPYiRdi2NNIeZAvIW2UAiEc/\n\t8y+QEREJG7/TSIgwwnIqU1leXssR7MUNdQlHk8i8xhSASGoIT3LBe2yw4GcT1VeM91zw4v3eRvV/f\n\tvg1fwamlLHHxrNB/qKCHIwp7zIqIxBBfrtta0zHI1TZFOmg4vpseorMYygKtFvV0+Aw2tSRD2bFLi\n\tXOv27/xcal2OcNsYFs0rjzvuJTKwbGGntsyqQry/23hyjgIVN7byjKMGZVl3uNUUaOxE2kBdARwO5\n\tS3oiT4zBw==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0","Date":"Tue, 26 Sep 2017 15:00:09 +0200","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Quentin Schulz <quentin.schulz@free-electrons.com>","Subject":"Re: [PATCH v2 02/10] pinctrl: axp209: add pinctrl features","Message-ID":"<20170926130009.r5isgrjvkwmm44nn@flea>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<6b89df1bf07dac2ab295fca5fdf0e55179c47ed6.1506428208.git-series.quentin.schulz@free-electrons.com>","MIME-Version":"1.0","In-Reply-To":"<6b89df1bf07dac2ab295fca5fdf0e55179c47ed6.1506428208.git-series.quentin.schulz@free-electrons.com>","User-Agent":"NeoMutt/20170914 (1.9.0)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170926_060040_961540_8E197329 ","X-CRM114-Status":"UNSURE (   9.76  )","X-CRM114-Notice":"Please train this message.","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"mark.rutland@arm.com, devicetree@vger.kernel.org,\n\tlinus.walleij@linaro.org, \n\tlinux-sunxi@googlegroups.com, linux@armlinux.org.uk,\n\tlinux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, wens@csie.org, \n\trobh+dt@kernel.org, lee.jones@linaro.org,\n\tthomas.petazzoni@free-electrons.com, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============2197589840152701011==\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1775460,"web_url":"http://patchwork.ozlabs.org/comment/1775460/","msgid":"<20170926130108.uibnri32b73elfy6@flea>","list_archive_url":null,"date":"2017-09-26T13:01:08","subject":"Re: [PATCH v2 03/10] pinctrl: axp209: use drv_data of\n\tpinctrl_pin_desc to store pin reg","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/people/12916/","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"content":"On Tue, Sep 26, 2017 at 12:17:13PM +0000, Quentin Schulz wrote:\n> Instead of using a function to retrieve each pin's correct control\n> register, use drv_data within pinctrl_pin_desc to store the ctrl reg.\n> \n> Remove axp20x_gpio_get_reg and replace every occurrence by a get from\n> drv_data.\n\nWhy do you need to do that? This should be explained.\n\nMaxime","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"aEq2v1bp\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1h1X1d3Dz9tXj\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 23:02:08 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpUy-0007DX-5W; Tue, 26 Sep 2017 13:02:04 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpUt-00078C-4Y for linux-arm-kernel@lists.infradead.org;\n\tTue, 26 Sep 2017 13:02:01 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid A8BFC20850; Tue, 26 Sep 2017 15:01:37 +0200 (CEST)","from localhost (unknown [195.81.232.10])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 6EA912095D;\n\tTue, 26 Sep 2017 15:01:07 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=c4CDzDWFmVQMS9t0uhzsKJcmrjg4FM3Ubzedlvmt59Q=;\n\tb=aEq2v1bp9HFqnx+ijSrS7zP8B\n\t/UCmrQisSBxOTT8gNDLmkRbCWg0RVexPSuByZx9c22d27dFXJH7X0Q12ZUK++X+iPoPWmaAkmuol+\n\t24w9k4Os81Ho/92vO4VU0ulccICjxwbrlTPxPA2CaFp/nOaWeqy1nrrsB6RwQDfR/J9oxaEUArljo\n\taa37spiASnbu2wN4WWu63nxUy3lp1kjH9Bv4tHrZKTqtlBIjxw9MYBTQ4t7sci3ONE6g+95Dwk+E7\n\tEFKcruwdHej+TvuN4JkvPDfPZE3ZuFzKF1O/c7kLgUWSMddQSJTyL3tJ9eP6nbH4AGn1JoSUpUISD\n\ty8NDRvHmw==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0","Date":"Tue, 26 Sep 2017 15:01:08 +0200","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Quentin Schulz <quentin.schulz@free-electrons.com>","Subject":"Re: [PATCH v2 03/10] pinctrl: axp209: use drv_data of\n\tpinctrl_pin_desc to store pin reg","Message-ID":"<20170926130108.uibnri32b73elfy6@flea>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<7993a30fbc2e50a2d228fa0c8fad643c4034b101.1506428208.git-series.quentin.schulz@free-electrons.com>","MIME-Version":"1.0","In-Reply-To":"<7993a30fbc2e50a2d228fa0c8fad643c4034b101.1506428208.git-series.quentin.schulz@free-electrons.com>","User-Agent":"NeoMutt/20170914 (1.9.0)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170926_060159_334602_9D9BFD0B ","X-CRM114-Status":"UNSURE (   9.23  )","X-CRM114-Notice":"Please train this message.","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"mark.rutland@arm.com, devicetree@vger.kernel.org,\n\tlinus.walleij@linaro.org, \n\tlinux-sunxi@googlegroups.com, linux@armlinux.org.uk,\n\tlinux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, wens@csie.org, \n\trobh+dt@kernel.org, lee.jones@linaro.org,\n\tthomas.petazzoni@free-electrons.com, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============8812600777444132088==\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1775468,"web_url":"http://patchwork.ozlabs.org/comment/1775468/","msgid":"<5596280a-51bb-7491-31f4-5800219888ad@free-electrons.com>","list_archive_url":null,"date":"2017-09-26T13:08:21","subject":"Re: [PATCH v2 02/10] pinctrl: axp209: add pinctrl features","submitter":{"id":69366,"url":"http://patchwork.ozlabs.org/api/people/69366/","name":"Quentin Schulz","email":"quentin.schulz@free-electrons.com"},"content":"Hi Maxime,\n\nOn 26/09/2017 15:00, Maxime Ripard wrote:\n> On Tue, Sep 26, 2017 at 12:17:12PM +0000, Quentin Schulz wrote:\n>> +static const struct axp20x_desc_pin axp209_pins[] = {\n>> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(0, \"GPIO0\"),\n>> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n>> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\"),\n>> +\t\t   AXP20X_FUNCTION(0x3, \"ldo\"),\n>> +\t\t   AXP20X_FUNCTION(0x4, \"adc\")),\n>> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(1, \"GPIO1\"),\n>> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n>> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\"),\n>> +\t\t   AXP20X_FUNCTION(0x3, \"ldo\"),\n>> +\t\t   AXP20X_FUNCTION(0x4, \"adc\")),\n>> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(2, \"GPIO2\"),\n>> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n>> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\")),\n>> +};\n> \n> If all the functions are the same, and at the same offset, can't we\n> just hardcode it, instead of having (and duplicate) all the logic\n> below?\n> \n\nAXP20X_PIN(AXP20X_PINCTRL_PIN(0, \"GPIO0\"),\n\t\tAXP20X_GPIO_OUT,\n\t\tAXP20X_GPIO_IN,\n\t\tAXP20X_LDO,\n\t\tAXP20X_ADC))\n\nThat's what you mean?\n\n>> +\tpctrl_desc = devm_kzalloc(&pdev->dev, sizeof(*pctrl_desc), GFP_KERNEL);\n>> +\tif (!pctrl_desc)\n>> +\t\treturn -ENOMEM;\n>> +\n>> +\tpctrl_desc->name = dev_name(&pdev->dev);\n>> +\tpctrl_desc->owner = THIS_MODULE;\n>> +\tpctrl_desc->pins = pins;\n>> +\tpctrl_desc->npins = gpio->desc->npins;\n>> +\tpctrl_desc->pctlops = &axp20x_pctrl_ops;\n>> +\tpctrl_desc->pmxops = &axp20x_pmx_ops;\n> \n> The strict flag needs to be set too in order to avoid concurrent uses\n> of GPIO and other functions.\n> \n\nStrict is a property of pinmux_ops struct (pmxops) and it is set.\n\nThanks,\nQuentin","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"QPRnTxQM\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1h9f3fR4z9tXj\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 23:09:10 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpbm-0002u0-TQ; Tue, 26 Sep 2017 13:09:06 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpbd-0002eb-7A for linux-arm-kernel@lists.infradead.org;\n\tTue, 26 Sep 2017 13:09:04 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 534E120911; Tue, 26 Sep 2017 15:08:35 +0200 (CEST)","from [192.168.0.13] (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr\n\t[90.63.216.87])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 00202207D0;\n\tTue, 26 Sep 2017 15:08:24 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=BKnfa6GsyF3ANNTcOSbvstrgCSVMuPgVEGYqiz75TiM=;\n\tb=QPRnTxQMZF+43N76xpQuCDuF+\n\tmzc1KkhYogSDtpE+Kq63Oel968CJBU2fKMSTbQEeLq9uvCUO9vmnjgKrgodHYQ2OPQai0JCxzIEdP\n\tXcr5EWjXuxcyjmYrIx9h3lW4AsN//r5FsJUG5h3OIPC/tBh+bEl8pI/hxS82uvasU9B0QGZehZccV\n\tBRbi7RgYHEsFl61IC59rub/o3eahO1KbUKR7pXjG86jCzFKcUpOFQiRjoYOzeRiD6szk8KKtgwmhv\n\tr7Pct4oC/Ph3xQ5k8N4vAUzU6o1cq12RryavfPMqaej+3klRux3Gvxyw1fFaiQwblsRuARB7HEz+f\n\tHLmGXyMIA==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0","Subject":"Re: [PATCH v2 02/10] pinctrl: axp209: add pinctrl features","To":"Maxime Ripard <maxime.ripard@free-electrons.com>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<6b89df1bf07dac2ab295fca5fdf0e55179c47ed6.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<20170926130009.r5isgrjvkwmm44nn@flea>","From":"Quentin Schulz <quentin.schulz@free-electrons.com>","Message-ID":"<5596280a-51bb-7491-31f4-5800219888ad@free-electrons.com>","Date":"Tue, 26 Sep 2017 15:08:21 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170926130009.r5isgrjvkwmm44nn@flea>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170926_060857_562106_F23AFB56 ","X-CRM114-Status":"GOOD (  12.72  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"mark.rutland@arm.com, devicetree@vger.kernel.org,\n\tlinus.walleij@linaro.org, \n\tlinux-sunxi@googlegroups.com, linux@armlinux.org.uk,\n\tlinux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, wens@csie.org, \n\trobh+dt@kernel.org, lee.jones@linaro.org,\n\tthomas.petazzoni@free-electrons.com, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============1826813560906115913==\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1775471,"web_url":"http://patchwork.ozlabs.org/comment/1775471/","msgid":"<CAGb2v65nJLVrTRu1W52dp3SUb-9Sx63Xyr1z+tjerNKwCwGLGg@mail.gmail.com>","list_archive_url":null,"date":"2017-09-26T13:08:54","subject":"Re: [PATCH v2 01/10] pinctrl: move gpio-axp209 to pinctrl","submitter":{"id":47154,"url":"http://patchwork.ozlabs.org/api/people/47154/","name":"Chen-Yu Tsai","email":"wens@csie.org"},"content":"On Tue, Sep 26, 2017 at 8:59 PM, Quentin Schulz\n<quentin.schulz@free-electrons.com> wrote:\n> Hi Maxime,\n>\n> On 26/09/2017 14:55, Maxime Ripard wrote:\n>> On Tue, Sep 26, 2017 at 12:17:11PM +0000, Quentin Schulz wrote:\n>>> To prepare the driver for the upcoming pinctrl features, move the GPIO\n>>> driver AXP209 from GPIO to pinctrl subsystem.\n>>>\n>>> Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>\n>>\n>> I'm not sure we actually need to do this. Can't we just keep the\n>> driver here?\n>>\n>\n> That's not what I understood from:\n> https://lkml.org/lkml/2016/11/24/360 and the following answers from\n> Linus on the first version.\n\nPlease remember to add -M to git format-patch, as Linus mentioned,\nif you resend.\n\nChenyu","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"CXtrGUax\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1hBg0VWxz9tXn\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 23:10:03 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpcc-0003Yk-Q6; Tue, 26 Sep 2017 13:09:58 +0000","from smtp.csie.ntu.edu.tw ([140.112.30.61])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpcQ-0003At-5j for linux-arm-kernel@lists.infradead.org;\n\tTue, 26 Sep 2017 13:09:55 +0000","from mail-wm0-f52.google.com (mail-wm0-f52.google.com\n\t[74.125.82.52])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits))\n\t(No client certificate requested) (Authenticated sender: b93043)\n\tby smtp.csie.ntu.edu.tw (Postfix) with ESMTPSA id E92C720461\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tTue, 26 Sep 2017 21:09:17 +0800 (CST)","by mail-wm0-f52.google.com with SMTP id r136so7714812wmf.2\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tTue, 26 Sep 2017 06:09:17 -0700 (PDT)","by 10.223.196.226 with HTTP; Tue, 26 Sep 2017 06:08:54 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:\n\tReferences:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=5phTO4ie1fySGHjfqzpFoBG4DSf0wvx9NxEPW/lQ4tw=;\n\tb=CXtrGUaxB+A+7s\n\tsDmKr39sZkRbF8GmvrdRcgbUnpZv4XKtvOI12DBRTRq9tP2yRFUH4wyPFnnOtZ3/AsW6QmUuby5CY\n\tiyhCN7VJDO3SzkOJASjnk4l6wY0XRgwn3oiDqr+Z/MLJYT0H+VHYMsx0O9BrcHW5R4W+Fo48LHIER\n\txLv5ilSbP6uJlLZvTo343/aAsAsVkLA47wPjhA9w9+vKYFhmeYcgtZC7DkmW/EpMPPqo2TYyrCoBd\n\t0XY4HvKOrX+2mi9tarnsSUAtEQRqRNjxGg4ma4AZNpupi6Flp1+GqJ4W0RxfFx+HeqomfUbEArjM8\n\tCgW2kxpIyP5bMsumfv1Q==;","X-Gm-Message-State":"AHPjjUhJquRZqSM08KJwcP/TOqHifhzbipn5bnGPIVNa3/HbTPh/Qkwp\n\tO1+TCA/zCoPzHBGkXYtGkDAB2wRnHdpnvAyxYAM=","X-Google-Smtp-Source":"AOwi7QBp7n04+9oq05qVfOi2ajavjN/69goZz6nkPGXhbw72uK6ruq99ZX5aWy1UpUvXNGm1R8X5L1VmZoFxw1wZw7o=","X-Received":"by 10.28.59.215 with SMTP id i206mr3173283wma.116.1506431355348; \n\tTue, 26 Sep 2017 06:09:15 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<cca522e6-1dbf-b682-b8fe-907fa293f335@free-electrons.com>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<e193f8efe9092171ebeffb77ab77422179fd3cab.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<20170926125518.kulkohinaojty2zl@flea>\n\t<cca522e6-1dbf-b682-b8fe-907fa293f335@free-electrons.com>","From":"Chen-Yu Tsai <wens@csie.org>","Date":"Tue, 26 Sep 2017 21:08:54 +0800","X-Gmail-Original-Message-ID":"<CAGb2v65nJLVrTRu1W52dp3SUb-9Sx63Xyr1z+tjerNKwCwGLGg@mail.gmail.com>","Message-ID":"<CAGb2v65nJLVrTRu1W52dp3SUb-9Sx63Xyr1z+tjerNKwCwGLGg@mail.gmail.com>","Subject":"Re: [PATCH v2 01/10] pinctrl: move gpio-axp209 to pinctrl","To":"Quentin Schulz <quentin.schulz@free-electrons.com>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170926_060946_474095_FD9EC172 ","X-CRM114-Status":"GOOD (  11.40  )","X-Spam-Score":"-2.3 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.3 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\n\tmedium trust [140.112.30.61 listed in list.dnswl.org]\n\t1.4 RCVD_IN_BRBL_LASTEXT   RBL: No description available.\n\t[140.112.30.61 listed in bb.barracudacentral.org]\n\t0.5 RCVD_IN_SORBS_SPAM     RBL: SORBS: sender is a spam source\n\t[74.125.82.52 listed in dnsbl.sorbs.net]\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>,\n\tdevicetree <devicetree@vger.kernel.org>,\n\tLinus Walleij <linus.walleij@linaro.org>,\n\tlinux-sunxi <linux-sunxi@googlegroups.com>,\n\tRussell King <linux@armlinux.org.uk>,\n\tlinux-kernel <linux-kernel@vger.kernel.org>,\n\t\"linux-gpio@vger.kernel.org\" <linux-gpio@vger.kernel.org>,\n\tChen-Yu Tsai <wens@csie.org>, Rob Herring <robh+dt@kernel.org>,\n\tMaxime Ripard <maxime.ripard@free-electrons.com>,\n\tLee Jones <lee.jones@linaro.org>,\n\tThomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\tlinux-arm-kernel <linux-arm-kernel@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1775477,"web_url":"http://patchwork.ozlabs.org/comment/1775477/","msgid":"<20170926131256.bqfzgqs2k63liqjj@flea>","list_archive_url":null,"date":"2017-09-26T13:12:56","subject":"Re: [PATCH v2 06/10] pinctrl: axp209: add support for AXP813 GPIOs","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/people/12916/","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"content":"On Tue, Sep 26, 2017 at 12:17:16PM +0000, Quentin Schulz wrote:\n> The AXP813 has only two GPIOs. GPIO0 can either be used as a GPIO, an\n> LDO regulator or an ADC. GPIO1 can be used either as a GPIO or an LDO\n> regulator.\n> \n> Moreover, the status bit of the GPIOs when in input mode is not offset\n> by 4 unlike the AXP209.\n> \n> Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>\n> ---\n>  Documentation/devicetree/bindings/pinctrl/pinctrl-axp209.txt | 13 ++-\n>  drivers/pinctrl/pinctrl-axp209.c                             | 30 ++++++-\n>  2 files changed, 39 insertions(+), 4 deletions(-)\n> \n> diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-axp209.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-axp209.txt\n> index a5bfe87..a1d5dec 100644\n> --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-axp209.txt\n> +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-axp209.txt\n> @@ -4,7 +4,9 @@ This driver follows the usual GPIO bindings found in\n>  Documentation/devicetree/bindings/gpio/gpio.txt\n>  \n>  Required properties:\n> -- compatible: Should be \"x-powers,axp209-gpio\"\n> +- compatible: Should be one of:\n> +\t- \"x-powers,axp209-gpio\"\n> +\t- \"x-powers,axp813-pctl\"\n>  - #gpio-cells: Should be two. The first cell is the pin number and the\n>    second is the GPIO flags.\n>  - gpio-controller: Marks the device node as a GPIO controller.\n> @@ -49,8 +51,17 @@ Example:\n>  GPIOs and their functions\n>  -------------------------\n>  \n> +axp209\n> +------\n>  GPIO\t|\tFunctions\n>  ------------------------\n>  GPIO0\t|\tgpio_in, gpio_out, ldo, adc\n>  GPIO1\t|\tgpio_in, gpio_out, ldo, adc\n>  GPIO2\t|\tgpio_in, gpio_out\n> +\n> +axp813\n> +------\n> +GPIO\t|\tFunctions\n> +------------------------\n> +GPIO0\t|\tgpio_in, gpio_out, ldo, adc\n> +GPIO1\t|\tgpio_in, gpio_out, ldo\n> diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp209.c\n> index 11f871e..500862b 100644\n> --- a/drivers/pinctrl/pinctrl-axp209.c\n> +++ b/drivers/pinctrl/pinctrl-axp209.c\n> @@ -108,11 +108,28 @@ static const struct axp20x_desc_pin axp209_pins[] = {\n>  \t\t   AXP20X_FUNCTION(0x2, \"gpio_in\")),\n>  };\n>  \n> +static const struct axp20x_desc_pin axp813_pins[] = {\n> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(0, \"GPIO0\", (void *)AXP20X_GPIO0_CTRL),\n> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\"),\n> +\t\t   AXP20X_FUNCTION(0x3, \"ldo\"),\n> +\t\t   AXP20X_FUNCTION(0x4, \"adc\")),\n> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(1, \"GPIO1\", (void *)AXP20X_GPIO1_CTRL),\n> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\"),\n> +\t\t   AXP20X_FUNCTION(0x3, \"ldo\")),\n> +};\n> +\n>  static const struct axp20x_pinctrl_desc axp20x_pinctrl_data = {\n>  \t.pins\t= axp209_pins,\n>  \t.npins\t= ARRAY_SIZE(axp209_pins),\n>  };\n>  \n> +static const struct axp20x_pinctrl_desc axp813_pinctrl_data = {\n> +\t.pins\t= axp813_pins,\n> +\t.npins\t= ARRAY_SIZE(axp813_pins),\n> +};\n> +\n>  static int axp20x_gpio_input(struct gpio_chip *chip, unsigned offset)\n>  {\n>  \treturn pinctrl_gpio_direction_input(chip->base + offset);\n> @@ -479,6 +496,7 @@ static int axp20x_pctl_probe(struct platform_device *pdev)\n>  \tstruct axp20x_pctl *pctl;\n>  \tstruct pinctrl_desc *pctrl_desc;\n>  \tstruct pinctrl_pin_desc *pins;\n> +\tstruct device_node *np = pdev->dev.of_node;\n>  \tint ret, i;\n>  \n>  \tif (!of_device_is_available(pdev->dev.of_node))\n> @@ -505,13 +523,18 @@ static int axp20x_pctl_probe(struct platform_device *pdev)\n>  \tpctl->chip.set\t\t\t= axp20x_gpio_set;\n>  \tpctl->chip.direction_input\t= axp20x_gpio_input;\n>  \tpctl->chip.direction_output\t= axp20x_gpio_output;\n> -\tpctl->chip.ngpio\t\t= 3;\n>  \n>  \tpctl->regmap = axp20x->regmap;\n>  \n> -\tpctl->desc = &axp20x_pinctrl_data;\n> -\tpctl->gpio_status_offset = 4;\n> +\tif (of_device_is_compatible(np, \"x-powers,axp209-gpio\")) {\n> +\t\tpctl->desc = &axp20x_pinctrl_data;\n> +\t\tpctl->gpio_status_offset = 4;\n> +\t} else {\n> +\t\tpctl->desc = &axp813_pinctrl_data;\n> +\t\tpctl->gpio_status_offset = 0;\n> +\t}\n>  \tpctl->dev = &pdev->dev;\n> +\tpctl->chip.ngpio = pctl->desc->npins;\n\nThis should be part of a structure that would be attached to the\ncompatible.\n\nThanks!\nMaxime","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"OPt+ziX4\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1hGs0gMpz9tXq\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 23:13:41 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpg9-0006Fx-GY; Tue, 26 Sep 2017 13:13:37 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpg4-000649-RX for linux-arm-kernel@lists.infradead.org;\n\tTue, 26 Sep 2017 13:13:35 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 1FE7E20858; Tue, 26 Sep 2017 15:13:06 +0200 (CEST)","from localhost (unknown [195.81.232.10])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id E94A1207E1;\n\tTue, 26 Sep 2017 15:12:55 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=P45o/wSxHRPa2jm4aREWDWIDxySVt8bcNMbOHAxPpXA=;\n\tb=OPt+ziX4qiSoumQHSE+thQ6D2\n\tt7mo5scO+yIPi3eT9GzlAu0KATgmu8y1WXcp1Wrwxofa0klMUMImltxI75v8CkpBSHX0RU+MioGVQ\n\tudoLapFKkow6MbSQyfbyOoKA7IOUHbGVcw2Mr0gHzEKjiZa7UkktBR6utlWMgPoT3LOwu9BCUHQU7\n\tTDUwDh9PL3cjRUxeleQ/9aBJUUOTntot/EwOjCDDiOV6ZIYmK52oCmZKC/TBu4kMLiVscNYu6iWYG\n\tJN9QI1CkqOaxA+rHyCyiDnU+nxd/H9aoNhMLf/21kVrmWmaHOnRpBVvQ5WXhzj+RwktutArbNWAFb\n\t+avMtVd/A==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT\n\tshortcircuit=ham autolearn=disabled version=3.4.0","Date":"Tue, 26 Sep 2017 15:12:56 +0200","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Quentin Schulz <quentin.schulz@free-electrons.com>","Subject":"Re: [PATCH v2 06/10] pinctrl: axp209: add support for AXP813 GPIOs","Message-ID":"<20170926131256.bqfzgqs2k63liqjj@flea>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<b950efcbb2f4d399812591cdf5dce11d0d35b42b.1506428208.git-series.quentin.schulz@free-electrons.com>","MIME-Version":"1.0","In-Reply-To":"<b950efcbb2f4d399812591cdf5dce11d0d35b42b.1506428208.git-series.quentin.schulz@free-electrons.com>","User-Agent":"NeoMutt/20170914 (1.9.0)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170926_061333_184495_D1420CAB ","X-CRM114-Status":"GOOD (  18.98  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"mark.rutland@arm.com, devicetree@vger.kernel.org,\n\tlinus.walleij@linaro.org, \n\tlinux-sunxi@googlegroups.com, linux@armlinux.org.uk,\n\tlinux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, wens@csie.org, \n\trobh+dt@kernel.org, lee.jones@linaro.org,\n\tthomas.petazzoni@free-electrons.com, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============2739653190777357286==\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1775481,"web_url":"http://patchwork.ozlabs.org/comment/1775481/","msgid":"<20170926131445.xo2uawiovjtmyivj@flea>","list_archive_url":null,"date":"2017-09-26T13:14:45","subject":"Re: [PATCH v2 07/10] mfd: axp20x: add pinctrl cell for AXP813","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/people/12916/","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"content":"On Tue, Sep 26, 2017 at 12:17:17PM +0000, Quentin Schulz wrote:\n> As pinctrl and GPIO driver now supports AXP813, add a cell for it.\n> \n> Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>\n> ---\n>  drivers/mfd/axp20x.c | 3 +++\n>  1 file changed, 3 insertions(+)\n> \n> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c\n> index 336de66..a457528 100644\n> --- a/drivers/mfd/axp20x.c\n> +++ b/drivers/mfd/axp20x.c\n> @@ -876,6 +876,9 @@ static struct mfd_cell axp813_cells[] = {\n>  \t\t.name\t\t\t= \"axp221-pek\",\n>  \t\t.num_resources\t\t= ARRAY_SIZE(axp803_pek_resources),\n>  \t\t.resources\t\t= axp803_pek_resources,\n> +\t}, {\n> +\t\t.name\t\t\t= \"axp20x-gpio\",\n> +\t\t.of_compatible\t\t= \"x-powers,axp813-pctl\",\n\nThis was probably introduced in the previous driver, but why are you\nusing the pctl suffix? Can't we just use the GPIO one to remain\nconsistent with the previous users and the datasheet?\n\nThanks!\nMaxime","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"NgsTLd9m\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1hJt1ZxSz9tXn\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 23:15:26 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwphp-0008Kp-8b; Tue, 26 Sep 2017 13:15:21 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwphk-0006v4-4o for linux-arm-kernel@lists.infradead.org;\n\tTue, 26 Sep 2017 13:15:18 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 94442207D6; Tue, 26 Sep 2017 15:14:54 +0200 (CEST)","from localhost (unknown [195.81.232.10])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 6FEA8207C8;\n\tTue, 26 Sep 2017 15:14:44 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=/gcXoAJ/ku01BmFsDHnXdfIKIIDA8iq+X3yYBdq/B6w=;\n\tb=NgsTLd9mNBabxNgngX/LeBneL\n\tNn87HFYP5/0qrEdbfpc0E9X64SpwgYAdu6hSK4i6RLSugwAhGssnh7CubDrtrMBDgDjQORtdUdpvK\n\tpvBkis36FBPmSIE1jARNP5PNRzA8RLEIwmWzWQUoUeRhnIKrs49EAY//lZZ5RBqyiutS+Sry12+wV\n\thTuWx1/v6prBH5ZlJhyNEugGkBq04KCtuE180uf8Mvan5gNNZsCc1nCHKzg73W9sVPG5c7yf1ZtTI\n\tNYIBL0ExK1J3/mPeHvtO4SW6o9y7mkTOBvOD09jI6UTGT41qZicL+bPL3NhNT50oHkIBewcGbXdXK\n\t16i5Fhd1w==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0","Date":"Tue, 26 Sep 2017 15:14:45 +0200","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Quentin Schulz <quentin.schulz@free-electrons.com>","Subject":"Re: [PATCH v2 07/10] mfd: axp20x: add pinctrl cell for AXP813","Message-ID":"<20170926131445.xo2uawiovjtmyivj@flea>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<5345a2e94013f4e4f7b545cd4d84b098bd2fa349.1506428208.git-series.quentin.schulz@free-electrons.com>","MIME-Version":"1.0","In-Reply-To":"<5345a2e94013f4e4f7b545cd4d84b098bd2fa349.1506428208.git-series.quentin.schulz@free-electrons.com>","User-Agent":"NeoMutt/20170914 (1.9.0)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170926_061516_363248_059F9062 ","X-CRM114-Status":"GOOD (  14.08  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"mark.rutland@arm.com, devicetree@vger.kernel.org,\n\tlinus.walleij@linaro.org, \n\tlinux-sunxi@googlegroups.com, linux@armlinux.org.uk,\n\tlinux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, wens@csie.org, \n\trobh+dt@kernel.org, lee.jones@linaro.org,\n\tthomas.petazzoni@free-electrons.com, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============4666493804953482712==\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1775484,"web_url":"http://patchwork.ozlabs.org/comment/1775484/","msgid":"<20170926131609.zifnvdwmdjjae7dq@flea>","list_archive_url":null,"date":"2017-09-26T13:16:09","subject":"Re: [PATCH v2 08/10] ARM: dts: add dtsi for AXP813 PMIC","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/people/12916/","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"content":"On Tue, Sep 26, 2017 at 12:17:18PM +0000, Quentin Schulz wrote:\n> From: Maxime Ripard <maxime.ripard@free-electrons.com>\n> \n> The AXP813 PMIC is used with some Allwinner SoCs. Create a dtsi to\n> include in each board embedding it.\n> \n> Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>\n\nThere must be my Signed-off-by here.\n\nMaxime","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"uE9eKcKo\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1hLT1CqMz9tXn\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 23:16:49 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpjB-0000it-AU; Tue, 26 Sep 2017 13:16:45 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpj6-0000Y5-S3 for linux-arm-kernel@lists.infradead.org;\n\tTue, 26 Sep 2017 13:16:43 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 6CD89207D0; Tue, 26 Sep 2017 15:16:19 +0200 (CEST)","from localhost (unknown [195.81.232.10])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 4A1332074A;\n\tTue, 26 Sep 2017 15:16:09 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=9pV+604yMZBfVMzuGfcE4Y0aXYoQNwvnjBH8WEWbn9s=;\n\tb=uE9eKcKoLQro4QOHjeIvBiPWZ\n\tVNw5wM+ri+n8JTVuBJpuzMWsKK0UaTBtDbar4fqx4ESH7ZhWAn3zNJm5zGB3773XrfJGXC/5y3ItI\n\tPg+c0k1oYLaWy2OGlzE5o2TetB/2yiZz+wvESNnd6uRkvlQy8c/f2PryyWJfNkf+6ztqSreDkwEt8\n\t5xhbak8KtC2zlolAyR+a9lQ2LK6Y+7H6FLgui6Mg2iXfZANVvRWZuSAx7KBjBmPmC3EmpKuu1oj9E\n\tmhAA+KJkbCUolvSoBlL6cjSLrWX9u/4U6ZIkMZficO4qnQGyqo+gxvik1klmMog98CmrRHtGX9UQb\n\tFgCuM7Rog==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0","Date":"Tue, 26 Sep 2017 15:16:09 +0200","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Quentin Schulz <quentin.schulz@free-electrons.com>","Subject":"Re: [PATCH v2 08/10] ARM: dts: add dtsi for AXP813 PMIC","Message-ID":"<20170926131609.zifnvdwmdjjae7dq@flea>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<d0d72d485596fa2b6bb0000c67132c97374798ce.1506428208.git-series.quentin.schulz@free-electrons.com>","MIME-Version":"1.0","In-Reply-To":"<d0d72d485596fa2b6bb0000c67132c97374798ce.1506428208.git-series.quentin.schulz@free-electrons.com>","User-Agent":"NeoMutt/20170914 (1.9.0)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170926_061641_166420_C74F1D35 ","X-CRM114-Status":"UNSURE (   8.28  )","X-CRM114-Notice":"Please train this message.","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"mark.rutland@arm.com, devicetree@vger.kernel.org,\n\tlinus.walleij@linaro.org, \n\tlinux-sunxi@googlegroups.com, linux@armlinux.org.uk,\n\tlinux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, wens@csie.org, \n\trobh+dt@kernel.org, lee.jones@linaro.org,\n\tthomas.petazzoni@free-electrons.com, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============5459570298821957268==\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1775487,"web_url":"http://patchwork.ozlabs.org/comment/1775487/","msgid":"<0ae64e95-ee49-fb4c-e79b-e8c25c86580c@free-electrons.com>","list_archive_url":null,"date":"2017-09-26T13:17:05","subject":"Re: [PATCH v2 03/10] pinctrl: axp209: use drv_data of\n\tpinctrl_pin_desc to store pin reg","submitter":{"id":69366,"url":"http://patchwork.ozlabs.org/api/people/69366/","name":"Quentin Schulz","email":"quentin.schulz@free-electrons.com"},"content":"Hi Maxime,\n\nOn 26/09/2017 15:01, Maxime Ripard wrote:\n> On Tue, Sep 26, 2017 at 12:17:13PM +0000, Quentin Schulz wrote:\n>> Instead of using a function to retrieve each pin's correct control\n>> register, use drv_data within pinctrl_pin_desc to store the ctrl reg.\n>>\n>> Remove axp20x_gpio_get_reg and replace every occurrence by a get from\n>> drv_data.\n> \n> Why do you need to do that? This should be explained.\n> \n\nAgreed that it misses an explanation.\n\nToday, to get a register addr of one of the GPIOs in the PMIC, we\nbasically get the GPIO number and returns the register via this info.\n\nThere are 3 GPIOs in AXP209, 2 in AXP813. I didn't want to have a switch\ncase for the GPIO number and then an if/else inside one of the case to\ncheck if the device is AXP209 or AXP813 in which case we return -EINVAL\ninstead of the GPIO2 reg. With support for new PMIC, we would have a\nbunch of if conditions and complexify the process for something really\nsimple.\n\nIMHO, this also allows easier integration of future PMICs which might\nhave different regs for the GPIOs.\n\nI don't *need* it but I find this solution nicer.\n\nThanks,\nQuentin","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"oNSUezVo\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1hMt07fQz9tXn\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 23:18:02 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpkJ-0001Yb-JJ; Tue, 26 Sep 2017 13:17:55 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpk4-0001Cp-Kl for linux-arm-kernel@lists.infradead.org;\n\tTue, 26 Sep 2017 13:17:50 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 31A6E207AF; Tue, 26 Sep 2017 15:17:19 +0200 (CEST)","from [192.168.0.13] (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr\n\t[90.63.216.87])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id DAB8F20926;\n\tTue, 26 Sep 2017 15:17:08 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=GtDNbYI0vrmemp6JTj/aDRcyDf1xWOcWEi3lsAWakeU=;\n\tb=oNSUezVoTw2R1dimgz68S2guL\n\tBFiGYO/BBJU6CmGQCzEhmHnmDUPeb+ZUHx84rmnDgGxtB8eZ0iA0RKF/ne0CNXGTNX0NnzKOihKZ8\n\tZ38cj/UrNWvffFutt6gNQfNp9eDyYF3Htafp4TqPURHBmkT4rNtmOIycX9DpslXW7xmKE2CQpGWYw\n\tS0sxiXH3ajc5Z8c6KOftmfjjAwLWxkiMDLmsPWQrNVChac27g8qEoO+2Y/p3kl52gA/w358UKtwYE\n\t2OQ+3vFbXMpHYwkwiS07R8+WF+Xhqi0FqLVqIH0AwyyJUGixeYqgF4Y/GmabrPvizAca0oHtTqR8S\n\tRMwB4hjfw==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0","Subject":"Re: [PATCH v2 03/10] pinctrl: axp209: use drv_data of\n\tpinctrl_pin_desc to store pin reg","To":"Maxime Ripard <maxime.ripard@free-electrons.com>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<7993a30fbc2e50a2d228fa0c8fad643c4034b101.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<20170926130108.uibnri32b73elfy6@flea>","From":"Quentin Schulz <quentin.schulz@free-electrons.com>","Message-ID":"<0ae64e95-ee49-fb4c-e79b-e8c25c86580c@free-electrons.com>","Date":"Tue, 26 Sep 2017 15:17:05 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170926130108.uibnri32b73elfy6@flea>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170926_061741_631427_112C6A55 ","X-CRM114-Status":"GOOD (  15.27  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"mark.rutland@arm.com, devicetree@vger.kernel.org,\n\tlinus.walleij@linaro.org, \n\tlinux-sunxi@googlegroups.com, linux@armlinux.org.uk,\n\tlinux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, wens@csie.org, \n\trobh+dt@kernel.org, lee.jones@linaro.org,\n\tthomas.petazzoni@free-electrons.com, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============8810802733571220379==\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1775495,"web_url":"http://patchwork.ozlabs.org/comment/1775495/","msgid":"<20170926132709.od3myumh5xtungvs@flea>","list_archive_url":null,"date":"2017-09-26T13:27:09","subject":"Re: [PATCH v2 02/10] pinctrl: axp209: add pinctrl features","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/people/12916/","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"content":"On Tue, Sep 26, 2017 at 01:08:21PM +0000, Quentin Schulz wrote:\n> Hi Maxime,\n> \n> On 26/09/2017 15:00, Maxime Ripard wrote:\n> > On Tue, Sep 26, 2017 at 12:17:12PM +0000, Quentin Schulz wrote:\n> >> +static const struct axp20x_desc_pin axp209_pins[] = {\n> >> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(0, \"GPIO0\"),\n> >> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n> >> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\"),\n> >> +\t\t   AXP20X_FUNCTION(0x3, \"ldo\"),\n> >> +\t\t   AXP20X_FUNCTION(0x4, \"adc\")),\n> >> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(1, \"GPIO1\"),\n> >> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n> >> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\"),\n> >> +\t\t   AXP20X_FUNCTION(0x3, \"ldo\"),\n> >> +\t\t   AXP20X_FUNCTION(0x4, \"adc\")),\n> >> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(2, \"GPIO2\"),\n> >> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n> >> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\")),\n> >> +};\n> > \n> > If all the functions are the same, and at the same offset, can't we\n> > just hardcode it, instead of having (and duplicate) all the logic\n> > below?\n> > \n> \n> AXP20X_PIN(AXP20X_PINCTRL_PIN(0, \"GPIO0\"),\n> \t\tAXP20X_GPIO_OUT,\n> \t\tAXP20X_GPIO_IN,\n> \t\tAXP20X_LDO,\n> \t\tAXP20X_ADC))\n> \n> That's what you mean?\n\nWhat I mean is:\n\nstatic int axp20x_get_func(char *func)\n{\n\tif (!strcmp(func, \"gpio_out\"))\n\t\treturn 0;\n\n\tif (!strcmp(func, \"gpio_in\"))\n\t\treturn 2;\n \n\tif (!strcmp(func, \"ldo\"))\n \t\treturn 3;\n \n\tif (!strcmp(func, \"adc\"))\n \t\treturn 4;\n\n\treturn -EINVAL;\n}\n\n> >> +\tpctrl_desc = devm_kzalloc(&pdev->dev, sizeof(*pctrl_desc), GFP_KERNEL);\n> >> +\tif (!pctrl_desc)\n> >> +\t\treturn -ENOMEM;\n> >> +\n> >> +\tpctrl_desc->name = dev_name(&pdev->dev);\n> >> +\tpctrl_desc->owner = THIS_MODULE;\n> >> +\tpctrl_desc->pins = pins;\n> >> +\tpctrl_desc->npins = gpio->desc->npins;\n> >> +\tpctrl_desc->pctlops = &axp20x_pctrl_ops;\n> >> +\tpctrl_desc->pmxops = &axp20x_pmx_ops;\n> > \n> > The strict flag needs to be set too in order to avoid concurrent uses\n> > of GPIO and other functions.\n> > \n> \n> Strict is a property of pinmux_ops struct (pmxops) and it is set.\n\nAh, right, my bad.\n\nMaxime","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"ewX2skoO\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1hb806PGz9tXH\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 23:27:48 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwpto-00088c-Di; Tue, 26 Sep 2017 13:27:44 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwptk-0007zZ-Hv for linux-arm-kernel@lists.infradead.org;\n\tTue, 26 Sep 2017 13:27:42 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 0933920858; Tue, 26 Sep 2017 15:27:19 +0200 (CEST)","from localhost (unknown [195.81.232.10])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id D039F20832;\n\tTue, 26 Sep 2017 15:27:08 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=9fZoUcYWBig+vu+w7S09WpblsQAux0gBe0PvWt/v6A0=;\n\tb=ewX2skoOi/cUIa638Pi6FuJlx\n\tTtJwr+b8aM5EcH1ejo/emHYgh0b4JyEkkjmNu3wO0NfaiVPAKg/cAS8fcyc6lNVNofKOvtPh1rKqB\n\thQdufOkqEIESLM3rHGMBEEG5m3vjAY3FOc9KKsndj+TLdhNx0TD4Y9zhHnUaLSC9iUCI1LrqSLWsq\n\tYtk/T8ML63whKb+u29g0mmAXXu5EQszmfcTVgDXDaIQ+1v0OTjtRB/+9tHkpiKOmtAZdU0gtosZ+q\n\tsrR148m+9A3RtV4PzJMBZBDWRD1NlxyGrvJfS6RR/R0MiFVoNRUjkGKki6HyWh5/CcaDhNV/ER73D\n\tz7UoPy0eg==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0","Date":"Tue, 26 Sep 2017 15:27:09 +0200","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Quentin Schulz <quentin.schulz@free-electrons.com>","Subject":"Re: [PATCH v2 02/10] pinctrl: axp209: add pinctrl features","Message-ID":"<20170926132709.od3myumh5xtungvs@flea>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<6b89df1bf07dac2ab295fca5fdf0e55179c47ed6.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<20170926130009.r5isgrjvkwmm44nn@flea>\n\t<5596280a-51bb-7491-31f4-5800219888ad@free-electrons.com>","MIME-Version":"1.0","In-Reply-To":"<5596280a-51bb-7491-31f4-5800219888ad@free-electrons.com>","User-Agent":"NeoMutt/20170914 (1.9.0)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170926_062740_896057_C8F9C64C ","X-CRM114-Status":"GOOD (  13.97  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"mark.rutland@arm.com, devicetree@vger.kernel.org,\n\tlinus.walleij@linaro.org, \n\tlinux-sunxi@googlegroups.com, linux@armlinux.org.uk,\n\tlinux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, wens@csie.org, \n\trobh+dt@kernel.org, lee.jones@linaro.org,\n\tthomas.petazzoni@free-electrons.com, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============2076362376104458781==\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1775510,"web_url":"http://patchwork.ozlabs.org/comment/1775510/","msgid":"<0bc7efe6-8d0e-ddae-617b-36e4357f76ce@free-electrons.com>","list_archive_url":null,"date":"2017-09-26T13:37:37","subject":"Re: [PATCH v2 02/10] pinctrl: axp209: add pinctrl features","submitter":{"id":69366,"url":"http://patchwork.ozlabs.org/api/people/69366/","name":"Quentin Schulz","email":"quentin.schulz@free-electrons.com"},"content":"On 26/09/2017 15:27, Maxime Ripard wrote:\n> On Tue, Sep 26, 2017 at 01:08:21PM +0000, Quentin Schulz wrote:\n>> Hi Maxime,\n>>\n>> On 26/09/2017 15:00, Maxime Ripard wrote:\n>>> On Tue, Sep 26, 2017 at 12:17:12PM +0000, Quentin Schulz wrote:\n>>>> +static const struct axp20x_desc_pin axp209_pins[] = {\n>>>> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(0, \"GPIO0\"),\n>>>> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n>>>> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\"),\n>>>> +\t\t   AXP20X_FUNCTION(0x3, \"ldo\"),\n>>>> +\t\t   AXP20X_FUNCTION(0x4, \"adc\")),\n>>>> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(1, \"GPIO1\"),\n>>>> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n>>>> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\"),\n>>>> +\t\t   AXP20X_FUNCTION(0x3, \"ldo\"),\n>>>> +\t\t   AXP20X_FUNCTION(0x4, \"adc\")),\n>>>> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(2, \"GPIO2\"),\n>>>> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n>>>> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\")),\n>>>> +};\n>>>\n>>> If all the functions are the same, and at the same offset, can't we\n>>> just hardcode it, instead of having (and duplicate) all the logic\n>>> below?\n>>>\n>>\n>> AXP20X_PIN(AXP20X_PINCTRL_PIN(0, \"GPIO0\"),\n>> \t\tAXP20X_GPIO_OUT,\n>> \t\tAXP20X_GPIO_IN,\n>> \t\tAXP20X_LDO,\n>> \t\tAXP20X_ADC))\n>>\n>> That's what you mean?\n> \n> What I mean is:\n> \n> static int axp20x_get_func(char *func)\n> {\n> \tif (!strcmp(func, \"gpio_out\"))\n> \t\treturn 0;\n> \n> \tif (!strcmp(func, \"gpio_in\"))\n> \t\treturn 2;\n>  \n> \tif (!strcmp(func, \"ldo\"))\n>  \t\treturn 3;\n>  \n> \tif (!strcmp(func, \"adc\"))\n>  \t\treturn 4;\n> \n> \treturn -EINVAL;\n> }\n> \n\nGPIO2 on AXP209 does not support ldo nor adc.\nGPIO1 on AXP813 does not support adc.\n\nI find it more complex to handle those two cases in a function than by\nhardcoding it in structures like above.\n\nMoreover, nothing tells us that it would be the same offset for other PMICs.\n\nQuentin","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"VRESIyRQ\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1hqL3fLdz9tXK\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 23:38:22 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwq40-0007Cp-Um; Tue, 26 Sep 2017 13:38:16 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwq3w-00074Q-Bm for linux-arm-kernel@lists.infradead.org;\n\tTue, 26 Sep 2017 13:38:14 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid AA3F92091B; Tue, 26 Sep 2017 15:37:50 +0200 (CEST)","from [192.168.0.13] (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr\n\t[90.63.216.87])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 56B0720911;\n\tTue, 26 Sep 2017 15:37:40 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=LXoyQRQtOr78lQWwlNVC1uwtZmYgNUfX86I7HwsocMw=;\n\tb=VRESIyRQTmaVJWhc2xtR3dytR\n\txU9aIRGcbNgsHbYrfkuhTaivHLAg8158oPL8nFnXrra8oFbuYRIAE28Nve4iJwGu75FiDvNvoMlud\n\tpFRYtTXrh1tTSMGYbNAbwRSUkwDtQa0R9DyquKwOGJoUtujzq95zbV2mFXF+XoizIHwk9b+iq+YuD\n\trtvuFVE+iqVnQ4L4SIfyEBWJk+W1ZAigcuKfMvJSid4yOdlXd5ziIF2sO3NapU38rRjXY92x9ZuFR\n\txLNqkZFOsaOEq0JfwCFqhJGocA+IL/HvBTvCUR3MIB9DZnfNmCVQpTS928HOAESdc72Kb+UW03Cd8\n\tYETizClOQ==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0","Subject":"Re: [PATCH v2 02/10] pinctrl: axp209: add pinctrl features","To":"Maxime Ripard <maxime.ripard@free-electrons.com>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<6b89df1bf07dac2ab295fca5fdf0e55179c47ed6.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<20170926130009.r5isgrjvkwmm44nn@flea>\n\t<5596280a-51bb-7491-31f4-5800219888ad@free-electrons.com>\n\t<20170926132709.od3myumh5xtungvs@flea>","From":"Quentin Schulz <quentin.schulz@free-electrons.com>","Message-ID":"<0bc7efe6-8d0e-ddae-617b-36e4357f76ce@free-electrons.com>","Date":"Tue, 26 Sep 2017 15:37:37 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170926132709.od3myumh5xtungvs@flea>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170926_063812_768137_C9C45153 ","X-CRM114-Status":"GOOD (  13.35  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"mark.rutland@arm.com, devicetree@vger.kernel.org,\n\tlinus.walleij@linaro.org, \n\tlinux-sunxi@googlegroups.com, linux@armlinux.org.uk,\n\tlinux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, wens@csie.org, \n\trobh+dt@kernel.org, lee.jones@linaro.org,\n\tthomas.petazzoni@free-electrons.com, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============0034834655161090146==\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1775525,"web_url":"http://patchwork.ozlabs.org/comment/1775525/","msgid":"<20170926134527.kmhpxn4ysfmvdulf@flea>","list_archive_url":null,"date":"2017-09-26T13:45:27","subject":"Re: [PATCH v2 03/10] pinctrl: axp209: use drv_data of\n\tpinctrl_pin_desc to store pin reg","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/people/12916/","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"content":"On Tue, Sep 26, 2017 at 01:17:05PM +0000, Quentin Schulz wrote:\n> Hi Maxime,\n> \n> On 26/09/2017 15:01, Maxime Ripard wrote:\n> > On Tue, Sep 26, 2017 at 12:17:13PM +0000, Quentin Schulz wrote:\n> >> Instead of using a function to retrieve each pin's correct control\n> >> register, use drv_data within pinctrl_pin_desc to store the ctrl reg.\n> >>\n> >> Remove axp20x_gpio_get_reg and replace every occurrence by a get from\n> >> drv_data.\n> > \n> > Why do you need to do that? This should be explained.\n> > \n> \n> Agreed that it misses an explanation.\n> \n> Today, to get a register addr of one of the GPIOs in the PMIC, we\n> basically get the GPIO number and returns the register via this info.\n> \n> There are 3 GPIOs in AXP209, 2 in AXP813. I didn't want to have a switch\n> case for the GPIO number and then an if/else inside one of the case to\n> check if the device is AXP209 or AXP813 in which case we return -EINVAL\n> instead of the GPIO2 reg. With support for new PMIC, we would have a\n> bunch of if conditions and complexify the process for something really\n> simple.\n\nI'm not sure how that relates to your code actually. The only thing\nthat patch is doing is to move the register offset from a function to\nthe structure associated to the pin.\n\nHowever, even in the AXP813 case, you're using exactly the same\nvalues, so that's not really needed.\n\nNow, you also mentionned the pin number. While this patch doesn't\nreally address it, it's also no really needed. The number of pins is\nalready known and registered in the GPIO framework. If the framework\ndoesn't already do it (which would be surprising), you can just check\nthat the pin number passed is not going to be higher than the one you\nregistered.\n\n> IMHO, this also allows easier integration of future PMICs which might\n> have different regs for the GPIOs.\n\nLet's worry about future PMICs in the future.\n\nMaxime","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"AMDe95DG\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1j0H5dfnz9s81\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 23:46:07 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwqBY-0003gu-1k; Tue, 26 Sep 2017 13:46:04 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwqBU-0003VO-46 for linux-arm-kernel@lists.infradead.org;\n\tTue, 26 Sep 2017 13:46:02 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 7B308208F1; Tue, 26 Sep 2017 15:45:37 +0200 (CEST)","from localhost (unknown [195.81.232.10])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 5433720807;\n\tTue, 26 Sep 2017 15:45:27 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=u/6S8Q1ZTTfWwNsV2nz17MZ78NWLJTRyVYi1mpJEw5Y=;\n\tb=AMDe95DGGD6UjXHl9GiSFu8TV\n\t9AIsuxaDIyYG5h8ba+ecCENVXeVOBhYjrWXsRM6v3hxAcJbYGBYwCxbUCb99dcdfZuf49scIx9bR1\n\trjKL2hcWP9lH3HXoaPLVdBEv8w3j2ahYgfP1eWbs8jjZqdYxopE4NunKClm6IN9QhRRRaaduvC8mV\n\t2WGH3PW/IcWb+7kIhE1f3kvpPflOstgigHggwK+HFND1/FAPiWSdA16fS1K34YgtOwOJmA1tBBsfN\n\tZZpoZDWOay7qwl/u67bVC2KcKquWtDQEz3BxiZtaNOtvYWpo3bTPJIAH2JvcGBF42CB8CILLITc3n\n\tQYKUKugzg==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0","Date":"Tue, 26 Sep 2017 15:45:27 +0200","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Quentin Schulz <quentin.schulz@free-electrons.com>","Subject":"Re: [PATCH v2 03/10] pinctrl: axp209: use drv_data of\n\tpinctrl_pin_desc to store pin reg","Message-ID":"<20170926134527.kmhpxn4ysfmvdulf@flea>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<7993a30fbc2e50a2d228fa0c8fad643c4034b101.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<20170926130108.uibnri32b73elfy6@flea>\n\t<0ae64e95-ee49-fb4c-e79b-e8c25c86580c@free-electrons.com>","MIME-Version":"1.0","In-Reply-To":"<0ae64e95-ee49-fb4c-e79b-e8c25c86580c@free-electrons.com>","User-Agent":"NeoMutt/20170914 (1.9.0)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170926_064600_477854_75A822D5 ","X-CRM114-Status":"GOOD (  19.92  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"mark.rutland@arm.com, devicetree@vger.kernel.org,\n\tlinus.walleij@linaro.org, \n\tlinux-sunxi@googlegroups.com, linux@armlinux.org.uk,\n\tlinux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, wens@csie.org, \n\trobh+dt@kernel.org, lee.jones@linaro.org,\n\tthomas.petazzoni@free-electrons.com, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============0618967302228915374==\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1775541,"web_url":"http://patchwork.ozlabs.org/comment/1775541/","msgid":"<CAGb2v674xOzsn5+ixZuz8-i4_FfKQ7XF9kNBX+1WPVnASJbqqA@mail.gmail.com>","list_archive_url":null,"date":"2017-09-26T13:53:12","subject":"Re: [PATCH v2 08/10] ARM: dts: add dtsi for AXP813 PMIC","submitter":{"id":47154,"url":"http://patchwork.ozlabs.org/api/people/47154/","name":"Chen-Yu Tsai","email":"wens@csie.org"},"content":"On Tue, Sep 26, 2017 at 8:17 PM, Quentin Schulz\n<quentin.schulz@free-electrons.com> wrote:\n> From: Maxime Ripard <maxime.ripard@free-electrons.com>\n>\n> The AXP813 PMIC is used with some Allwinner SoCs. Create a dtsi to\n> include in each board embedding it.\n>\n> Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>\n> ---\n>  arch/arm/boot/dts/axp813.dtsi | 58 ++++++++++++++++++++++++++++++++++++-\n>  1 file changed, 58 insertions(+)\n>  create mode 100644 arch/arm/boot/dts/axp813.dtsi\n>\n> diff --git a/arch/arm/boot/dts/axp813.dtsi b/arch/arm/boot/dts/axp813.dtsi\n> new file mode 100644\n> index 0000000..e7f95e8\n> --- /dev/null\n> +++ b/arch/arm/boot/dts/axp813.dtsi\n> @@ -0,0 +1,58 @@\n> +/*\n> + * Copyright 2017 Free Electrons\n> + *\n> + * Quentin Schulz <quentin.schulz@free-electrons.com>\n> + *\n> + * This file is dual-licensed: you can use it either under the terms\n> + * of the GPL or the X11 license, at your option. Note that this dual\n> + * licensing only applies to this file, and not this project as a\n> + * whole.\n> + *\n> + *  a) This file is free software; you can redistribute it and/or\n> + *     modify it under the terms of the GNU General Public License as\n> + *     published by the Free Software Foundation; either version 2 of the\n> + *     License, or (at your option) any later version.\n> + *\n> + *     This file is distributed in the hope that it will be useful,\n> + *     but WITHOUT ANY WARRANTY; without even the implied warranty of\n> + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n> + *     GNU General Public License for more details.\n> + *\n> + * Or, alternatively,\n> + *\n> + *  b) Permission is hereby granted, free of charge, to any person\n> + *     obtaining a copy of this software and associated documentation\n> + *     files (the \"Software\"), to deal in the Software without\n> + *     restriction, including without limitation the rights to use,\n> + *     copy, modify, merge, publish, distribute, sublicense, and/or\n> + *     sell copies of the Software, and to permit persons to whom the\n> + *     Software is furnished to do so, subject to the following\n> + *     conditions:\n> + *\n> + *     The above copyright notice and this permission notice shall be\n> + *     included in all copies or substantial portions of the Software.\n> + *\n> + *     THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n> + *     OTHER DEALINGS IN THE SOFTWARE.\n> + */\n> +\n> +/*\n> + * AXP813 Integrated Power Management Chip\n> + */\n> +\n> +&axp813 {\n\nI'd like to name the label axp81x instead. And possibly the filename as well.\n\nSee https://github.com/wens/linux/commit/05b9ca82c795816f7f2569ce96dc35b62487f89c\n\nChenYu\n\n> +       interrupt-controller;\n> +       #interrupt-cells = <1>;\n> +\n> +       axp_pctl: axp_pctl {\n> +               compatible = \"x-powers,axp813-pctl\";\n> +               gpio-controller;\n> +               #gpio-cells = <2>;\n> +       };\n> +};\n> --\n> git-series 0.9.1","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"qeeZInKN\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1j9b5rk9z9sPr\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 23:54:11 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwqJM-0001J8-IE; Tue, 26 Sep 2017 13:54:08 +0000","from smtp.csie.ntu.edu.tw ([140.112.30.61])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwqJI-0000pq-9r for linux-arm-kernel@lists.infradead.org;\n\tTue, 26 Sep 2017 13:54:07 +0000","from mail-wm0-f45.google.com (mail-wm0-f45.google.com\n\t[74.125.82.45])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits))\n\t(No client certificate requested) (Authenticated sender: b93043)\n\tby smtp.csie.ntu.edu.tw (Postfix) with ESMTPSA id 06BDE20459\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tTue, 26 Sep 2017 21:53:36 +0800 (CST)","by mail-wm0-f45.google.com with SMTP id b195so8143927wmb.5\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tTue, 26 Sep 2017 06:53:35 -0700 (PDT)","by 10.223.196.226 with HTTP; Tue, 26 Sep 2017 06:53:12 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:\n\tReferences:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=rP2LgjlEY7jXN+35vSBcF65iQp275G/8juAItQEl9eg=;\n\tb=qeeZInKNHEKgiS\n\ttnOH0WFyhWHQ7hL/iTAMW0PSIg2h63Y/1uojPScSCNKA2ixCGCNJalHEbpi+cX4n3pkK87YNqTlb3\n\tfOxicvo24SFr3+SbE8eVlb5mPV677WDPZQ0pjZQc23wxYDSpctmFhcK5BV8h6WtenQC8VRrClC5HQ\n\tltUZl9FBvBG4/9MgJcMsqFL03wTWu96mEWQcnVCVwPnjrmppr4mn6N09pJ6pxoKijKEXA7cx3kJr0\n\tUUYdIhz2kAfF79PDHbL+rmMCqtQ5thkvQ4ywIb904eH3G2xq5u/vvxrXP1af6gc33gvt5fbg9NiEe\n\t5EtCX4oO5JnzQBNQWc1g==;","X-Gm-Message-State":"AHPjjUg8AKJb+sYduHkR4d9FTrTYUB1WTDu2WOi14YPdeazFq6P8R+Qo\n\tuAqy3NVNFdWFbda3fYxcwAIw6QZKC6AF1FuWgf4=","X-Google-Smtp-Source":"AOwi7QCMZa9paLrUTOkS0YCuDVB1SWN50gypoehUJQojyp0afNdKIE8ApxhvXBmt8HrpDOA8rxB+TN8PGOUVQ7PPOig=","X-Received":"by 10.28.237.17 with SMTP id l17mr2350230wmh.99.1506434012623;\n\tTue, 26 Sep 2017 06:53:32 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<d0d72d485596fa2b6bb0000c67132c97374798ce.1506428208.git-series.quentin.schulz@free-electrons.com>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<d0d72d485596fa2b6bb0000c67132c97374798ce.1506428208.git-series.quentin.schulz@free-electrons.com>","From":"Chen-Yu Tsai <wens@csie.org>","Date":"Tue, 26 Sep 2017 21:53:12 +0800","X-Gmail-Original-Message-ID":"<CAGb2v674xOzsn5+ixZuz8-i4_FfKQ7XF9kNBX+1WPVnASJbqqA@mail.gmail.com>","Message-ID":"<CAGb2v674xOzsn5+ixZuz8-i4_FfKQ7XF9kNBX+1WPVnASJbqqA@mail.gmail.com>","Subject":"Re: [PATCH v2 08/10] ARM: dts: add dtsi for AXP813 PMIC","To":"Quentin Schulz <quentin.schulz@free-electrons.com>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170926_065404_658740_F69E04EB ","X-CRM114-Status":"GOOD (  20.67  )","X-Spam-Score":"-2.8 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.8 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\n\tmedium trust [140.112.30.61 listed in list.dnswl.org]\n\t1.4 RCVD_IN_BRBL_LASTEXT   RBL: No description available.\n\t[140.112.30.61 listed in bb.barracudacentral.org]\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>,\n\tdevicetree <devicetree@vger.kernel.org>,\n\tLinus Walleij <linus.walleij@linaro.org>,\n\tlinux-sunxi <linux-sunxi@googlegroups.com>,\n\tRussell King <linux@armlinux.org.uk>,\n\tlinux-kernel <linux-kernel@vger.kernel.org>,\n\t\"linux-gpio@vger.kernel.org\" <linux-gpio@vger.kernel.org>,\n\tChen-Yu Tsai <wens@csie.org>, Rob Herring <robh+dt@kernel.org>,\n\tMaxime Ripard <maxime.ripard@free-electrons.com>,\n\tLee Jones <lee.jones@linaro.org>,\n\tThomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\tlinux-arm-kernel <linux-arm-kernel@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1776182,"web_url":"http://patchwork.ozlabs.org/comment/1776182/","msgid":"<20170927092815.4y57ej5qbilioxr5@flea>","list_archive_url":null,"date":"2017-09-27T09:28:15","subject":"Re: [PATCH v2 02/10] pinctrl: axp209: add pinctrl features","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/people/12916/","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"content":"On Tue, Sep 26, 2017 at 01:37:37PM +0000, Quentin Schulz wrote:\n> On 26/09/2017 15:27, Maxime Ripard wrote:\n> > On Tue, Sep 26, 2017 at 01:08:21PM +0000, Quentin Schulz wrote:\n> >> Hi Maxime,\n> >>\n> >> On 26/09/2017 15:00, Maxime Ripard wrote:\n> >>> On Tue, Sep 26, 2017 at 12:17:12PM +0000, Quentin Schulz wrote:\n> >>>> +static const struct axp20x_desc_pin axp209_pins[] = {\n> >>>> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(0, \"GPIO0\"),\n> >>>> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n> >>>> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\"),\n> >>>> +\t\t   AXP20X_FUNCTION(0x3, \"ldo\"),\n> >>>> +\t\t   AXP20X_FUNCTION(0x4, \"adc\")),\n> >>>> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(1, \"GPIO1\"),\n> >>>> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n> >>>> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\"),\n> >>>> +\t\t   AXP20X_FUNCTION(0x3, \"ldo\"),\n> >>>> +\t\t   AXP20X_FUNCTION(0x4, \"adc\")),\n> >>>> +\tAXP20X_PIN(AXP20X_PINCTRL_PIN(2, \"GPIO2\"),\n> >>>> +\t\t   AXP20X_FUNCTION(0x0, \"gpio_out\"),\n> >>>> +\t\t   AXP20X_FUNCTION(0x2, \"gpio_in\")),\n> >>>> +};\n> >>>\n> >>> If all the functions are the same, and at the same offset, can't we\n> >>> just hardcode it, instead of having (and duplicate) all the logic\n> >>> below?\n> >>>\n> >>\n> >> AXP20X_PIN(AXP20X_PINCTRL_PIN(0, \"GPIO0\"),\n> >> \t\tAXP20X_GPIO_OUT,\n> >> \t\tAXP20X_GPIO_IN,\n> >> \t\tAXP20X_LDO,\n> >> \t\tAXP20X_ADC))\n> >>\n> >> That's what you mean?\n> > \n> > What I mean is:\n> > \n> > static int axp20x_get_func(char *func)\n> > {\n> > \tif (!strcmp(func, \"gpio_out\"))\n> > \t\treturn 0;\n> > \n> > \tif (!strcmp(func, \"gpio_in\"))\n> > \t\treturn 2;\n> >  \n> > \tif (!strcmp(func, \"ldo\"))\n> >  \t\treturn 3;\n> >  \n> > \tif (!strcmp(func, \"adc\"))\n> >  \t\treturn 4;\n> > \n> > \treturn -EINVAL;\n> > }\n> > \n> \n> GPIO2 on AXP209 does not support ldo nor adc.\n> GPIO1 on AXP813 does not support adc.\n\nRight, and surely that can be caught as well. This was a global\napproach. You could add a bitmap for example to encode whether ldo and\nadc are available. It takes two bytes, and two or operations.\n\n> I find it more complex to handle those two cases in a function than by\n> hardcoding it in structures like above.\n\nYou find more complex to add a 10 lines function than 450 lines of\ncode that you ripped off from another driver, that generates 4\nstructures many structures (groups, functions, pins and pins'\nfunctions) and will provide three different lookup methods? Really? :)\n\nIt's way overkill for that driver. Most of these lists can be\nhardcoded as well.\n\n> Moreover, nothing tells us that it would be the same offset for\n> other PMICs.\n\nAgain, let's worry about those PMICs when we'll need to support\nthem. Unless you already have an example in mind of course. Otherwise,\nit's just building things on theories that have never been proven (and\nmight never be).\n\nMaxime","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"bwDaBqts\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y2CF64XdBz9tXT\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tWed, 27 Sep 2017 19:28:56 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dx8eA-0003tG-Rk; Wed, 27 Sep 2017 09:28:50 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dx8e6-0003dt-9R for linux-arm-kernel@lists.infradead.org;\n\tWed, 27 Sep 2017 09:28:48 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid A4391207C0; Wed, 27 Sep 2017 11:28:24 +0200 (CEST)","from localhost (unknown [195.81.232.10])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 8022920774;\n\tWed, 27 Sep 2017 11:28:14 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=mhVGDmzOBLq5bo1AdoQQBDoc7J7wliVHoJvFK1Zablw=;\n\tb=bwDaBqtsF5TRA6fPmUcJx++2y\n\tGhSL5hkMdK31+ewsg6e8TdscYbEuP95Ue9M1Oo49wuEF6LhPvmJMbtct0/MkPQEklD7XDXeVqPKZL\n\tPG2Jg+C23NSDN7zbTUpUbMgWBc6PKg7ihtyLLlI0IsXknxjdPP7oFjwjpKzPwynTT/xf/kZaSVnTB\n\tmxW8A7wYl3cbM2Gn59BTmmIw6Jt66jPgXmNhN+/3q2E4HtoUPkpmq0xaOaccZ1UYjTh4S+SdBhqN+\n\tWQDXxah335Ux6kudGtIsQAQ8uDusGEzIxDqVCrDVZuhYckQBifluKqO3uJke0asxgddDeiyyfFc6S\n\tsPb5/juRA==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT\n\tshortcircuit=ham autolearn=disabled version=3.4.0","Date":"Wed, 27 Sep 2017 11:28:15 +0200","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Quentin Schulz <quentin.schulz@free-electrons.com>","Subject":"Re: [PATCH v2 02/10] pinctrl: axp209: add pinctrl features","Message-ID":"<20170927092815.4y57ej5qbilioxr5@flea>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<6b89df1bf07dac2ab295fca5fdf0e55179c47ed6.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<20170926130009.r5isgrjvkwmm44nn@flea>\n\t<5596280a-51bb-7491-31f4-5800219888ad@free-electrons.com>\n\t<20170926132709.od3myumh5xtungvs@flea>\n\t<0bc7efe6-8d0e-ddae-617b-36e4357f76ce@free-electrons.com>","MIME-Version":"1.0","In-Reply-To":"<0bc7efe6-8d0e-ddae-617b-36e4357f76ce@free-electrons.com>","User-Agent":"NeoMutt/20170914 (1.9.0)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170927_022846_698916_574A1CE8 ","X-CRM114-Status":"GOOD (  15.48  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"mark.rutland@arm.com, devicetree@vger.kernel.org,\n\tlinus.walleij@linaro.org, \n\tlinux-sunxi@googlegroups.com, linux@armlinux.org.uk,\n\tlinux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, wens@csie.org, \n\trobh+dt@kernel.org, lee.jones@linaro.org,\n\tthomas.petazzoni@free-electrons.com, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============0078457240192962326==\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1777240,"web_url":"http://patchwork.ozlabs.org/comment/1777240/","msgid":"<20170928190614.v5jgejvgdlyxbxrh@dell>","list_archive_url":null,"date":"2017-09-28T19:06:14","subject":"Re: [PATCH v2 07/10] mfd: axp20x: add pinctrl cell for AXP813","submitter":{"id":12720,"url":"http://patchwork.ozlabs.org/api/people/12720/","name":"Lee Jones","email":"lee.jones@linaro.org"},"content":"On Tue, 26 Sep 2017, Maxime Ripard wrote:\n\n> On Tue, Sep 26, 2017 at 12:17:17PM +0000, Quentin Schulz wrote:\n> > As pinctrl and GPIO driver now supports AXP813, add a cell for it.\n> > \n> > Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>\n> > ---\n> >  drivers/mfd/axp20x.c | 3 +++\n> >  1 file changed, 3 insertions(+)\n> > \n> > diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c\n> > index 336de66..a457528 100644\n> > --- a/drivers/mfd/axp20x.c\n> > +++ b/drivers/mfd/axp20x.c\n> > @@ -876,6 +876,9 @@ static struct mfd_cell axp813_cells[] = {\n> >  \t\t.name\t\t\t= \"axp221-pek\",\n> >  \t\t.num_resources\t\t= ARRAY_SIZE(axp803_pek_resources),\n> >  \t\t.resources\t\t= axp803_pek_resources,\n> > +\t}, {\n> > +\t\t.name\t\t\t= \"axp20x-gpio\",\n> > +\t\t.of_compatible\t\t= \"x-powers,axp813-pctl\",\n> \n> This was probably introduced in the previous driver, but why are you\n> using the pctl suffix? Can't we just use the GPIO one to remain\n> consistent with the previous users and the datasheet?\n\nRight.  Pinctrl is a Linuxisum.  GPIO sounds more appropriate.","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"nhkdArzw\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"jIJQfhSa\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y341P2nyXz9tX8\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tFri, 29 Sep 2017 05:06:49 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dxe90-0002KB-4X; Thu, 28 Sep 2017 19:06:46 +0000","from mail-pf0-x22e.google.com ([2607:f8b0:400e:c00::22e])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dxe8v-0002IA-32 for linux-arm-kernel@lists.infradead.org;\n\tThu, 28 Sep 2017 19:06:43 +0000","by mail-pf0-x22e.google.com with SMTP id u12so1312770pfl.4\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tThu, 28 Sep 2017 12:06:19 -0700 (PDT)","from dell ([70.35.39.2]) by smtp.gmail.com with ESMTPSA id\n\tb63sm4029766pga.27.2017.09.28.12.06.16\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 28 Sep 2017 12:06:17 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=Q6fiwTO9GBK51tnHNv/+HclxmT6KinIrXLJlO1cEzfE=;\n\tb=nhkdArzwUrpmtI\n\t9x4KidxF1PZh2issstAhPD/HpwgOZ4BA5EVTRhmr9/5TMCsi9/2ZLfTzNEqWM51+ebMgKP9haJFXI\n\tVYYzVRSDX4LgZ+/5TfASzWSkCNET8T4FdYLr1eCR6CH4K+KLSpTOJCKjmoR9/p6ferrfisH8hG53q\n\tEIi0Ebgtg95ltqPAkuxtChChghfbA2YLC0bK0ZSkRtaozssmyhe8f9WMWnBNBitqQ9xxePFQhQu4b\n\t5p67e6pwrttimHz1efu27ykbpEUY11xhq3plmfn2W4mG8F3EmoF1+Q9+kM/VeB1Ni4A66ucFUwlM3\n\tRZPBYRnQ+AabNUcSODpA==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=0m7pz1emTi+K8C4EeniVTz93qHIJAYv4P49Yi5zRJQ8=;\n\tb=jIJQfhSa4lrapSPR2YBZQHpEeNNp+hJnb+qWhf+9N+PiRAt2P87taKY8e4JodYLUh7\n\tJshKUNSK2DBKD0VZyLKJup6+VK9760eWm/S+WH3gC/hd4MSuKObBlzqo6bgYZL+oksU/\n\tTVCPX7owsKOjrPAR6UyUJYsRH1AiJrdzRljsI="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=0m7pz1emTi+K8C4EeniVTz93qHIJAYv4P49Yi5zRJQ8=;\n\tb=I2CyOCzJYvest/ah9kN/OlzpGBCj8a9C6LDU25u67ps8j+DHdNuEgWw+ZHXUBf1oXd\n\tDrtaCITaH8kylfhklkH2qtCS6VnZXeAhW9/H8aDxHVqQz6hjmJD0CoNE7AlOHmUJqtRI\n\toUGe8Drmz4B91yypmR1NXYoM4vetbPbrRfxuyYidzvwX9vMiwP1UUnhoild/BvF6RIZ8\n\tflF7ERFY7NmqR2zVyVQeyVeMiCyVq8YmZ7YggYu7rU09xPSc9OrThnG6pfs/IVGOsf8K\n\tqEFUksnuh6D/lvtF9irfhEYpfls+W+IS5vjJe+NH27hqWtkWZ2pFoIrc0SsPAVQT9zGT\n\tgreQ==","X-Gm-Message-State":"AHPjjUjFD8U3FKW199zEupgdZHNqZ9/Q2k6Rb/2TeCiFHZWUly4CEjXf\n\tF5oqQkazAqS2mbv2wQiIEydYRQ==","X-Google-Smtp-Source":"AOwi7QDNSDpaSx4+dhUAwV7+PAqn+hoQIt9Pk3DmsaQezWvcTLcU62URHTKoPADr74KluSv9iZuhrA==","X-Received":"by 10.159.198.74 with SMTP id y10mr4781236plt.45.1506625578933; \n\tThu, 28 Sep 2017 12:06:18 -0700 (PDT)","Date":"Thu, 28 Sep 2017 20:06:14 +0100","From":"Lee Jones <lee.jones@linaro.org>","To":"Maxime Ripard <maxime.ripard@free-electrons.com>","Subject":"Re: [PATCH v2 07/10] mfd: axp20x: add pinctrl cell for AXP813","Message-ID":"<20170928190614.v5jgejvgdlyxbxrh@dell>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<5345a2e94013f4e4f7b545cd4d84b098bd2fa349.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<20170926131445.xo2uawiovjtmyivj@flea>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20170926131445.xo2uawiovjtmyivj@flea>","User-Agent":"NeoMutt/20170113 (1.7.2)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170928_120641_192193_5B9D027D ","X-CRM114-Status":"GOOD (  14.81  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2607:f8b0:400e:c00:0:0:0:22e listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"mark.rutland@arm.com, devicetree@vger.kernel.org,\n\tlinux-gpio@vger.kernel.org, linus.walleij@linaro.org,\n\tlinux-sunxi@googlegroups.com, linux@armlinux.org.uk,\n\tlinux-kernel@vger.kernel.org,\n\tQuentin Schulz <quentin.schulz@free-electrons.com>, wens@csie.org,\n\trobh+dt@kernel.org, thomas.petazzoni@free-electrons.com,\n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1780991,"web_url":"http://patchwork.ozlabs.org/comment/1780991/","msgid":"<20171005205037.hxtoyeryiolflkda@rob-hp-laptop>","list_archive_url":null,"date":"2017-10-05T20:50:37","subject":"Re: [PATCH v2 01/10] pinctrl: move gpio-axp209 to pinctrl","submitter":{"id":62529,"url":"http://patchwork.ozlabs.org/api/people/62529/","name":"Rob Herring (Arm)","email":"robh@kernel.org"},"content":"On Tue, Sep 26, 2017 at 02:17:11PM +0200, Quentin Schulz wrote:\n> To prepare the driver for the upcoming pinctrl features, move the GPIO\n> driver AXP209 from GPIO to pinctrl subsystem.\n> \n> Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>\n> ---\n>  Documentation/devicetree/bindings/gpio/gpio-axp209.txt       |  30 +-\n>  Documentation/devicetree/bindings/pinctrl/pinctrl-axp209.txt |  30 +-\n>  drivers/gpio/Kconfig                                         |   6 +-\n>  drivers/gpio/Makefile                                        |   1 +-\n>  drivers/gpio/gpio-axp209.c                                   | 188 +-------\n>  drivers/pinctrl/Kconfig                                      |   6 +-\n>  drivers/pinctrl/Makefile                                     |   1 +-\n>  drivers/pinctrl/pinctrl-axp209.c                             | 188 +++++++-\n>  8 files changed, 225 insertions(+), 225 deletions(-)\n>  delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-axp209.txt\n>  create mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-axp209.txt\n>  delete mode 100644 drivers/gpio/gpio-axp209.c\n>  create mode 100644 drivers/pinctrl/pinctrl-axp209.c\n> \n> diff --git a/Documentation/devicetree/bindings/gpio/gpio-axp209.txt b/Documentation/devicetree/bindings/gpio/gpio-axp209.txt\n> deleted file mode 100644\n> index a661130..0000000\n> --- a/Documentation/devicetree/bindings/gpio/gpio-axp209.txt\n> +++ /dev/null\n> @@ -1,30 +0,0 @@\n> -AXP209 GPIO controller\n> -\n> -This driver follows the usual GPIO bindings found in\n> -Documentation/devicetree/bindings/gpio/gpio.txt\n> -\n> -Required properties:\n> -- compatible: Should be \"x-powers,axp209-gpio\"\n> -- #gpio-cells: Should be two. The first cell is the pin number and the\n> -  second is the GPIO flags.\n> -- gpio-controller: Marks the device node as a GPIO controller.\n> -\n> -This node must be a subnode of the axp20x PMIC, documented in\n> -Documentation/devicetree/bindings/mfd/axp20x.txt\n> -\n> -Example:\n> -\n> -axp209: pmic@34 {\n> -\tcompatible = \"x-powers,axp209\";\n> -\treg = <0x34>;\n> -\tinterrupt-parent = <&nmi_intc>;\n> -\tinterrupts = <0 IRQ_TYPE_LEVEL_LOW>;\n> -\tinterrupt-controller;\n> -\t#interrupt-cells = <1>;\n> -\n> -\taxp_gpio: gpio {\n> -\t\tcompatible = \"x-powers,axp209-gpio\";\n> -\t\tgpio-controller;\n> -\t\t#gpio-cells = <2>;\n> -\t};\n> -};\n> diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-axp209.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-axp209.txt\n> new file mode 100644\n> index 0000000..a661130\n> --- /dev/null\n> +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-axp209.txt\n> @@ -0,0 +1,30 @@\n> +AXP209 GPIO controller\n> +\n> +This driver follows the usual GPIO bindings found in\n> +Documentation/devicetree/bindings/gpio/gpio.txt\n> +\n> +Required properties:\n> +- compatible: Should be \"x-powers,axp209-gpio\"\n> +- #gpio-cells: Should be two. The first cell is the pin number and the\n> +  second is the GPIO flags.\n> +- gpio-controller: Marks the device node as a GPIO controller.\n\nMaybe there's some reason to move the driver, but the binding describes \na gpio-controller so it should remain in bindings/gpio/. Binding and \ndriver directories aren't one to one necessarily.\n\nRob","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"A7a4IKV/\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y7Q0Y0QPxz9t5Y\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tFri,  6 Oct 2017 07:51:09 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e0D6l-00071c-Nc; Thu, 05 Oct 2017 20:51:03 +0000","from mail-oi0-f66.google.com ([209.85.218.66])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e0D6h-0006y8-82 for linux-arm-kernel@lists.infradead.org;\n\tThu, 05 Oct 2017 20:51:00 +0000","by mail-oi0-f66.google.com with SMTP id h200so2914121oib.1\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tThu, 05 Oct 2017 13:50:39 -0700 (PDT)","from localhost (216-188-254-6.dyn.grandenetworks.net.\n\t[216.188.254.6]) by smtp.gmail.com with ESMTPSA id\n\td129sm6741541oia.27.2017.10.05.13.50.37\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 05 Oct 2017 13:50:37 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=HoJmvT0cQ0oEIuLAaz9v47DMH2KxvxTtv2N+3mCzzpQ=;\n\tb=A7a4IKV/D4VhnA\n\t7Q/MmJPBnncAh/orOpln4zZXIb4Hg4/sidRZj4PNW9d5Y5fun29vL9fYRUyhbW6N4JHuRYH6T1qHg\n\tblimusU9DOZFmM2ybw2mulA9ck6x0EyiFp3i3tne/+E9ofWAYjCC/quy9+yH7vMFW95C8ZA03bkRY\n\tEPd3iGTjoIzEg/kqilQATOu7lkqzfxPZKqdGACjv7x0+tQOIWd1L26X05D/cfu5iPCoFFDJJv9ugv\n\tDZra8h1jskqQFGjA3zqZFsCBwCcQsuJAV336bv9Lx9ZVjH2C4RccJ2dzjEzm9FiY+jaRj2LlYz/6m\n\t8ei+4rthVOeDHY2+Kt4Q==;","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=Qra02DoUCvYDoWvjwJIlbnNCXMe75vgDpC2c9HHjId8=;\n\tb=A7KGQ/MoVkMyc+zJuS10UKO6TdVQUuW+5sEz/ccyyElZndPbmkZ3PI9NTjhkdsBPGB\n\tNngQEm6ElZI+xmKeKTs9Z/7y9dp1QPseMMpVfeUHUeRlle3ZFWov5EJc7Oah50X7/3YF\n\tXYycyb0cCDgrlwju7uzeXSde8vOI8ggiJxl2ZYRBAqleGJDYzSuLuejoNH6vYBXpFkZQ\n\tpo1VQ2xR4VnnCMBZbUkkRzz/hH0uIWZ3JN+4r9UQ1kd61ALFTnxIYy2RZHh46d6rg7sg\n\tAEp7zJ5XU9y+EWodqststWibcQ6G4yxlsTkQG5Kr1ThVG/qTh8ViZaMRk46rvXezr9AS\n\ti3yQ==","X-Gm-Message-State":"AMCzsaWEc4jDpXPikmAzF3NSvszIULZ8LhjrPwn+aP+SVZgoeSbtj1rC\n\tJQbkSFys8aLkDgulnA/i5g==","X-Google-Smtp-Source":"AOwi7QBmBWTaEkfQvf9DuEF2KT3JCjuGJTVChpQzAZryslVdvgBmOB+QnPACz+CG+dKhr3SLCLZ2Lw==","X-Received":"by 10.157.81.140 with SMTP id y12mr5199261otg.9.1507236638476;\n\tThu, 05 Oct 2017 13:50:38 -0700 (PDT)","Date":"Thu, 5 Oct 2017 15:50:37 -0500","From":"Rob Herring <robh@kernel.org>","To":"Quentin Schulz <quentin.schulz@free-electrons.com>","Subject":"Re: [PATCH v2 01/10] pinctrl: move gpio-axp209 to pinctrl","Message-ID":"<20171005205037.hxtoyeryiolflkda@rob-hp-laptop>","References":"<cover.1c314f4154a6d27354625f03d0a5269eee55a9c5.1506428208.git-series.quentin.schulz@free-electrons.com>\n\t<e193f8efe9092171ebeffb77ab77422179fd3cab.1506428208.git-series.quentin.schulz@free-electrons.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<e193f8efe9092171ebeffb77ab77422179fd3cab.1506428208.git-series.quentin.schulz@free-electrons.com>","User-Agent":"NeoMutt/20170113 (1.7.2)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171005_135059_340461_3E1EA84B ","X-CRM114-Status":"GOOD (  17.36  )","X-Spam-Score":"-1.0 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno trust [209.85.218.66 listed in list.dnswl.org]\n\t0.5 RCVD_IN_SORBS_SPAM     RBL: SORBS: sender is a spam source\n\t[209.85.218.66 listed in dnsbl.sorbs.net]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends\n\tin digit (robherring2[at]gmail.com)\n\t0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\n\tprovider (robherring2[at]gmail.com)\n\t0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level\n\tmail domains are different\n\t-0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)\n\t[209.85.218.66 listed in wl.mailspike.net]\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders\n\t0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and\n\tEnvelopeFrom freemail headers are different","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"mark.rutland@arm.com, devicetree@vger.kernel.org,\n\tlinus.walleij@linaro.org, \n\tlinux-sunxi@googlegroups.com, linux@armlinux.org.uk,\n\tlinux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, wens@csie.org, \n\tmaxime.ripard@free-electrons.com, lee.jones@linaro.org,\n\tthomas.petazzoni@free-electrons.com, linux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}}]