Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751970AbdCDLVA (ORCPT ); Sat, 4 Mar 2017 06:21:00 -0500 Received: from mail-ot0-f194.google.com ([74.125.82.194]:33736 "EHLO mail-ot0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751370AbdCDLU6 (ORCPT ); Sat, 4 Mar 2017 06:20:58 -0500 MIME-Version: 1.0 In-Reply-To: <1488301475-10804-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> References: <20170228090143.GG2742@localhost.localdomain> <1488301475-10804-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> From: Tomasz Figa Date: Sat, 4 Mar 2017 20:20:11 +0900 Message-ID: Subject: Re: [PATCH v2] pinctrl: samsung: Calculate GPIO base for pinctrl_add_gpio_range To: Charles Keepax Cc: "linus.walleij@linaro.org" , Krzysztof Kozlowski , Sylwester Nawrocki , "linux-gpio@vger.kernel.org" , "linux-samsung-soc@vger.kernel.org" , linux-kernel , patches@opensource.wolfsonmicro.com 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: 1053 Lines: 32 Hi Charles, 2017-03-01 2:04 GMT+09:00 Charles Keepax : > As the pinctrl is now added before the GPIOs are registered we need to > manually calculate what the GPIO base will be, otherwise the base for > each gpio_range will be set to zero. Fortunately the driver > already assigns a GPIO base, in samsung_gpiolib_register, and uses the > same calculation it does for the pin_base. Meaning the two will always > be the same and allowing us to reuse the pinbase and avoid the issue. Sorry, I didn't notice before and I don't see the offending patch in , but you should add Fixes: XXXXXXXXXXXX ("pinctrl: Patch subject") if you intend to submit this patch separately. Otherwise, maybe this can be just squashed? > > Signed-off-by: Charles Keepax > --- > > Changes since v1: > - Use grange.base in samsung_gpiolib_register to make it more > clear the two are related in the driver. Other than the above: Acked-by: Tomasz Figa Best regards, Tomasz