Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1612275 > unrolled thread
| Started by | Geert Uytterhoeven <geert+renesas@glider.be> |
|---|---|
| First post | 2017-03-29 21:40 +0200 |
| Last post | 2017-03-31 10:40 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH v2 0/2] base: soc: soc_device_match() improvements Geert Uytterhoeven <geert+renesas@glider.be> - 2017-03-29 21:40 +0200
[PATCH v2 1/2] base: soc: Let soc_device_match() return no match when called too early Geert Uytterhoeven <geert+renesas@glider.be> - 2017-03-29 21:50 +0200
Re: [PATCH v2 0/2] base: soc: soc_device_match() improvements Arnd Bergmann <arnd@arndb.de> - 2017-03-29 23:50 +0200
Re: [PATCH v2 0/2] base: soc: soc_device_match() improvements Simon Horman <horms@verge.net.au> - 2017-03-31 10:40 +0200
| From | Geert Uytterhoeven <geert+renesas@glider.be> |
|---|---|
| Date | 2017-03-29 21:40 +0200 |
| Subject | [PATCH v2 0/2] base: soc: soc_device_match() improvements |
| Message-ID | <tqrBM-30O-19@gated-at.bofh.it> |
Hi Arnd, Greg, Kevin, Magnus, Olof, Simon,
This patch series contains two improvements for the SoC bus and
soc_device_match(). The second one is a dependency for handling
different SoC revisions in the Renesas R-Car SYSC driver, which manages
PM Domains and thus needs to be initialized from an early_initcall[*].
Changes compared to v1:
- Drop RFC state,
- Add more explanation,
- Add Acked-by.
Due to the dependency, and as changes for the Renesas R-Car SYSC driver
typically go in through the renesas and arm-soc trees, and if you agree,
I would like to send a pull request for these changes, to be pulled by
all of the driver core, renesas, and arm-soc trees. This is similar to
how soc_device_match() was integrated earlier.
Then the Renesas R-Car SYSC driver changes can easily be queued on top
in the renesas tree afterwards.
Do you agree?
Thanks for your answer!
P.S. If you think it's already too late in the cycle to queue Renesas
R-Car SYSC driver changes for v4.12 on top, please say so. Then the
dependency is relaxed, and this series can just go in through the
driver core tree, with the Renesas part to follow for v4.13.
[*] "[PATCH 0/3] soc: renesas: rcar-sysc: Add support for R-Car H3
ES2.0" (https://lkml.org/lkml/2017/3/13/833), will send v2 with
patch description changes only soon.
Geert Uytterhoeven (2):
base: soc: Let soc_device_match() return no match when called too
early
base: soc: Allow early registration of a single SoC device
drivers/base/soc.c | 52 ++++++++++++++++++++++++++++++++++------------------
1 file changed, 34 insertions(+), 18 deletions(-)
--
2.7.4
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
[toc] | [next] | [standalone]
| From | Geert Uytterhoeven <geert+renesas@glider.be> |
|---|---|
| Date | 2017-03-29 21:50 +0200 |
| Subject | [PATCH v2 1/2] base: soc: Let soc_device_match() return no match when called too early |
| Message-ID | <tqrLs-34R-15@gated-at.bofh.it> |
| In reply to | #1612275 |
If soc_device_match() is called before the SoC bus has been registered, bus_for_each_dev() returns -EINVAL, which is considered a match, as it is non-zero. While calling soc_device_match() too early can be considered an integration mistake, returning a match is counter-intuitive: soc_device_match() is typically used to handle quirks, i.e. to deviate from the default path. Hence add a check to abort checking and return no match instead. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Arnd Bergmann <arnd@arndb.de> --- v2: - Drop RFC state, - Add Acked-by, - Add missing "too early" to second paragraph of description. --- drivers/base/soc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/base/soc.c b/drivers/base/soc.c index dc26e5949a320223..50033081834a9ccd 100644 --- a/drivers/base/soc.c +++ b/drivers/base/soc.c @@ -230,6 +230,8 @@ const struct soc_device_attribute *soc_device_match( break; ret = bus_for_each_dev(&soc_bus_type, NULL, (void *)matches, soc_device_match_one); + if (ret < 0) + return NULL; if (!ret) matches++; else -- 2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-03-29 23:50 +0200 |
| Message-ID | <tqtDz-4sl-5@gated-at.bofh.it> |
| In reply to | #1612275 |
On Wed, Mar 29, 2017 at 9:38 PM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> Hi Arnd, Greg, Kevin, Magnus, Olof, Simon,
>
> This patch series contains two improvements for the SoC bus and
> soc_device_match(). The second one is a dependency for handling
> different SoC revisions in the Renesas R-Car SYSC driver, which manages
> PM Domains and thus needs to be initialized from an early_initcall[*].
>
> Changes compared to v1:
> - Drop RFC state,
> - Add more explanation,
> - Add Acked-by.
>
> Due to the dependency, and as changes for the Renesas R-Car SYSC driver
> typically go in through the renesas and arm-soc trees, and if you agree,
> I would like to send a pull request for these changes, to be pulled by
> all of the driver core, renesas, and arm-soc trees. This is similar to
> how soc_device_match() was integrated earlier.
> Then the Renesas R-Car SYSC driver changes can easily be queued on top
> in the renesas tree afterwards.
>
> Do you agree?
> Thanks for your answer!
Merging this through arm-soc is fine with me.
> P.S. If you think it's already too late in the cycle to queue Renesas
> R-Car SYSC driver changes for v4.12 on top, please say so. Then the
> dependency is relaxed, and this series can just go in through the
> driver core tree, with the Renesas part to follow for v4.13.
We can take it for 4.12.
Arnd
[toc] | [prev] | [next] | [standalone]
| From | Simon Horman <horms@verge.net.au> |
|---|---|
| Date | 2017-03-31 10:40 +0200 |
| Message-ID | <tr0g9-2al-3@gated-at.bofh.it> |
| In reply to | #1612402 |
On Wed, Mar 29, 2017 at 09:48:48PM +0200, Arnd Bergmann wrote: > On Wed, Mar 29, 2017 at 9:38 PM, Geert Uytterhoeven > <geert+renesas@glider.be> wrote: > > Hi Arnd, Greg, Kevin, Magnus, Olof, Simon, > > > > This patch series contains two improvements for the SoC bus and > > soc_device_match(). The second one is a dependency for handling > > different SoC revisions in the Renesas R-Car SYSC driver, which manages > > PM Domains and thus needs to be initialized from an early_initcall[*]. > > > > Changes compared to v1: > > - Drop RFC state, > > - Add more explanation, > > - Add Acked-by. > > > > Due to the dependency, and as changes for the Renesas R-Car SYSC driver > > typically go in through the renesas and arm-soc trees, and if you agree, > > I would like to send a pull request for these changes, to be pulled by > > all of the driver core, renesas, and arm-soc trees. This is similar to > > how soc_device_match() was integrated earlier. > > Then the Renesas R-Car SYSC driver changes can easily be queued on top > > in the renesas tree afterwards. > > > > Do you agree? > > Thanks for your answer! > > Merging this through arm-soc is fine with me. Thanks, in that case I am fine with this plan. > > P.S. If you think it's already too late in the cycle to queue Renesas > > R-Car SYSC driver changes for v4.12 on top, please say so. Then the > > dependency is relaxed, and this series can just go in through the > > driver core tree, with the Renesas part to follow for v4.13. > > We can take it for 4.12. Thanks again. My preference at this time is to deffer the DT changes to v4.13 as it seems somewhat simpler and I'm not aware of any urgency to get them into v4.12.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web