From: Linus Walleij <linus.walleij@linaro.org>
To: Alexandre Courbot <gnurou@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Linux-SH <linux-sh@vger.kernel.org>
Subject: Re: [PATCH/RFC] gpio: em: Use dynamic allocation of GPIOs
Date: Thu, 27 Nov 2014 15:17:41 +0100 [thread overview]
Message-ID: <CACRpkdZ-y1bgJBYSzBRLNxughMKS86QWfauzNYGreFG_uB-0uA@mail.gmail.com> (raw)
In-Reply-To: <CAAVeFuKGYM56KP8TOZAwSjDGWrVNoK1phpxoOdEJ=Ng9haSnmg@mail.gmail.com>
On Tue, Nov 18, 2014 at 4:11 AM, Alexandre Courbot <gnurou@gmail.com> wrote:
> On Mon, Nov 17, 2014 at 11:30 PM, Geert Uytterhoeven
> <geert+renesas@glider.be> 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
next prev parent reply other threads:[~2014-11-27 14:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-17 14:30 [PATCH/RFC] gpio: em: Use dynamic allocation of GPIOs Geert Uytterhoeven
2014-11-17 14:34 ` Arnd Bergmann
2014-11-17 14:42 ` Geert Uytterhoeven
2014-11-18 3:11 ` Alexandre Courbot
2014-11-27 14:17 ` Linus Walleij [this message]
2014-11-27 14:13 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACRpkdZ-y1bgJBYSzBRLNxughMKS86QWfauzNYGreFG_uB-0uA@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=gnurou@gmail.com \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).