RE: [PATCH v2 4/4] pinctrl/lantiq: fix up pinmux
From: Martin Schiller <hidden>
Date: 2015-11-26 07:15:45
Also in:
linux-gpio, linux-mips
On 11/26/2015 at 8:04 AM, John Crispin wrote:
On 26/11/2015 07:40, Martin Schiller wrote:quoted
On 11/25/2015 at 11:40 AM, Jonas Gorski wrote:quoted
Hi On Wed, Nov 25, 2015 at 11:18 AM, Martin Schiller [off-list ref] wrote:quoted
From: John Crispin <redacted> This patch is included in the openwrt patchset for several yearsnowquoted
quoted
and needsquoted
to go upstream as well. It includes the following changes: 1. Fix up inline function call to xway_mux_applyThis really needs an explanation what is being fixed here.I hope John - as the original author of this patch - can explain why this change is necessary.what change? why am I in Cc: and not To: if an action is required ? John
That change is meant: ########################################################################
quoted hunk ↗ jump to hunk
diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c index a064962..f0b1b48 100644--- a/drivers/pinctrl/pinctrl-xway.c +++ b/drivers/pinctrl/pinctrl-xway.c@@ -1496,10 +1496,9 @@ static struct pinctrl_desc xway_pctrl_desc = { .confops= &xway_pinconf_ops, }; -static inline int xway_mux_apply(struct pinctrl_dev *pctrldev, +static int mux_apply(struct ltq_pinmux_info *info, int pin, int mux) { -struct ltq_pinmux_info *info = pinctrl_dev_get_drvdata(pctrldev); int port = PORT(pin); u32 alt1_reg = GPIO_ALT1(pin);@@ -1519,6 +1518,14 @@ static inline int xway_mux_apply(structpinctrl_dev *pctrldev, return 0; } +static inline int xway_mux_apply(struct pinctrl_dev *pctrldev, +int pin, int mux) +{ +struct ltq_pinmux_info *info = pinctrl_dev_get_drvdata(pctrldev); + +return mux_apply(info, pin, mux); +} + static const struct ltq_cfg_param xway_cfg_params[] = { {"lantiq,pull",LTQ_PINCONF_PARAM_PULL}, {"lantiq,open-drain",LTQ_PINCONF_PARAM_OPEN_DRAIN},
#######################################################################
quoted
quoted
quoted
2. Fix GPIO Setup of GPIO Port3This change looks fine.quoted
3. Implement gpio_chip.to_irqThese are three different changes (two fixes, one new feature) and therefore should be split up into three patches.As I'm not the author of this patch, I decided to leave it as it is. But per se you are right, it would be better to split it up.quoted
quoted
Signed-off-by: John Crispin <redacted> Signed-off-by: Martin Schiller <redacted> ---Also please provide a changelog for your patches here.OK.quoted
quoted
drivers/pinctrl/pinctrl-xway.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-)JonasMartin