Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1437578
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] gpio: of: Allow overriding the device node |
| Date | 2016-07-06 11:10 +0200 |
| Message-ID | <rRR0d-7fr-25@gated-at.bofh.it> (permalink) |
| References | <rRxuy-2G4-23@gated-at.bofh.it> <rRAsp-4Ci-13@gated-at.bofh.it> <rRJvH-2im-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jul 6, 2016 at 3:05 AM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> Question:
>
> When we reference the node of gpiochip,
> we should use
> chip->gpiodev->dev->of_node
>
> instead of
> chip->of_node
>
> because we can make chip->of_node optional
> as long as chip->parent is set in the probe method.
>
> Correct?
Yes, if you see any bug with respect to this, just fix them.
Overall my appraisal of the situation is that it's a mess.
chip->of_node should not exist, we need to investigate all
cases where this is actually used by drivers and kill them all
off, they should all be using the parent to pass the device
containing the right of node so we can get rid of this:
#ifdef CONFIG_OF_GPIO
/* If the gpiochip has an assigned OF node this takes precedence */
if (chip->of_node)
gdev->dev.of_node = chip->of_node;
#endif
I don't know why this extra OF node is there in the first
place and in which circumstances it may be used, maybe
Grant knows.
I understand so much as that it would be a situation where
you have a GPIO device node but it does not have a corresponding
device of any type, but I fail to see what circumstance would
make that happen.
Yours,
Linus Walleij
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] gpio: of: Allow overriding the device node Thierry Reding <thierry.reding@gmail.com> - 2016-07-05 14:20 +0200
Re: [PATCH] gpio: of: Allow overriding the device node Alexandre Courbot <gnurou@gmail.com> - 2016-07-05 15:20 +0200
Re: [PATCH] gpio: of: Allow overriding the device node Linus Walleij <linus.walleij@linaro.org> - 2016-07-05 17:30 +0200
Re: [PATCH] gpio: of: Allow overriding the device node Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-07-06 03:10 +0200
Re: [PATCH] gpio: of: Allow overriding the device node Linus Walleij <linus.walleij@linaro.org> - 2016-07-06 11:10 +0200
csiph-web