Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932194AbdLTIFg (ORCPT ); Wed, 20 Dec 2017 03:05:36 -0500 Received: from mail-io0-f177.google.com ([209.85.223.177]:44831 "EHLO mail-io0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752268AbdLTIFb (ORCPT ); Wed, 20 Dec 2017 03:05:31 -0500 X-Google-Smtp-Source: ACJfBot7WB9/1B9+7i+V8uWYE1gIRo9skOEOcyKMsoCDV/X1zP0COEVtYwdrQS21MdI7P4P06yWngSeLAlJTzuDtl1k= MIME-Version: 1.0 In-Reply-To: <20171213144748.GA18267@arx-s1> References: <20171213144748.GA18267@arx-s1> From: Linus Walleij Date: Wed, 20 Dec 2017 09:05:29 +0100 Message-ID: Subject: Re: [PATCH v4 4/4] ARM: pinctrl: sunxi-pinctrl: fix pin funtion can not be match correctly. To: hao_zhang Cc: "thierry.reding@gmail.com" , Rob Herring , Mark Rutland , Russell King , Chen-Yu Tsai , Maxime Ripard , "linux-kernel@vger.kernel.org" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux ARM , linux-pwm@vger.kernel.org, "open list:ARM/Amlogic Meson..." 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-Length: 1019 Lines: 31 On Wed, Dec 13, 2017 at 3:47 PM, hao_zhang wrote: > Pin function can not be match correctly when SUNXI_PIN describe with > mutiple variant and same function. > > such as: > on pinctrl-sun4i-a10.c > > SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 2), > SUNXI_FUNCTION(0x0, "gpio_in"), > SUNXI_FUNCTION(0x1, "gpio_out"), > SUNXI_FUNCTION_VARIANT(0x2, "pwm", /* PWM0 */ > PINCTRL_SUN4I_A10 | > PINCTRL_SUN7I_A20), > SUNXI_FUNCTION_VARIANT(0x3, "pwm", /* PWM0 */ > PINCTRL_SUN8I_R40)), > > it would always match to the first variant function > (PINCTRL_SUN4I_A10, PINCTRL_SUN7I_A20) > > so we should add variant compare on it. > > Signed-off-by: hao_zhang Please resend patch with Maxime's suggestions fixed and his ACK added so I can apply it. I can take this patch separatelt, it does not need to be part of the PWM series. Yours, Linus Walleij