Re: [PATCH v6 22/22] of/platform: Defer probes of registered devices

2015-10-28 Thread Tomeu Vizoso
On 22 October 2015 at 23:27, Scott Wood wrote: > On Thu, 2015-10-22 at 15:04 +0200, Tomeu Vizoso wrote: >> On 22 October 2015 at 00:51, Scott Wood wrote: >> > On Wed, 2015-10-21 at 08:44 -0500, Rob Herring wrote: >> > > On Wed, Oct 21, 2015 at 12:54 AM, Scott Wood

Re: [PATCH v6 04/22] of: add function to allow probing a device from a OF node

2015-10-27 Thread Tomeu Vizoso
On 26 October 2015 at 09:16, Geert Uytterhoeven wrote: > On Mon, Sep 21, 2015 at 4:02 PM, Tomeu Vizoso > wrote: >> Walks the OF tree up and finds the closest ancestor that has a struct >> device associated with it, probing it if isn't bound to a driver yet. >> >&g

Re: [PATCH v6 03/22] of/platform: Point to struct device from device node

2015-10-27 Thread Tomeu Vizoso
On 24 October 2015 at 15:57, Rafael J. Wysocki wrote: > On Thursday, October 22, 2015 03:01:45 PM Tomeu Vizoso wrote: >> On 22 October 2015 at 03:02, Rafael J. Wysocki wrote: >> > On Monday, September 21, 2015 04:02:43 PM Tomeu Vizoso wrote: >> >> When adding plat

Re: [GIT PULL] On-demand device probing

2015-10-26 Thread Tomeu Vizoso
On 26 October 2015 at 11:51, Michael Turquette wrote: > Quoting Rafael J. Wysocki (2015-10-25 06:54:39) >> On Sun, Oct 25, 2015 at 12:06 AM, Mark Brown wrote: >> > On Sat, Oct 24, 2015 at 04:17:12PM +0200, Rafael J. Wysocki wrote: >> > >> >> Well, I'm not quite sure why exactly everyone is so foc

Re: [GIT PULL] On-demand device probing

2015-10-23 Thread Tomeu Vizoso
On 10/22/2015 09:26 PM, Greg Kroah-Hartman wrote: > On Thu, Oct 22, 2015 at 11:53:31AM -0700, Frank Rowand wrote: >> On 10/22/2015 7:44 AM, Greg Kroah-Hartman wrote: >>> >>> >>> On Thu, Oct 22, 2015 at 11:05:11AM +0200, Tomeu Vizoso wrote: >>>> But

Re: [PATCH v6 22/22] of/platform: Defer probes of registered devices

2015-10-22 Thread Tomeu Vizoso
On 22 October 2015 at 00:51, Scott Wood wrote: > On Wed, 2015-10-21 at 08:44 -0500, Rob Herring wrote: >> On Wed, Oct 21, 2015 at 12:54 AM, Scott Wood >> wrote: >> > On Mon, 2015-09-21 at 16:03 +0200, Tomeu Vizoso wrote: >> > > Instead of trying to match and p

Re: [PATCH v6 04/22] of: add function to allow probing a device from a OF node

2015-10-22 Thread Tomeu Vizoso
On 22 October 2015 at 03:06, Rafael J. Wysocki wrote: > On Monday, September 21, 2015 04:02:44 PM Tomeu Vizoso wrote: >> Walks the OF tree up and finds the closest ancestor that has a struct >> device associated with it, probing it if isn't bound to a driver yet. >>

Re: [PATCH v6 03/22] of/platform: Point to struct device from device node

2015-10-22 Thread Tomeu Vizoso
On 22 October 2015 at 03:02, Rafael J. Wysocki wrote: > On Monday, September 21, 2015 04:02:43 PM Tomeu Vizoso wrote: >> When adding platform and AMBA devices, set the device node's device >> member to point to it. >> >> This speeds lookups considerably and is

Re: [GIT PULL] On-demand device probing

2015-10-22 Thread Tomeu Vizoso
On 22 October 2015 at 02:54, Rafael J. Wysocki wrote: > On Tuesday, October 20, 2015 06:21:55 PM Tomeu Vizoso wrote: >> On 20 October 2015 at 18:04, Alan Stern wrote: >> > On Tue, 20 Oct 2015, Mark Brown wrote: >> > >> >> On Tue, Oct 20, 201

Re: [GIT PULL] On-demand device probing

2015-10-22 Thread Tomeu Vizoso
On 21 October 2015 at 23:50, Frank Rowand wrote: > On 10/21/2015 2:12 PM, Rob Herring wrote: >> On Wed, Oct 21, 2015 at 1:18 PM, Frank Rowand wrote: >>> On 10/21/2015 9:27 AM, Mark Brown wrote: >>>> On Wed, Oct 21, 2015 at 08:59:51AM -0700, Frank Rowand wrote: >

Re: [PATCH] driver core: Disable late probes by default

2015-10-21 Thread Tomeu Vizoso
On 21 October 2015 at 17:14, Greg Kroah-Hartman wrote: > On Wed, Oct 21, 2015 at 04:35:58PM +0200, Tomeu Vizoso wrote: >> On 21 October 2015 at 05:39, Greg Kroah-Hartman >> wrote: >> > On Tue, Oct 20, 2015 at 06:17:39PM +0200, Tomeu Vizoso wrote: >> >> On

Re: [PATCH] driver core: Disable late probes by default

2015-10-21 Thread Tomeu Vizoso
On 21 October 2015 at 05:39, Greg Kroah-Hartman wrote: > On Tue, Oct 20, 2015 at 06:17:39PM +0200, Tomeu Vizoso wrote: >> On 20 October 2015 at 16:05, Greg Kroah-Hartman >> wrote: >> > On Tue, Oct 20, 2015 at 09:40:48AM +0200, Tomeu Vizoso wrote: >> >> On

Re: [GIT PULL] On-demand device probing

2015-10-20 Thread Tomeu Vizoso
On 20 October 2015 at 18:04, Alan Stern wrote: > On Tue, 20 Oct 2015, Mark Brown wrote: > >> On Tue, Oct 20, 2015 at 10:40:03AM -0400, Alan Stern wrote: >> >> > Furthermore, that applies only to devices that use synchronous suspend. >> > Async suspend is becoming common, and there the only restric

Re: [PATCH] driver core: Disable late probes by default

2015-10-20 Thread Tomeu Vizoso
On 20 October 2015 at 16:05, Greg Kroah-Hartman wrote: > On Tue, Oct 20, 2015 at 09:40:48AM +0200, Tomeu Vizoso wrote: >> On 19 October 2015 at 17:19, Greg Kroah-Hartman >> wrote: >> > On Mon, Oct 19, 2015 at 05:13:22PM +0200, Tomeu Vizoso wrote: >> >> To

Re: [PATCH] driver core: Disable late probes by default

2015-10-20 Thread Tomeu Vizoso
On 19 October 2015 at 17:19, Greg Kroah-Hartman wrote: > On Mon, Oct 19, 2015 at 05:13:22PM +0200, Tomeu Vizoso wrote: >> To smooth the transition to late probes, make disabled the default for >> DELAY_DEVICE_PROBES and let individual SoCs enable the option as they >> get fi

[PATCH] driver core: Disable late probes by default

2015-10-19 Thread Tomeu Vizoso
To smooth the transition to late probes, make disabled the default for DELAY_DEVICE_PROBES and let individual SoCs enable the option as they get fixed. Signed-off-by: Tomeu Vizoso Link: https://lkml.kernel.org/g/20151016181129.ga1...@gradator.net --- Hi Rob, I'm sending this in case you

Re: [GIT PULL] On-demand device probing

2015-10-19 Thread Tomeu Vizoso
On 19 October 2015 at 16:30, Russell King - ARM Linux wrote: > On Mon, Oct 19, 2015 at 04:10:56PM +0200, Tomeu Vizoso wrote: >> On 19 October 2015 at 15:18, Russell King - ARM Linux >> wrote: >> > On Mon, Oct 19, 2015 at 02:34:22PM +0200, Tomeu Vizoso wrote: >> &

Re: [GIT PULL] On-demand device probing

2015-10-19 Thread Tomeu Vizoso
On 19 October 2015 at 15:18, Russell King - ARM Linux wrote: > On Mon, Oct 19, 2015 at 02:34:22PM +0200, Tomeu Vizoso wrote: >> ... If a device is available and has >> a compatible driver, but it cannot be probed because a dependency >> isn't going to be available, that&

Re: [GIT PULL] On-demand device probing

2015-10-19 Thread Tomeu Vizoso
On 18 October 2015 at 21:53, Mark Brown wrote: > On Sun, Oct 18, 2015 at 12:37:57PM -0700, Greg Kroah-Hartman wrote: >> On Sun, Oct 18, 2015 at 08:29:31PM +0100, Mark Brown wrote: >> > On Fri, Oct 16, 2015 at 11:57:50PM -0700, Greg Kroah-Hartman wrote: > >> > > I can't see adding calls like this a

Re: [PATCH v2 1/2] clk: samsung: exynos5250: Add DISP1 clocks

2015-10-16 Thread Tomeu Vizoso
On 16 October 2015 at 19:26, Stephen Boyd wrote: > On 10/16, Michael Turquette wrote: >> Quoting Krzysztof Kozlowski (2015-10-15 16:46:27) >> > On 15.10.2015 19:31, Tomeu Vizoso wrote: >> > > When the DISP1 power domain is powered off, there's two clocks

Re: [PATCH v2 2/2] ARM: dts: exynos5250: Add clocks to DISP1 domain

2015-10-16 Thread Tomeu Vizoso
On 10/16/2015 01:44 AM, Krzysztof Kozlowski wrote: > On 15.10.2015 19:31, Tomeu Vizoso wrote: >> Adds to the node of the DISP1 power domain the two clocks that need to >> be reparented while the domain is powered off: >> CLK_MOUT_ACLK200_DISP1_SUB and CLK_MOUT_ACLK300_DISP1

[GIT PULL] On-demand device probing

2015-10-15 Thread Tomeu Vizoso
(2015-10-15 13:25:47 +0200) Tomeu Vizoso (20): driver core: handle -EPROBE_DEFER from bus_type.match() ARM: amba: Move reading of periphid to amba_match() of/platform: Point to struct device from device node of

[PATCH v2 1/2] clk: samsung: exynos5250: Add DISP1 clocks

2015-10-15 Thread Tomeu Vizoso
igned-off-by: Tomeu Vizoso Acked-by: Stephen Boyd --- Changes in v2: - Reuse mout_aclk200_p - Rename div_aclk300 as div_aclk300_disp drivers/clk/samsung/clk-exynos5250.c | 14 +- include/dt-bindings/clock/exynos5250.h | 4 +++- 2 files changed, 16 insertions(+), 2 deletions(-)

[PATCH v2 0/2] Fix display on second resume on 5250-snow

2015-10-15 Thread Tomeu Vizoso
lk300_disp Tomeu Vizoso (2): clk: samsung: exynos5250: Add DISP1 clocks ARM: dts: exynos5250: Add clocks to DISP1 domain arch/arm/boot/dts/exynos5250.dtsi | 4 drivers/clk/samsung/clk-exynos5250.c | 14 +- include/dt-bindings/clock/exynos5250.h | 4 +++- 3 files c

[PATCH v2 2/2] ARM: dts: exynos5250: Add clocks to DISP1 domain

2015-10-15 Thread Tomeu Vizoso
Adds to the node of the DISP1 power domain the two clocks that need to be reparented while the domain is powered off: CLK_MOUT_ACLK200_DISP1_SUB and CLK_MOUT_ACLK300_DISP1_SUB. Otherwise the state is unknown at power up and the mixer's clocks are all messed up. Signed-off-by: Tomeu Vizoso

[PATCH v1 2/2] ARM: dts: exynos5250: Add clocks to DISP1 domain

2015-10-14 Thread Tomeu Vizoso
Adds to the node of the DISP1 power domain the two clocks that need to be reparented while the domain is powered off: CLK_MOUT_ACLK200_DISP1_SUB and CLK_MOUT_ACLK300_DISP1_SUB. Otherwise the state is unknown at power up and the mixer's clocks are all messed up. Signed-off-by: Tomeu Vizoso

[PATCH v1 1/2] clk: samsung: exynos5250: Add DISP1 clocks

2015-10-14 Thread Tomeu Vizoso
igned-off-by: Tomeu Vizoso --- drivers/clk/samsung/clk-exynos5250.c | 16 +++- include/dt-bindings/clock/exynos5250.h | 4 +++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/clk/samsung/clk-exynos5250.c b/drivers/clk/samsung/clk-exynos5250.c index 55b83c7

[PATCH v1 0/2] Fix display on second resume on 5250-snow

2015-10-14 Thread Tomeu Vizoso
nting beneath our feet. This series tasks the kernel to do the reparenting itself so that the HW state always matches the kernel's internal state. Thanks, Tomeu [0] http://lkml.kernel.org/g/561cdc33.7050...@collabora.com Tomeu Vizoso (2): clk: samsung: exynos5250: Add DISP1 clocks

[GIT PULL] On-demand device probing

2015-10-14 Thread Tomeu Vizoso
://git.collabora.co.uk/git/user/tomeu/linux.git on-demand-probes-for-next for you to fetch changes up to 587402133fe433759d2d535e5d92ead87fd7f615: of/platform: Defer probes of registered devices (2015-10-14 10:08:23 +0200) Tomeu Vizoso (20

Re: [PATCH v6 0/22] On-demand device probing

2015-10-13 Thread Tomeu Vizoso
On 26 September 2015 at 20:17, Rob Herring wrote: > On 09/21/2015 09:02 AM, Tomeu Vizoso wrote: >> Hello, >> >> I have a problem with the panel on my Tegra Chromebook taking longer >> than expected to be ready during boot (Stéphane Marchesin reported what >>

Re: [PATCH v6 0/22] On-demand device probing

2015-09-30 Thread Tomeu Vizoso
On 26 September 2015 at 21:22, Greg Kroah-Hartman wrote: > On Sat, Sep 26, 2015 at 01:17:04PM -0500, Rob Herring wrote: >> On 09/21/2015 09:02 AM, Tomeu Vizoso wrote: >> > Hello, >> > >> > I have a problem with the panel on my Tegra Chromebook taking longer &

[PATCH v7 19/20] driver core: Allow deferring probes until late init

2015-09-29 Thread Tomeu Vizoso
Add a field to struct device that instructs the device-driver core to defer the probe of this device until the late_initcall level. By letting all built-in drivers to register before starting to probe, we can avoid any deferred probes by probing dependencies on demand. Signed-off-by: Tomeu

[PATCH v7 13/20] usb: phy: Probe phy devices on demand

2015-09-29 Thread Tomeu Vizoso
When looking up a phy through its OF node, probe it if it hasn't already. The goal is to reduce deferred probes to a minimum, as it makes it very cumbersome to find out why a device failed to probe, and can introduce very big delays in when a critical device is probed. Signed-off-by:

[PATCH v7 09/20] drm/tegra: Probe dpaux devices on demand

2015-09-29 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- drivers/gpu/drm/tegra/dpaux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c index 224a7dc8e4ed..96a2eec7e020 100644 --- a/drivers/gpu/drm/tegra/dpaux.c +++ b/drivers/gpu/drm/tegra/dpaux.c @@ -12,6

[PATCH v7 10/20] i2c: core: Probe i2c adapters and devices on demand

2015-09-29 Thread Tomeu Vizoso
igned-off-by: Tomeu Vizoso --- drivers/i2c/i2c-core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 5f89f1e3c2f2..02da3acbbd35 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1413,6 +1413,8 @@ struct i2c_c

[PATCH v7 17/20] dma: of: Probe DMA controllers on demand

2015-09-29 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- drivers/dma/of-dma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c index 1e1f2986eba8..e899832f7df3 100644 --- a/drivers/dma/of-dma.c +++ b/drivers/dma/of-dma.c @@ -16,6 +16,7 @@ #include #include #include +#in

[PATCH v7 20/20] of/platform: Defer probes of registered devices

2015-09-29 Thread Tomeu Vizoso
registered already. This allows us to prevent deferred probes by probing dependencies on demand. Signed-off-by: Tomeu Vizoso --- Changes in v7: - Removed patch that moved deferred probe processing to device_initcall_sync, as it's not currently needed and can be applied later if we find any b

[PATCH v7 18/20] power-supply: Probe power supplies on demand

2015-09-29 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- drivers/power/power_supply_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c index 456987c88baa..80bc89f4ae89 100644 --- a/drivers/power/power_supply_core.c +++ b/drivers/power/power_supply_c

[PATCH v7 16/20] phy: core: Probe phy providers on demand

2015-09-29 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- drivers/phy/phy-core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index fc48fac003a6..94e90031d7f3 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -18,6 +18,7 @@ #include #include #in

[PATCH v7 14/20] clk: Probe clk providers on demand

2015-09-29 Thread Tomeu Vizoso
When looking up a clock through its OF node, probe it if it hasn't already. The goal is to reduce deferred probes to a minimum, as it makes it very cumbersome to find out why a device failed to probe, and can introduce very big delays in when a critical device is probed. Signed-off-by:

[PATCH v7 08/20] drm: Probe panels on demand

2015-09-29 Thread Tomeu Vizoso
When looking up a panel through its OF node, probe it if it hasn't already. The goal is to reduce deferred probes to a minimum, as it makes it very cumbersome to find out why a device failed to probe, and can introduce very big delays in when a critical device is probed. Signed-off-by:

[PATCH v7 11/20] pwm: Probe PWM chip devices on demand

2015-09-29 Thread Tomeu Vizoso
When looking up a PWM chip through its OF node, probe it if it hasn't already. The goal is to reduce deferred probes to a minimum, as it makes it very cumbersome to find out why a device failed to probe, and can introduce very big delays in when a critical device is probed. Signed-off-by:

[PATCH v7 12/20] backlight: Probe backlight devices on demand

2015-09-29 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- drivers/video/backlight/backlight.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index bddc8b17a4d8..9bcdc16eacdf 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/back

[PATCH v7 03/20] of/platform: Point to struct device from device node

2015-09-29 Thread Tomeu Vizoso
When adding platform and AMBA devices, set the device node's device member to point to it. This speeds lookups considerably and is safe because we only create one of these devices for any given device node. Signed-off-by: Tomeu Vizoso --- Changes in v5: - Set the pointer to struct device

[PATCH v7 07/20] regulator: core: Probe regulators on demand

2015-09-29 Thread Tomeu Vizoso
When looking up a regulator through its OF node, probe it if it hasn't already. The goal is to reduce deferred probes to a minimum, as it makes it very cumbersome to find out why a device failed to probe, and can introduce very big delays in when a critical device is probed. Signed-off-by:

[PATCH v7 02/20] ARM: amba: Move reading of periphid to amba_match()

2015-09-29 Thread Tomeu Vizoso
ried later. Signed-off-by: Tomeu Vizoso --- Changes in v6: - Drop bus_type.pre_probe and read the periphid in match() instead as suggested by Alan Stern. Changes in v4: - Added bus.pre_probe callback so the probes of Primecell devices can be deferred if their device IDs cannot be yet read because of

[PATCH v7 15/20] pinctrl: Probe pinctrl devices on demand

2015-09-29 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso Acked-by: Linus Walleij --- drivers/pinctrl/devicetree.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c index fe04e748dfe4..f5340b8e1dbe 100644 --- a/drivers/pinctrl/devicetree.c +++ b/drivers/pinctrl/devicet

[PATCH v7 05/20] gpio: Probe GPIO drivers on demand

2015-09-29 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso Acked-by: Linus Walleij --- drivers/gpio/gpiolib-of.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index fa6e3c8823d6..9a439dab7a87 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -19,6

[PATCH v7 06/20] pinctrl: Probe pinctrl devices on demand

2015-09-29 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso Acked-by: Linus Walleij --- drivers/gpio/gpiolib-of.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 9a439dab7a87..05da9a56608d 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -359,6 +

[PATCH v7 04/20] of: add function to allow probing a device from a OF node

2015-09-29 Thread Tomeu Vizoso
to be probed as well (when they get registered). Subsystems can use this when looking up resources for drivers, to reduce the chances of deferred probes because of the probing order of devices. Signed-off-by: Tomeu Vizoso --- Changes in v5: - Move the assignment to device_node->device for AMBA de

[PATCH v7 01/20] driver core: handle -EPROBE_DEFER from bus_type.match()

2015-09-29 Thread Tomeu Vizoso
cally because a clock driver hasn't probed yet). Signed-off-by: Tomeu Vizoso --- drivers/base/dd.c | 24 ++-- include/linux/device.h | 2 +- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/drivers/base/dd.c b/drivers/base/dd.c index be0eb4639128..7d

[PATCH v7 0/20] On-demand device probing

2015-09-29 Thread Tomeu Vizoso
e. - Drop the fwnode API to probe firmware nodes and add OF-only API for now. I think this same scheme could be used for machines with ACPI, but I haven't been able to find one that had to defer its probes because of the device probe order. Tomeu Vizoso (20): driver core: handle -EP

Re: [PATCH v6 0/22] On-demand device probing

2015-09-29 Thread Tomeu Vizoso
On 26 September 2015 at 20:17, Rob Herring wrote: > On 09/21/2015 09:02 AM, Tomeu Vizoso wrote: >> Hello, >> >> I have a problem with the panel on my Tegra Chromebook taking longer >> than expected to be ready during boot (Stéphane Marchesin reported what >>

Re: [PATCH v6 20/22] driver core: Allow deferring probes until late init

2015-09-29 Thread Tomeu Vizoso
On 26 September 2015 at 20:15, Rob Herring wrote: > On 09/21/2015 09:03 AM, Tomeu Vizoso wrote: >> Add a field to struct device that instructs the device-driver core to >> defer the probe of this device until the late_initcall level. > > This is true until the next patch with

Re: [PATCH RESEND] ARM: dts: Move display-timings node from fimd to dp

2015-09-28 Thread Tomeu Vizoso
Hi Kukjin and Krzysztof, could you take a look at this? Thanks, Tomeu On 17 September 2015 at 14:48, Tomeu Vizoso wrote: > From: Sean Paul > > This patch moves the display-timings node from fimd to dp to reflect the > device tree bindings change. > > Signed-off-by: Sean

Re: [PATCH v6 07/22] regulator: core: Remove regulator_list

2015-09-22 Thread Tomeu Vizoso
On 21 September 2015 at 21:38, Mark Brown wrote: > On Mon, Sep 21, 2015 at 04:02:47PM +0200, Tomeu Vizoso wrote: >> As we are already registering a device with regulator_class for each >> regulator device, regulator_list is redundant and can be replaced with >> calls to cl

Re: [PATCH v6 03/22] of/platform: Point to struct device from device node

2015-09-21 Thread Tomeu Vizoso
On 22 September 2015 at 02:39, Rob Herring wrote: > On Mon, Sep 21, 2015 at 9:02 AM, Tomeu Vizoso > wrote: >> When adding platform and AMBA devices, set the device node's device >> member to point to it. >> >> This speeds lookups considerably and is safe bec

[PATCH v6 08/22] regulator: core: Probe regulators on demand

2015-09-21 Thread Tomeu Vizoso
When looking up a regulator through its OF node, probe it if it hasn't already. The goal is to reduce deferred probes to a minimum, as it makes it very cumbersome to find out why a device failed to probe, and can introduce very big delays in when a critical device is probed. Signed-off-by:

[PATCH v6 09/22] drm: Probe panels on demand

2015-09-21 Thread Tomeu Vizoso
When looking up a panel through its OF node, probe it if it hasn't already. The goal is to reduce deferred probes to a minimum, as it makes it very cumbersome to find out why a device failed to probe, and can introduce very big delays in when a critical device is probed. Signed-off-by:

[PATCH v6 13/22] backlight: Probe backlight devices on demand

2015-09-21 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- drivers/video/backlight/backlight.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index bddc8b17a4d8..9bcdc16eacdf 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/back

[PATCH v6 01/22] driver core: handle -EPROBE_DEFER from bus_type.match()

2015-09-21 Thread Tomeu Vizoso
cally because a clock driver hasn't probed yet). Signed-off-by: Tomeu Vizoso --- drivers/base/dd.c | 24 ++-- include/linux/device.h | 2 +- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/drivers/base/dd.c b/drivers/base/dd.c index be0eb4639128..7d

[PATCH v6 07/22] regulator: core: Remove regulator_list

2015-09-21 Thread Tomeu Vizoso
As we are already registering a device with regulator_class for each regulator device, regulator_list is redundant and can be replaced with calls to class_find_device() and class_for_each_device(). Signed-off-by: Tomeu Vizoso --- Changes in v6: - Merge changes to the regulator subsystem&#

[PATCH v6 02/22] ARM: amba: Move reading of periphid to amba_match()

2015-09-21 Thread Tomeu Vizoso
ried later. Signed-off-by: Tomeu Vizoso --- Changes in v6: - Drop bus_type.pre_probe and read the periphid in match() instead as suggested by Alan Stern. Changes in v4: - Added bus.pre_probe callback so the probes of Primecell devices can be deferred if their device IDs cannot be yet read because of

[PATCH v6 10/22] drm/tegra: Probe dpaux devices on demand

2015-09-21 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- drivers/gpu/drm/tegra/dpaux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c index 6aecb6647313..40bdc2a98548 100644 --- a/drivers/gpu/drm/tegra/dpaux.c +++ b/drivers/gpu/drm/tegra/dpaux.c @@ -12,6

Re: [PATCH v5 07/23] regulator: core: Remove regulator_list

2015-09-21 Thread Tomeu Vizoso
On 19 September 2015 at 17:01, Mark Brown wrote: > On Thu, Sep 17, 2015 at 02:57:01PM +0200, Tomeu Vizoso wrote: >> As we are already registering a device with regulator_class for each >> regulator device, regulator_list is redundant and can be replaced with >> calls to cl

Re: [PATCH v5 07/23] regulator: core: Remove regulator_list

2015-09-21 Thread Tomeu Vizoso
On 20 September 2015 at 22:32, Russell King - ARM Linux wrote: > On Sat, Sep 19, 2015 at 08:01:29AM -0700, Mark Brown wrote: >> On Thu, Sep 17, 2015 at 02:57:01PM +0200, Tomeu Vizoso wrote: >> > As we are already registering a device with regulator_class for each >

[PATCH v6 06/22] gpio: Probe pinctrl devices on demand

2015-09-21 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- drivers/gpio/gpiolib-of.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 9a439dab7a87..05da9a56608d 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -359,6 +359,8 @@ stati

[PATCH v6 11/22] i2c: core: Probe i2c adapters and devices on demand

2015-09-21 Thread Tomeu Vizoso
igned-off-by: Tomeu Vizoso --- drivers/i2c/i2c-core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 5f89f1e3c2f2..02da3acbbd35 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1413,6 +1413,8 @@ struct i2c_c

[PATCH v6 05/22] gpio: Probe GPIO drivers on demand

2015-09-21 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- drivers/gpio/gpiolib-of.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index fa6e3c8823d6..9a439dab7a87 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -19,6 +19,7 @@ #include #in

[PATCH v6 12/22] pwm: Probe PWM chip devices on demand

2015-09-21 Thread Tomeu Vizoso
When looking up a PWM chip through its OF node, probe it if it hasn't already. The goal is to reduce deferred probes to a minimum, as it makes it very cumbersome to find out why a device failed to probe, and can introduce very big delays in when a critical device is probed. Signed-off-by:

[PATCH v6 04/22] of: add function to allow probing a device from a OF node

2015-09-21 Thread Tomeu Vizoso
to be probed as well (when they get registered). Subsystems can use this when looking up resources for drivers, to reduce the chances of deferred probes because of the probing order of devices. Signed-off-by: Tomeu Vizoso --- Changes in v5: - Move the assignment to device_node->device for AMBA de

[PATCH v6 0/22] On-demand device probing

2015-09-21 Thread Tomeu Vizoso
and add OF-only API for now. I think this same scheme could be used for machines with ACPI, but I haven't been able to find one that had to defer its probes because of the device probe order. Tomeu Vizoso (22): driver core: handle -EPROBE_DEFER from bus_type.match() ARM: amba: Move reading

[PATCH v6 15/22] clk: Probe clk providers on demand

2015-09-21 Thread Tomeu Vizoso
When looking up a clock through its OF node, probe it if it hasn't already. The goal is to reduce deferred probes to a minimum, as it makes it very cumbersome to find out why a device failed to probe, and can introduce very big delays in when a critical device is probed. Signed-off-by:

[PATCH v6 17/22] phy: core: Probe phy providers on demand

2015-09-21 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- drivers/phy/phy-core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index fc48fac003a6..94e90031d7f3 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -18,6 +18,7 @@ #include #include #in

[PATCH v6 21/22] driver core: Start processing deferred probes earlier

2015-09-21 Thread Tomeu Vizoso
device_initcall_sync we increase the chances that the initcalls mentioned before will find the devices they depend on to have already probed. Signed-off-by: Tomeu Vizoso --- Changes in v4: - Start processing deferred probes in device_initcall_sync drivers/base/dd.c | 4 ++-- 1 file changed, 2

[PATCH v6 16/22] pinctrl: Probe pinctrl devices on demand

2015-09-21 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- drivers/pinctrl/devicetree.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c index fe04e748dfe4..f5340b8e1dbe 100644 --- a/drivers/pinctrl/devicetree.c +++ b/drivers/pinctrl/devicetree.c @@ -18,6

[PATCH v6 20/22] driver core: Allow deferring probes until late init

2015-09-21 Thread Tomeu Vizoso
Add a field to struct device that instructs the device-driver core to defer the probe of this device until the late_initcall level. By letting all built-in drivers to register before starting to probe, we can avoid any deferred probes by probing dependencies on demand. Signed-off-by: Tomeu

[PATCH v6 22/22] of/platform: Defer probes of registered devices

2015-09-21 Thread Tomeu Vizoso
registered already. This allows us to prevent deferred probes by probing dependencies on demand. Signed-off-by: Tomeu Vizoso --- Changes in v4: - Also defer probes of AMBA devices registered from the DT as they can also request resources. drivers/of/platform.c | 11 --- 1 file changed, 8

[PATCH v6 18/22] dma: of: Probe DMA controllers on demand

2015-09-21 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- drivers/dma/of-dma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c index 1e1f2986eba8..e899832f7df3 100644 --- a/drivers/dma/of-dma.c +++ b/drivers/dma/of-dma.c @@ -16,6 +16,7 @@ #include #include #include +#in

[PATCH v6 03/22] of/platform: Point to struct device from device node

2015-09-21 Thread Tomeu Vizoso
When adding platform and AMBA devices, set the device node's device member to point to it. This speeds lookups considerably and is safe because we only create one of these devices for any given device node. Signed-off-by: Tomeu Vizoso --- Changes in v5: - Set the pointer to struct device

[PATCH v6 19/22] power-supply: Probe power supplies on demand

2015-09-21 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- drivers/power/power_supply_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c index 456987c88baa..80bc89f4ae89 100644 --- a/drivers/power/power_supply_core.c +++ b/drivers/power/power_supply_c

[PATCH v6 14/22] usb: phy: Probe phy devices on demand

2015-09-21 Thread Tomeu Vizoso
When looking up a phy through its OF node, probe it if it hasn't already. The goal is to reduce deferred probes to a minimum, as it makes it very cumbersome to find out why a device failed to probe, and can introduce very big delays in when a critical device is probed. Signed-off-by:

Re: [PATCH v5 01/23] driver core: Add pre_probe callback to bus_type

2015-09-18 Thread Tomeu Vizoso
On 17 September 2015 at 17:52, Alan Stern wrote: > On Thu, 17 Sep 2015, Tomeu Vizoso wrote: > >> Some buses (eg. AMBA) need access to some HW resources (it may need a >> clock to be enabled so a device ID can be read) before a device can be >> matched to a driver. >

[PATCH v5 01/23] driver core: Add pre_probe callback to bus_type

2015-09-17 Thread Tomeu Vizoso
of the resources needed are missing. This gives us more flexibility when setting the order in which devices are probed because the resources needed to get the matching information don't need to be available by the time that the bus devices are registered. Signed-off-by: Tomeu Vizoso --- Ch

[PATCH v5 04/23] of: add function to allow probing a device from a OF node

2015-09-17 Thread Tomeu Vizoso
to be probed as well (when they get registered). Subsystems can use this when looking up resources for drivers, to reduce the chances of deferred probes because of the probing order of devices. Signed-off-by: Tomeu Vizoso --- Changes in v5: - Move the assignment to device_node->device for AMBA de

[PATCH v5 05/23] gpio: Probe GPIO drivers on demand

2015-09-17 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/gpio/gpiolib-of.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index fa6e3c8823d6..9a439dab7a87 100644 --- a/drivers

[PATCH v5 02/23] ARM: amba: Move reading of periphid to pre_probe()

2015-09-17 Thread Tomeu Vizoso
order requirements. Signed-off-by: Tomeu Vizoso --- Changes in v5: None Changes in v4: - Added bus.pre_probe callback so the probes of Primecell devices can be deferred if their device IDs cannot be yet read because of the clock driver not having probed when they are registered. Maybe this goes over

[PATCH v5 08/23] regulator: core: Drop redundant locking

2015-09-17 Thread Tomeu Vizoso
reg_fixed_voltage_probe regulator_register Signed-off-by: Tomeu Vizoso --- Changes in v5: - Use regulator_class' klist of devices instead of regulator_list to store and lookup regulator devices. Changes in v4: - Take a refe

[PATCH v5 11/23] drm/tegra: Probe dpaux devices on demand

2015-09-17 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/gpu/drm/tegra/dpaux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c index 6aecb6647313..40bdc2a98548 100644 --- a/dr

[PATCH v5 14/23] backlight: Probe backlight devices on demand

2015-09-17 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/video/backlight/backlight.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index bddc8b1

[PATCH v5 10/23] drm: Probe panels on demand

2015-09-17 Thread Tomeu Vizoso
When looking up a panel through its OF node, probe it if it hasn't already. The goal is to reduce deferred probes to a minimum, as it makes it very cumbersome to find out why a device failed to probe, and can introduce very big delays in when a critical device is probed. Signed-off-by:

[PATCH v5 09/23] regulator: core: Probe regulators on demand

2015-09-17 Thread Tomeu Vizoso
When looking up a regulator through its OF node, probe it if it hasn't already. The goal is to reduce deferred probes to a minimum, as it makes it very cumbersome to find out why a device failed to probe, and can introduce very big delays in when a critical device is probed. Signed-off-by:

[PATCH v5 07/23] regulator: core: Remove regulator_list

2015-09-17 Thread Tomeu Vizoso
As we are already registering a device with regulator_class for each regulator device, regulator_list is redundant and can be replaced with calls to class_find_device() and class_for_each_device(). Signed-off-by: Tomeu Vizoso --- Changes in v5: None Changes in v4: None Changes in v3: None

[PATCH v5 15/23] usb: phy: Probe phy devices on demand

2015-09-17 Thread Tomeu Vizoso
When looking up a phy through its OF node, probe it if it hasn't already. The goal is to reduce deferred probes to a minimum, as it makes it very cumbersome to find out why a device failed to probe, and can introduce very big delays in when a critical device is probed. Signed-off-by:

[PATCH v5 13/23] pwm: Probe PWM chip devices on demand

2015-09-17 Thread Tomeu Vizoso
When looking up a PWM chip through its OF node, probe it if it hasn't already. The goal is to reduce deferred probes to a minimum, as it makes it very cumbersome to find out why a device failed to probe, and can introduce very big delays in when a critical device is probed. Signed-off-by:

[PATCH v5 12/23] i2c: core: Probe i2c adapters and devices on demand

2015-09-17 Thread Tomeu Vizoso
igned-off-by: Tomeu Vizoso --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/i2c/i2c-core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 5f89f1e3c2f2..02da3acbbd35 100644 --- a/drivers/i2

[PATCH v5 16/23] clk: Probe clk providers on demand

2015-09-17 Thread Tomeu Vizoso
When looking up a clock through its OF node, probe it if it hasn't already. The goal is to reduce deferred probes to a minimum, as it makes it very cumbersome to find out why a device failed to probe, and can introduce very big delays in when a critical device is probed. Signed-off-by:

[PATCH v5 18/23] phy: core: Probe phy providers on demand

2015-09-17 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/phy/phy-core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index fc48fac003a6..94e90031d7f3 100644 --- a/drivers/phy/phy-core.c

[PATCH v5 19/23] dma: of: Probe DMA controllers on demand

2015-09-17 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/dma/of-dma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c index 1e1f2986eba8..e899832f7df3 100644 --- a/drivers/dma/of-dma.c

[PATCH v5 17/23] pinctrl: Probe pinctrl devices on demand

2015-09-17 Thread Tomeu Vizoso
ff-by: Tomeu Vizoso --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/pinctrl/devicetree.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c index fe04e748dfe4..f5340b8e1dbe 100644 --- a/dr

  1   2   3   4   5   >