From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933529AbeAJCMV (ORCPT + 1 other); Tue, 9 Jan 2018 21:12:21 -0500 Received: from mail-sh2.amlogic.com ([58.32.228.45]:40404 "EHLO mail-sh2.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933270AbeAJCMT (ORCPT ); Tue, 9 Jan 2018 21:12:19 -0500 Subject: Re: [PATCH 0/2] pinctrl: meson: use one uniform 'function' name To: Jerome Brunet , Linus Walleij References: <20180108073328.205769-1-yixun.lan@amlogic.com> <1515401544.5048.67.camel@baylibre.com> CC: , Neil Armstrong , Kevin Hilman , Carlo Caione , Xingyu Chen , Martin Blumenstingl , , , , From: Yixun Lan Message-ID: Date: Wed, 10 Jan 2018 10:12:38 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1515401544.5048.67.camel@baylibre.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.18.20.142] X-ClientProxiedBy: mail-sh2.amlogic.com (10.18.11.6) To mail-sh2.amlogic.com (10.18.11.6) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/08/18 16:52, Jerome Brunet wrote: > On Mon, 2018-01-08 at 15:33 +0800, Yixun Lan wrote: >> These two patches are general improvement for meson pinctrl driver. >> It make the two pinctrl trees (ee/ao) to share one uniform 'function' name for >> one hardware block even its pin groups live inside two differet hardware domains, >> which for example EE vs AO domain here. >> >> This idea is motivated by Martin's question at [1] >> >> [1] >> http://lkml.kernel.org/r/CAFBinCCuQ-NK747+GHDkhZty_UMMgzCYOYFcNTrRDJgU8OM=Gw@mail.gmail.com >> >> >> Yixun Lan (2): >> pinctrl: meson: introduce a macro to have name/groups seperated >> pinctrl: meson-axg: correct the pin expansion of UART_AO_B >> >> drivers/pinctrl/meson/pinctrl-meson-axg.c | 4 ++-- >> drivers/pinctrl/meson/pinctrl-meson.h | 8 +++++--- >> 2 files changed, 7 insertions(+), 5 deletions(-) > > Hi Yixun, > > Honestly, I don't like the idea. I think it adds an unnecessary complexity. > I don't see the point of FUNCTION_EX(uart_ao_b, _z) when you could simply write > FUNCTION(uart_ao_b_z) ... especially when there is just a couple of function per > SoC available on different domains. > > A pinctrl driver can already be challenging to understand at first, let's keep > it simple and avoid adding more macros. > Hi Jerome: In my opinion, the idea of keeping one uniform 'function' in DT (thus introducing another macro) is worth considering. It would make the DT part much clean. And yes, it's a trade-off here, either we 1) do more in code to make DT clean or 2) do nothing in the code level to make DT live with it. Yixun