Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933507AbeAJNpM (ORCPT + 1 other); Wed, 10 Jan 2018 08:45:12 -0500 Received: from mail-io0-f173.google.com ([209.85.223.173]:35912 "EHLO mail-io0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932526AbeAJNpH (ORCPT ); Wed, 10 Jan 2018 08:45:07 -0500 X-Google-Smtp-Source: ACJfBosbhRRLkPA4h3l/tQpXfOGwbDT0rUmadgUfUE/UYbIjy6mEpBrkA/CSV1gHMKhQwG2IYH0hGdPb2mwbUWy72aw= MIME-Version: 1.0 In-Reply-To: <20180109055902.GA1306@arx-s1> References: <20180109055902.GA1306@arx-s1> From: Linus Walleij Date: Wed, 10 Jan 2018 14:45:06 +0100 Message-ID: Subject: Re: [RESEND PATCH] ARM: pinctrl: sunxi-pinctrl: fix pin funtion can not be match correctly. To: hao_zhang Cc: Maxime Ripard , Chen-Yu Tsai , "linux-kernel@vger.kernel.org" , Linux ARM , linux-gpio@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, Jan 9, 2018 at 6:59 AM, 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. > > Regards > Hao > > Signed-off-by: hao_zhang Patch applied with Maxime's ACK. Yours, Linus Walleij