From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [PATCH/RFC] gpio: em: Use dynamic allocation of GPIOs Date: Thu, 27 Nov 2014 15:17:41 +0100 Message-ID: References: <1416234632-16166-1-git-send-email-geert+renesas@glider.be> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: Sender: linux-sh-owner@vger.kernel.org To: Alexandre Courbot Cc: Geert Uytterhoeven , Magnus Damm , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , Linux-SH List-Id: devicetree@vger.kernel.org On Tue, Nov 18, 2014 at 4:11 AM, Alexandre Courbot wrote: > On Mon, Nov 17, 2014 at 11:30 PM, Geert Uytterhoeven > wrote: >> - ret = of_alias_get_id(pdev->dev.of_node, "gpio"); >> - if (ret < 0) { >> - dev_err(&pdev->dev, "Couldn't get OF id\n"); >> - goto err0; >> - } >> - pdata->gpio_base = ret * 32; /* 32 GPIOs per instance */ >> + pdata->gpio_base = -1; > > User-space might break because of GPIO renumbering. Why not setting > gpio_base to -1 when the property is not present (instead of > triggering an error), keeping support for the property so existing > boards remain safe, and marking the property as deprecated in the > bindings documentation? I don't like the way aliases are used here. These bindings are undocumented by the way :( :( :( I've applied it to wait and see what happens instead. Yours, Linus Walleij