From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [PATCH 1/2] drivers: pinctrl: add driver for Allwinner H5 SoC Date: Fri, 30 Dec 2016 13:55:44 +0100 Message-ID: References: <20161223125001.1176-1-icenowy@aosc.xyz> <1280f095-ab03-93f8-14d2-99d13ba1ce55@arm.com> Reply-To: linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org In-Reply-To: <1280f095-ab03-93f8-14d2-99d13ba1ce55-5wv7dgnIgG8@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: =?UTF-8?Q?Andr=C3=A9_Przywara?= , ext Tony Lindgren Cc: Icenowy Zheng , Catalin Marinas , Maxime Ripard , Chen-Yu Tsai , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , linux-sunxi List-Id: linux-gpio@vger.kernel.org On Mon, Dec 26, 2016 at 3:33 PM, Andr=C3=A9 Przywara wrote: > So while this patch technically looks correct, I was wondering if we > should really explore the possibility of making the whole of sunxi > pinctrl DT controlled. > I brought this up a while ago, but people weren't overly enthusiastic > about it, though their argument weren't really convincing to me[1]. > > So: > As this "driver" here is basically a table linking GPIO bit settings > (the actual mux value) to names and every pin we care about needs to be > enumerated in the DT anyway, why not just add something like: > allwinner,pinmux =3D <4>; > to each pin(group) in the DT and get rid of this "driver" file here > entirely? I'm open to that if you can use pinctrl-single which is in the kernel for this purpose only, and is used with both OMAPs and HiSilicon. It recently was improved and will be improved more in this cycle, see for example: commit 42124bc598f64f84b3335d5a058304207695b84f pinctrl: Introduce generic #pinctrl-cells and pinctrl_parse_index_with_args > (...) Also I guess the common sunxi > pinctrl driver code needs some significant rework. I would guess is just needs replacing with pinctrl-single in that case. Yours, Linus Walleij --=20 You received this message because you are subscribed to the Google Groups "= linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753962AbcL3Mzr (ORCPT ); Fri, 30 Dec 2016 07:55:47 -0500 Received: from mail-qt0-f176.google.com ([209.85.216.176]:36487 "EHLO mail-qt0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753696AbcL3Mzp (ORCPT ); Fri, 30 Dec 2016 07:55:45 -0500 MIME-Version: 1.0 In-Reply-To: <1280f095-ab03-93f8-14d2-99d13ba1ce55@arm.com> References: <20161223125001.1176-1-icenowy@aosc.xyz> <1280f095-ab03-93f8-14d2-99d13ba1ce55@arm.com> From: Linus Walleij Date: Fri, 30 Dec 2016 13:55:44 +0100 Message-ID: Subject: Re: [linux-sunxi] [PATCH 1/2] drivers: pinctrl: add driver for Allwinner H5 SoC To: =?UTF-8?Q?Andr=C3=A9_Przywara?= , ext Tony Lindgren Cc: Icenowy Zheng , Catalin Marinas , Maxime Ripard , Chen-Yu Tsai , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" , linux-sunxi Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uBUCx4qQ022478 On Mon, Dec 26, 2016 at 3:33 PM, André Przywara wrote: > So while this patch technically looks correct, I was wondering if we > should really explore the possibility of making the whole of sunxi > pinctrl DT controlled. > I brought this up a while ago, but people weren't overly enthusiastic > about it, though their argument weren't really convincing to me[1]. > > So: > As this "driver" here is basically a table linking GPIO bit settings > (the actual mux value) to names and every pin we care about needs to be > enumerated in the DT anyway, why not just add something like: > allwinner,pinmux = <4>; > to each pin(group) in the DT and get rid of this "driver" file here > entirely? I'm open to that if you can use pinctrl-single which is in the kernel for this purpose only, and is used with both OMAPs and HiSilicon. It recently was improved and will be improved more in this cycle, see for example: commit 42124bc598f64f84b3335d5a058304207695b84f pinctrl: Introduce generic #pinctrl-cells and pinctrl_parse_index_with_args > (...) Also I guess the common sunxi > pinctrl driver code needs some significant rework. I would guess is just needs replacing with pinctrl-single in that case. Yours, Linus Walleij From mboxrd@z Thu Jan 1 00:00:00 1970 From: linus.walleij@linaro.org (Linus Walleij) Date: Fri, 30 Dec 2016 13:55:44 +0100 Subject: [linux-sunxi] [PATCH 1/2] drivers: pinctrl: add driver for Allwinner H5 SoC In-Reply-To: <1280f095-ab03-93f8-14d2-99d13ba1ce55@arm.com> References: <20161223125001.1176-1-icenowy@aosc.xyz> <1280f095-ab03-93f8-14d2-99d13ba1ce55@arm.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Dec 26, 2016 at 3:33 PM, Andr? Przywara wrote: > So while this patch technically looks correct, I was wondering if we > should really explore the possibility of making the whole of sunxi > pinctrl DT controlled. > I brought this up a while ago, but people weren't overly enthusiastic > about it, though their argument weren't really convincing to me[1]. > > So: > As this "driver" here is basically a table linking GPIO bit settings > (the actual mux value) to names and every pin we care about needs to be > enumerated in the DT anyway, why not just add something like: > allwinner,pinmux = <4>; > to each pin(group) in the DT and get rid of this "driver" file here > entirely? I'm open to that if you can use pinctrl-single which is in the kernel for this purpose only, and is used with both OMAPs and HiSilicon. It recently was improved and will be improved more in this cycle, see for example: commit 42124bc598f64f84b3335d5a058304207695b84f pinctrl: Introduce generic #pinctrl-cells and pinctrl_parse_index_with_args > (...) Also I guess the common sunxi > pinctrl driver code needs some significant rework. I would guess is just needs replacing with pinctrl-single in that case. Yours, Linus Walleij