All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/13] Discover and probe dependencies
@ 2015-06-17 13:42 ` Tomeu Vizoso
  0 siblings, 0 replies; 92+ messages in thread
From: Tomeu Vizoso @ 2015-06-17 13:42 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Tomeu Vizoso, Alexander Holler, Alexandre Courbot, Andrzej Hajda,
	Arnd Bergmann, Dmitry Torokhov, Grant Likely, Greg Kroah-Hartman,
	Ian Campbell, Javier Martinez Canillas, Krzysztof Kozlowski,
	Kumar Gala, Len Brown, Linus Walleij, linux-kernel, Lv Zheng,
	Mark Brown, Mark Rutland, Pawel Moll, Rafael J. Wysocki,
	Robert Moore, Rob Herring, Russell King, Stephen Warren,
	Terje Bergström, Thierry Reding

Hi,

this is another attempt at preventing deferred probe from obscuring why your
devices aren't probing and from delaying to the end of the boot process the
probe of the device you care the most.

The major differences with my previous approach [0] are:

* Dependencies are probed before the target is probed, so we don't have nested
  probe() calls, avoiding a series of deadlock situations.

* Dependencies could be stored and reused for other purposes such as for
  passing resources to drivers ala devm_probe, or for warning when a device is
  going to be unbound and has dependencies active, etc.

* I have tried to keep it firmware-agnostic. The previous approach (on-demand
  probing) could be done like this as well, but would require adding fwnode
  APIs to all affected subsystems first.

I have only implemented the class.get_dependencies() callback for the GPIO
subsystem and for the host1x bus because that's all that was needed on my Tegra
Chromebook to avoid deferred probes, but if this approach is deemed worthwhile
I will add more implementations so that deferred probes are avoided on the
other boards I have access to.

[0] http://thread.gmane.org/gmane.linux.kernel.gpio/8465

Thanks,

Tomeu

Tomeu Vizoso (13):
  gpiolib: Fix docs for gpiochip_add_pingroup_range
  driver-core: defer all probes until late_initcall
  ARM: tegra: Add gpio-ranges property
  pinctrl: tegra: Only set the gpio range if needed
  driver core: fix docbook for device_private.device
  of/platform: Set fwnode field for new devices
  driver-core: Add class.get_dependencies() callback
  gpio: sysfs: implement class.get_dependencies()
  gpu: host1x: implement class.get_dependencies()
  driver-core: add for_each_class()
  device property: add fwnode_get_parent()
  device property: add fwnode_get_name()
  driver-core: probe dependencies before probing

 arch/arm/boot/dts/tegra114.dtsi |   1 +
 arch/arm/boot/dts/tegra124.dtsi |   1 +
 arch/arm/boot/dts/tegra20.dtsi  |   1 +
 arch/arm/boot/dts/tegra30.dtsi  |   1 +
 drivers/base/base.h             |   4 +-
 drivers/base/class.c            |  16 +++++
 drivers/base/dd.c               | 128 +++++++++++++++++++++++++++++++++++++++-
 drivers/base/property.c         |  38 ++++++++++++
 drivers/gpio/gpiolib-sysfs.c    |  81 +++++++++++++++++++++++++
 drivers/gpio/gpiolib.c          |   2 +-
 drivers/gpu/host1x/dev.c        |  47 +++++++++++++++
 drivers/of/platform.c           |   1 +
 drivers/pinctrl/pinctrl-tegra.c |  19 +++++-
 include/acpi/acpi_bus.h         |   5 ++
 include/linux/acpi.h            |   5 ++
 include/linux/device.h          |   6 ++
 include/linux/fwnode.h          |   5 ++
 include/linux/property.h        |   4 ++
 18 files changed, 361 insertions(+), 4 deletions(-)

-- 
2.4.1


^ permalink raw reply	[flat|nested] 92+ messages in thread

end of thread, other threads:[~2015-07-17  9:36 UTC | newest]

Thread overview: 92+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-17 13:42 [PATCH 00/13] Discover and probe dependencies Tomeu Vizoso
2015-06-17 13:42 ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 01/13] gpiolib: Fix docs for gpiochip_add_pingroup_range Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-07-13 12:16   ` Linus Walleij
2015-07-13 12:16     ` Linus Walleij
2015-06-17 13:42 ` [PATCH 02/13] driver-core: defer all probes until late_initcall Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-18 21:50   ` Rafael J. Wysocki
2015-06-18 21:50     ` Rafael J. Wysocki
2015-06-19 13:36     ` Tomeu Vizoso
2015-06-19 13:36       ` Tomeu Vizoso
2015-06-19 23:20       ` Rafael J. Wysocki
2015-06-19 23:20         ` Rafael J. Wysocki
2015-06-23  0:07         ` Rob Herring
2015-06-23  0:07           ` Rob Herring
2015-06-23 14:37           ` Rafael J. Wysocki
2015-06-23 14:37             ` Rafael J. Wysocki
2015-06-23 14:17             ` Tomeu Vizoso
2015-06-23 14:17               ` Tomeu Vizoso
2015-06-23 14:51               ` Rafael J. Wysocki
2015-06-23 14:51                 ` Rafael J. Wysocki
2015-06-23 14:37                 ` Tomeu Vizoso
2015-06-23 14:37                   ` Tomeu Vizoso
2015-06-24  0:14                   ` Rafael J. Wysocki
2015-06-24  0:14                     ` Rafael J. Wysocki
2015-06-17 13:42 ` [PATCH 03/13] ARM: tegra: Add gpio-ranges property Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 17:25   ` Mark Brown
2015-06-17 17:25     ` Mark Brown
2015-06-18  8:06     ` Tomeu Vizoso
2015-06-18  8:06       ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 04/13] pinctrl: tegra: Only set the gpio range if needed Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-07-13 20:14   ` Linus Walleij
2015-07-13 20:14     ` Linus Walleij
2015-07-14  8:34     ` Tomeu Vizoso
2015-07-14  8:34       ` Tomeu Vizoso
2015-07-15  3:17       ` Alexandre Courbot
2015-07-15  3:17         ` Alexandre Courbot
2015-07-15  8:13         ` Tomeu Vizoso
2015-07-15  8:13           ` Tomeu Vizoso
2015-07-17  8:04       ` Linus Walleij
2015-07-17  8:04         ` Linus Walleij
2015-07-17  8:19         ` Tomeu Vizoso
2015-07-17  8:19           ` Tomeu Vizoso
2015-07-17  9:36           ` Linus Walleij
2015-07-17  9:36             ` Linus Walleij
2015-06-17 13:42 ` [PATCH 05/13] driver core: fix docbook for device_private.device Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 06/13] of/platform: Set fwnode field for new devices Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 17:27   ` Mark Brown
2015-06-17 17:27     ` Mark Brown
2015-06-17 13:42 ` [PATCH 07/13] driver-core: Add class.get_dependencies() callback Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 08/13] gpio: sysfs: implement class.get_dependencies() Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 17:40   ` Mark Brown
2015-06-17 17:40     ` Mark Brown
2015-06-30 15:00     ` Tomeu Vizoso
2015-06-30 15:00       ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 09/13] gpu: host1x: " Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 10/13] driver-core: add for_each_class() Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 11/13] device property: add fwnode_get_parent() Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 12/13] device property: add fwnode_get_name() Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 13/13] driver-core: probe dependencies before probing Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 18:13   ` Mark Brown
2015-06-17 18:13     ` Mark Brown
2015-06-30 15:18     ` Tomeu Vizoso
2015-06-30 15:18       ` Tomeu Vizoso
2015-06-18  9:42 ` [PATCH 00/13] Discover and probe dependencies Andrzej Hajda
2015-06-18  9:42   ` Andrzej Hajda
2015-06-18  9:57   ` Russell King - ARM Linux
2015-06-18  9:57     ` Russell King - ARM Linux
2015-06-18 10:36   ` Mark Brown
2015-06-18 10:36     ` Mark Brown
2015-06-18 13:14     ` Andrzej Hajda
2015-06-18 13:14       ` Andrzej Hajda
2015-06-18 14:38       ` Tomeu Vizoso
2015-06-18 14:38         ` Tomeu Vizoso
2015-06-18 14:49       ` Russell King - ARM Linux
2015-06-18 14:49         ` Russell King - ARM Linux
2015-06-18 15:32         ` Alexander Holler
2015-06-18 15:32           ` Alexander Holler
2015-06-18 14:57   ` Tomeu Vizoso
2015-06-18 14:57     ` Tomeu Vizoso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.