Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1639215
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: pinctrl-sx150x.c broken in 4.11 |
| Date | 2017-05-11 09:30 +0200 |
| Message-ID | <tFQHT-3k5-1@gated-at.bofh.it> (permalink) |
| References | <tFFCO-4HE-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, May 10, 2017 at 9:32 PM, Nikita Yushchenko
<nikita.yoush@cogentembedded.com> wrote:
> Looks like recent pinctrl changes - possibly commit 99e4f67508e1
> ("pinctrl: core: Use delayed work for hogs") - breaks pinctrl-sx150x
> driver in all setups where it has any pinctrl settings in device tree.
>
> AFAIU, pinctrl-sx150x is not a real pinctrl/pinmux driver,
It's as real as it gets.
> but it uses
> pinctrl subsystem to provide control over GPIO lines it provides. But
> for user, it is just a i2c-gpio device that is enabled via device tree,
> and, like other devices, can have pinctrl-0 that points to "real" pinmux
> configuration for involved hardware lines (i.e. line used for interrupt).
>
> Problem is that when pinctrl-sx150x driver registers itself via
> pinctrl_register(), pinctrl map that corresponds to pinctrl-0 property
> of sx150x device tree node, is misinterpreted as hog. Corresponding
> call chain is
>
> pinctrl_enable() ->
> pinctrl_claim_hogs() ->
> create_pinctrl()
>
> at this point, registered pinctrl maps are scanned and matched by device
> name only, without checking map's control device. Then map is passed to
> add_setting() with pctldev set to sx150x which does not provide
> pinmux_ops, which errors out:
>
> sx150x-pinctrl 10-0020: does not support mux function
> sx150x-pinctrl 10-0020: could not map pin config for "VF610_PAD_PTB1"
> sx150x-pinctrl 10-0020: error claiming hogs: -22
> sx150x-pinctrl 10-0020: could not claim hogs: -22
> sx150x-pinctrl 10-0020: Failed to register pinctrl device
> sx150x-pinctrl: probe of 10-0020 failed with error -22
>
> Before commit 99e4f67508e1 ("pinctrl: core: Use delayed work for hogs")
> problem was hidden by not passing pinctrl device to add_setting(), but
> instead getting that from map.
>
> What is proper fix for this?
I bet Tony has the answer to this.
I think something similar to:
commit 6118714275f0a313ecc296a87ed1af32d9691bed
"pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable()"
is needed?
Maybe we need to go over everything in drivers/pinctrl and check that
we don't have more of these broken hogs.
Yours,
Linus Walleij
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
pinctrl-sx150x.c broken in 4.11 Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2017-05-10 21:40 +0200
Re: pinctrl-sx150x.c broken in 4.11 Linus Walleij <linus.walleij@linaro.org> - 2017-05-11 09:30 +0200
Re: pinctrl-sx150x.c broken in 4.11 Tony Lindgren <tony@atomide.com> - 2017-05-11 17:20 +0200
Re: pinctrl-sx150x.c broken in 4.11 Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2017-05-11 18:30 +0200
Re: pinctrl-sx150x.c broken in 4.11 Tony Lindgren <tony@atomide.com> - 2017-05-11 18:40 +0200
Re: pinctrl-sx150x.c broken in 4.11 Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2017-05-11 19:00 +0200
Re: pinctrl-sx150x.c broken in 4.11 Tony Lindgren <tony@atomide.com> - 2017-05-11 20:00 +0200
Re: pinctrl-sx150x.c broken in 4.11 Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2017-05-11 21:20 +0200
csiph-web