Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1229418
| From | Tomeu Vizoso <tomeu.vizoso@collabora.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v6 11/22] i2c: core: Probe i2c adapters and devices on demand |
| Date | 2015-09-21 16:20 +0200 |
| Message-ID | <qba6L-CY-27@gated-at.bofh.it> (permalink) |
| References | <qb9X3-rF-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
When looking up an i2c adapter or device 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: Tomeu Vizoso <tomeu.vizoso@collabora.com> --- 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_client *of_find_i2c_device_by_node(struct device_node *node) struct device *dev; struct i2c_client *client; + of_device_probe(node); + dev = bus_find_device(&i2c_bus_type, NULL, node, of_dev_node_match); if (!dev) return NULL; @@ -1431,6 +1433,8 @@ struct i2c_adapter *of_find_i2c_adapter_by_node(struct device_node *node) struct device *dev; struct i2c_adapter *adapter; + of_device_probe(node); + dev = bus_find_device(&i2c_bus_type, NULL, node, of_dev_node_match); if (!dev) return NULL; -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v6 0/22] On-demand device probing Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
[PATCH v6 14/22] usb: phy: Probe phy devices on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
[PATCH v6 09/22] drm: Probe panels on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
[PATCH v6 12/22] pwm: Probe PWM chip devices on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
[PATCH v6 01/22] driver core: handle -EPROBE_DEFER from bus_type.match() Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
[PATCH v6 15/22] clk: Probe clk providers on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
[PATCH v6 19/22] power-supply: Probe power supplies on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
[PATCH v6 20/22] driver core: Allow deferring probes until late init Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
[PATCH v6 16/22] pinctrl: Probe pinctrl devices on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
[PATCH v6 17/22] phy: core: Probe phy providers on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
[PATCH v6 21/22] driver core: Start processing deferred probes earlier Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
[PATCH v6 07/22] regulator: core: Remove regulator_list Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:20 +0200
Re: [PATCH v6 07/22] regulator: core: Remove regulator_list Mark Brown <broonie@kernel.org> - 2015-09-21 21:40 +0200
Re: [PATCH v6 07/22] regulator: core: Remove regulator_list Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-22 09:30 +0200
[PATCH v6 02/22] ARM: amba: Move reading of periphid to amba_match() Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:20 +0200
[PATCH v6 04/22] of: add function to allow probing a device from a OF node Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:20 +0200
[PATCH v6 05/22] gpio: Probe GPIO drivers on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:20 +0200
[PATCH v6 11/22] i2c: core: Probe i2c adapters and devices on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:20 +0200
[PATCH v6 06/22] gpio: Probe pinctrl devices on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:20 +0200
csiph-web