Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1461172
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 02/12] pinctrl: Add core pinctrl support for Aspeed SoCs |
| Date | 2016-08-12 15:20 +0200 |
| Message-ID | <s5kxs-26U-15@gated-at.bofh.it> (permalink) |
| References | <rWSRH-69e-5@gated-at.bofh.it> <rWSRI-69e-27@gated-at.bofh.it> <s4TQC-1tP-25@gated-at.bofh.it> <s58FX-2QI-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Aug 12, 2016 at 2:33 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
>> > +
>> > + while (*exprs) {
>> > + if (strncmp((*exprs)->signal, "GPIO", 4) == 0)
>> > + return true;
>> This looks a bit fragile and hard to debug. Do you have some better
>> idea of how to do this but not resort to string comparison?
>
> Yes, this is a little unfortunate. GPIO is not always a pin's lowest
> priority function (e.g. the RGMII/RMII pins), so this makes the GPIO
> case like any other mux function: We need to know when to stop
> iterating the arrays when disabling mux functions of higher priority.
> The alternative is probably to introduce another field to struct
> aspeed_sig_expr and set that as necessary, but that feels redundant if
> we keep to a consistent naming for the GPIOs.
I would probably prefer that option (introduce another field)
but you should make the overall decision, it's no strong opinion
from my side.
> Would it be acceptable to document that requirement?
Sure.
Yours,
Linus Walleij
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 02/12] pinctrl: Add core pinctrl support for Aspeed SoCs Linus Walleij <linus.walleij@linaro.org> - 2016-08-11 10:50 +0200
Re: [PATCH 02/12] pinctrl: Add core pinctrl support for Aspeed SoCs Andrew Jeffery <andrew@aj.id.au> - 2016-08-12 02:40 +0200
Re: [PATCH 02/12] pinctrl: Add core pinctrl support for Aspeed SoCs Linus Walleij <linus.walleij@linaro.org> - 2016-08-12 15:20 +0200
Re: [PATCH 02/12] pinctrl: Add core pinctrl support for Aspeed SoCs Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2016-08-13 03:40 +0200
Re: [PATCH 02/12] pinctrl: Add core pinctrl support for Aspeed SoCs Andrew Jeffery <andrew@aj.id.au> - 2016-08-15 02:40 +0200
csiph-web