Skip to contentSkip to conversation

i2c: Let users disable "Probe an I2C bus for certain devices"

PATCH In review Grygorii Strashko 2 participants 13 messages Jun 4, 2013 – Jun 20, 2013

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: Let users disable "Probe an I2C bus for certain devices"

Currently the I2C devices instantiation Method 3 "Probe an I2C bus for certain devices" (see Documentation/i2c/instantiating-devices) is always enabled for all platforms (boards) and can't be disabled.
This feature introduces a system boot time delay for boards, where I2C devices topology is explicitly defined in DT or platform code (Method 1 and Method 2 are used only) and especially when i2c-gpio is used.

For example:
When CONFIG_SENSORS_LM75 option was enabled for omap4-sdp board - it introduces 5-6 ms boot delay.

When CONFIG_SENSORS_LM75 option was enabled for omap5-uevm board, where i2c-gpio is used for HDMI edid reading - it introduces up to 5 sec boot delay.

Hence, introduce CONFIG_I2C_DISABLE_DEVICE_DETECTION configuration option to allow disabling of I2C devices instantiation Method 3 "Probe an I2C bus for certain devices" if it's not needed (usually for embedded systems).

---
 drivers/i2c/Kconfig    |   10 ++++++++++
 drivers/i2c/i2c-core.c |    6 ++++++
 2 files changed, 16 insertions(+)
drivers/i2c/Kconfig +10 -0
index e380c6e..f7b220b 100644
@@ -124,4 +124,14 @@ config I2C_DEBUG_BUS
 	  a problem with I2C support and want to see more of what is going
 	  on.
 
+config I2C_DISABLE_DEVICE_DETECTION
+	bool "I2C Disable device detection"
+	default n
+	help
+	  Say Y here, if you have explicitly defined I2C device topology in DT
+	  or platform code and don't need to detect presence of supported I2C
+	  devices automatically (Documentation/i2c/instantiating-devices -
+	  Method 1 and Method 2 are used only). Enabling this option allows to
+	  reduce system boot time, especially in case when i2c-gpio driver is used.
+
 endif # I2C
drivers/i2c/i2c-core.c +6 -0
index 48e31ed..d5ab7a3 100644
@@ -54,7 +54,9 @@ static DEFINE_MUTEX(core_lock);
 static DEFINE_IDR(i2c_adapter_idr);
 
 static struct device_type i2c_client_type;
+#ifndef CONFIG_I2C_DISABLE_DEVICE_DETECTION
 static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver);
+#endif
 
 /* ------------------------------------------------------------------------- */
 
@@ -958,7 +960,9 @@ static int i2c_do_add_adapter(struct i2c_driver *driver,
 			      struct i2c_adapter *adap)
 {
 	/* Detect supported devices on that bus, and instantiate them */
+#ifndef CONFIG_I2C_DISABLE_DEVICE_DETECTION
 	i2c_detect(adap, driver);
+#endif
 
 	/* Let legacy drivers scan this bus for matching devices */
 	if (driver->attach_adapter) {
@@ -1672,6 +1676,7 @@ static int i2c_default_probe(struct i2c_adapter *adap, unsigned short addr)
 	return err >= 0;
 }
 
+#ifndef CONFIG_I2C_DISABLE_DEVICE_DETECTION
 static int i2c_detect_address(struct i2c_client *temp_client,
 			      struct i2c_driver *driver)
 {
@@ -1760,6 +1765,7 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver)
 	kfree(temp_client);
 	return err;
 }
+#endif
 
 int i2c_probe_func_quick_read(struct i2c_adapter *adap, unsigned short addr)
 {
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 3 lines · Grygorii Strashko

Currently the I2C devices instantiation Method 3 "Probe an I2C bus for certain devices" (see Documentation/i2c/instantiating-devices) is always enabled for all platforms (boards) and can't be disabled.

Not true. Set .class = 0 for your adapter. I always ask authors of new drivers if they really need to set .class to something.

#2 lore raw

Hi

Quoted 8 lines · Wolfram Sang
Quoted 3 lines · Grygorii Strashko

Currently the I2C devices instantiation Method 3 "Probe an I2C bus for certain devices" (see Documentation/i2c/instantiating-devices) is always enabled for all platforms (boards) and can't be disabled.

Not true. Set .class = 0 for your adapter. I always ask authors of new drivers if they really need to set .class to something.

Agree, sorry, my statement is wrong. it would be right to say "..can't be disabled without kernel code modification".

Few notes here:
1) boot delay issue isn't related to new drivers. There are hwmon/lm75.c, i2c/busses/i2c-gpio.c and i2c/busses/i2c-omap.c

2) Initially, I've fighted with it on TI K3.4 product kernel where DT isn't supported yet. And first thing, which I've tried to do is to correct .class parameter for adapter, but with assumption:
"Default behavior shouldn't be changed as I2C detection might be used by some of OMAP boards".

I've started from i2c-omap.c and OMAP4/5 (my target). As result, I was need to make changes in *7* files to set and pass platform parameter to i2c-omap.c driver which will allow to change .class to 0 on demand.

At this point, I've realized that i still need to deal with i2c-gpio.c - which is generic driver.

3) Thinking about Mainline: To reach the same target - no I2C detection - and taking into account above assumption "No changes in default behavior"
the following will need to be done:
- change i2c-omap/i2c-gpio DT bindings and add parameter which will allow to change .class value for adapter. Not sure, it's possible because this parameter will be Linux and not HW specific (smth. like "i2c_disable_detection")
- update drivers i2c-omap/i2c-gpio to use "i2c_disable_detection"
- update OMAP4/5 DTS files

So, It seemed a good solution for me to add 6 lines of code in i2c-core.c instead of doing all that stuff.

Thanks/sorry for your time.

- grygorii

#3 lore raw
Quoted 12 lines

3) Thinking about Mainline: To reach the same target - no I2C detection - and taking
into account above assumption "No changes in default behavior" the following will need to be done:
- change i2c-omap/i2c-gpio DT bindings and add parameter which will allow to change
.class value for adapter. Not sure, it's possible because this parameter will be Linux and not HW specific (smth. like "i2c_disable_detection")
- update drivers i2c-omap/i2c-gpio to use "i2c_disable_detection"
- update OMAP4/5 DTS files

Quoted 2 lines

So, It seemed a good solution for me to add 6 lines of code in i2c-core.c instead of doing all that stuff.

Well... I understand the "default behaviour" issue, yet I still think that setting class to 0 is the right thing to do. OMAP is an embedded SoC which always had i2c_board_info or devictree which are the preferred ways of instantiating. Given that, I would accept a patch setting it to
0. The more user friendly way might be to introduce a new class which makes users aware of the issue. Proof of concept follows, only compile tested.

#4 lore raw

RFC 1/1 i2c: add deprecation warning for class based instantiation

Class based instantiation can cause huge delays when booting. This mechanism was used when it was not possible to describe slaves on I2C busses. We now have other mechanisms, so most embedded I2C will not need classes and it was explicitly not recommended to use them. Add a deprecation warning for drivers who want to disable class based in the near future to gain boot-up time, so users relying on this technique can switch to something better. They really should.

---
 drivers/i2c/busses/i2c-omap.c |    2 +-
 drivers/i2c/i2c-core.c        |    6 ++++++
 include/linux/i2c.h           |    1 +
 3 files changed, 8 insertions(+), 1 deletion(-)
drivers/i2c/busses/i2c-omap.c +1 -1
index e02f9e3..f06109f 100644
@@ -1231,7 +1231,7 @@ omap_i2c_probe(struct platform_device *pdev)
 	adap = &dev->adapter;
 	i2c_set_adapdata(adap, dev);
 	adap->owner = THIS_MODULE;
-	adap->class = I2C_CLASS_HWMON;
+	adap->class = I2C_CLASS_HWMON | I2C_CLASS_DEPRECATED;
 	strlcpy(adap->name, "OMAP I2C adapter", sizeof(adap->name));
 	adap->algo = &omap_i2c_algo;
 	adap->dev.parent = &pdev->dev;
drivers/i2c/i2c-core.c +6 -0
index 48e31ed..47ea1f0 100644
@@ -999,6 +999,12 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
 		return -EINVAL;
 	}
 
+	if (adap->class & I2C_CLASS_DEPRECATED)
+		dev_warn(&adap->dev, "This adapter will soon drop class based "
+			"instantiation of slaves\nPlease make sure all its I2C "
+			"devices are instantiated by other means.\nCheck "
+			"'Documentation/i2c/instantiating-devices' for details\n");
+
 	rt_mutex_init(&adap->bus_lock);
 	mutex_init(&adap->userspace_clients_lock);
 	INIT_LIST_HEAD(&adap->userspace_clients);
include/linux/i2c.h +1 -0
index e988fa9..ffab838 100644
@@ -473,6 +473,7 @@ void i2c_unlock_adapter(struct i2c_adapter *);
 #define I2C_CLASS_HWMON		(1<<0)	/* lm_sensors, ... */
 #define I2C_CLASS_DDC		(1<<3)	/* DDC bus on graphics adapters */
 #define I2C_CLASS_SPD		(1<<7)	/* Memory modules */
+#define I2C_CLASS_DEPRECATED	(1<<8)	/* Warn users that adapter will stop using classes */
 
 /* Internal numbers to terminate lists */
 #define I2C_CLIENT_END		0xfffeU
Signature · 1 line
1.7.10.4
#11 lore raw
In reply to Wolfram Sang

Hi Wolfram,

Quoted 13 lines · Wolfram Sang
Quoted 11 lines

3) Thinking about Mainline: To reach the same target - no I2C detection - and taking
into account above assumption "No changes in default behavior" the following will need to be done:
- change i2c-omap/i2c-gpio DT bindings and add parameter which will allow to change
.class value for adapter. Not sure, it's possible because this parameter will be Linux and not HW specific (smth. like "i2c_disable_detection")
- update drivers i2c-omap/i2c-gpio to use "i2c_disable_detection"
- update OMAP4/5 DTS files

Quoted 2 lines

So, It seemed a good solution for me to add 6 lines of code in i2c-core.c instead of doing all that stuff.

Quoted 8 lines

Well... I understand the "default behaviour" issue, yet I still think that setting class to 0 is the right thing to do. OMAP is an embedded SoC which always had i2c_board_info or devictree which are the preferred ways of instantiating. Given that, I would accept a patch setting it to
0. The more user friendly way might be to introduce a new class which makes users aware of the issue. Proof of concept follows, only compile tested.

That sounds good to me - I can prepare patch for i2c-omap.c. But, there is still an open question regarding *i2c-gpio.c* which, actually, a source of biggest part of delay.

Potentially, it can be tunned using "timeout" value. But, again, this is additional work/patches to workaround unneeded system feature:
- "timeout" should not break interaction with I2C devices on i2c-gpio bus and, at same time, speed up boot;
- DTS/board files need to be updated.

May be, just may be), we can continue with CONFIG_I2C_DISABLE_DEVICE_DETECTION, and print deprecation warning for each registered adapter
if this config option is defined.

- grygorii

#12 lore raw
Quoted 4 lines

That sounds good to me - I can prepare patch for i2c-omap.c. But, there is still an open question regarding *i2c-gpio.c* which, actually, a source of biggest part of delay.

Why should the DEPRECATED flag not work with i2c-gpio?

#5 lore raw

Re: [RFC] i2c: add deprecation warning for class based instantiation

In reply to Wolfram Sang
Quoted 9 lines · Wolfram Sang

Class based instantiation can cause huge delays when booting. This mechanism was used when it was not possible to describe slaves on I2C busses. We now have other mechanisms, so most embedded I2C will not need classes and it was explicitly not recommended to use them. Add a deprecation warning for drivers who want to disable class based in the near future to gain boot-up time, so users relying on this technique can switch to something better. They really should.

No reactions on this, pity. Deferring.

#6 lore raw

Re: [RFC] i2c: add deprecation warning for class based instantiation

Hi Wolfram,

Quoted 9 lines · Wolfram Sang
Quoted 8 lines · Wolfram Sang

Class based instantiation can cause huge delays when booting. This mechanism was used when it was not possible to describe slaves on I2C busses. We now have other mechanisms, so most embedded I2C will not need classes and it was explicitly not recommended to use them. Add a deprecation warning for drivers who want to disable class based in the near future to gain boot-up time, so users relying on this technique can switch to something better. They really should.

Quoted 3 lines
Quoted 1 line

No reactions on this, pity. Deferring.

Sorry, for delayed reply - I've had problems with my e-mail.

I've tested this patch on our TI K3.4 product kernel with additional change below:

drivers/i2c/busses/i2c-gpio.c +1 -1
index c0330a4..442101d 100644
@@ -186,7 +186,7 @@ static int __devinit i2c_gpio_probe(struct platform_device *pdev)
        adap->owner = THIS_MODULE;
        snprintf(adap->name, sizeof(adap->name), "i2c-gpio%d", pdev->id);
        adap->algo_data = bit_data;
-       adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
+       adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD | I2C_CLASS_DEPRECATED;
        adap->dev.parent = &pdev->dev;
        adap->dev.of_node = pdev->dev.of_node;
 

It works fine, in general - see my minor comment inline.

[    0.662536] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 400 kHz
[    0.662567]  (null): This adapter will soon drop class based instantiation of slaves
                ^^^^^ invalid adapter device name here
[    0.662567] Please make sure all its I2C devices are instantiated by other means.
[    0.662567] Check 'Documentation/i2c/instantiating-devices' for details

Also tested on Linux master - OMAP4 SDP board.

In addition, I've found the following users of *i2c-gpio* (just FYI):
./arch/powerpc/boot/dts/wii.dts: compatible = "i2c-gpio";
./arch/mips/alchemy/board-gpr.c: .name = "i2c-gpio",
./arch/mips/ath79/mach-pb44.c: .name = "i2c-gpio",
./arch/avr32/boards/merisc/setup.c: .name = "i2c-gpio",
./arch/avr32/boards/atngw100/setup.c: .name = "i2c-gpio",
./arch/avr32/boards/hammerhead/setup.c: .name = "i2c-gpio",
./arch/avr32/boards/mimc200/setup.c: .name = "i2c-gpio",
./arch/blackfin/mach-bf533/boards/blackstamp.c: .name = "i2c-gpio",

./arch/blackfin/mach-bf533/boards/ezkit.c:    .name        = "i2c-gpio",
./arch/blackfin/mach-bf533/boards/stamp.c:    .name        = "i2c-gpio",
./arch/blackfin/mach-bf561/boards/ezkit.c:    .name        = "i2c-gpio",

./arch/arm/mach-ep93xx/core.c: .name = "i2c-gpio",
./arch/arm/mach-shmobile/board-armadillo800eva.c: .name = "i2c-gpio",
./arch/arm/mach-pxa/viper.c: .name = "i2c-gpio",
./arch/arm/mach-pxa/viper.c: tpm_device = platform_device_alloc("i2c-gpio", 2);
./arch/arm/mach-pxa/palmz72.c: .name = "i2c-gpio",
./arch/arm/boot/dts/at91sam9g45.dtsi: compatible = "i2c-gpio";
./arch/arm/boot/dts/at91sam9263.dtsi: compatible = "i2c-gpio";

./arch/arm/boot/dts/at91sam9x5.dtsi:        compatible = "i2c-gpio";
./arch/arm/boot/dts/at91sam9x5.dtsi:        compatible = "i2c-gpio";
./arch/arm/boot/dts/at91sam9x5.dtsi:        compatible = "i2c-gpio";
./arch/arm/boot/dts/usb_a9g20-dab-mmx.dtsi:    i2c-gpio@0 {
./arch/arm/boot/dts/ste-nomadik-stn8815.dtsi:        compatible = "i2c-gpio";
./arch/arm/boot/dts/ste-nomadik-stn8815.dtsi:        compatible = "i2c-gpio";
./arch/arm/boot/dts/ste-nomadik-stn8815.dtsi:        compatible = "i2c-gpio";

./arch/arm/boot/dts/at91sam9260.dtsi: compatible = "i2c-gpio";
./arch/arm/boot/dts/at91rm9200.dtsi: compatible = "i2c-gpio";
./arch/arm/boot/dts/at91sam9n12.dtsi: compatible = "i2c-gpio";
./arch/arm/mach-ks8695/board-acs5k.c: .name = "i2c-gpio",

./arch/arm/mach-s5pv210/mach-goni.c:    .name        = "i2c-gpio",
./arch/arm/mach-s5pv210/mach-goni.c:    .name        = "i2c-gpio",
./arch/arm/mach-s5pv210/mach-aquila.c:    .name        = "i2c-gpio",
./arch/arm/mach-s5pv210/mach-aquila.c:    .name        = "i2c-gpio",
./arch/arm/mach-sa1100/simpad.c:    .name = "i2c-gpio",
./arch/arm/mach-exynos/mach-universal_c210.c:    .name        = "i2c-gpio",
./arch/arm/mach-exynos/mach-nuri.c:    .name            = "i2c-gpio",
./arch/arm/mach-at91/at91sam9263_devices.c:    .name            = "i2c-gpio",
./arch/arm/mach-at91/at91sam9261_devices.c:    .name            = "i2c-gpio",
./arch/arm/mach-at91/at91sam9g45_devices.c:    .name            = "i2c-gpio",
./arch/arm/mach-at91/at91sam9g45_devices.c:    .name            = "i2c-gpio",

./arch/arm/mach-at91/at91rm9200_devices.c: .name = "i2c-gpio",
./arch/arm/mach-at91/at91sam9260_devices.c: .name = "i2c-gpio",
./arch/arm/mach-at91/at91sam9rl_devices.c: .name = "i2c-gpio",
./arch/arm/mach-imx/mach-cpuimx51sd.c: .name = "i2c-gpio",
./arch/arm/mach-ixp4xx/nslu2-setup.c: .name = "i2c-gpio",
./arch/arm/mach-ixp4xx/nas100d-setup.c: .name = "i2c-gpio",
./arch/arm/mach-ixp4xx/goramo_mlr.c: .name = "i2c-gpio",
./arch/arm/mach-ixp4xx/ixdp425-setup.c: .name = "i2c-gpio",
./arch/arm/mach-ixp4xx/fsg-setup.c: .name = "i2c-gpio",
./arch/arm/mach-ixp4xx/dsmg600-setup.c: .name = "i2c-gpio",
./arch/arm/mach-ixp4xx/avila-setup.c: .name = "i2c-gpio",
./drivers/mfd/sm501.c: pdev = sm501_create_subdev(sm, "i2c-gpio", 0,

- grygorii

#8 lore raw

Re: [RFC] i2c: add deprecation warning for class based instantiation

In reply to Wolfram Sang
Quoted 33 lines · Wolfram Sang

Class based instantiation can cause huge delays when booting. This mechanism was used when it was not possible to describe slaves on I2C busses. We now have other mechanisms, so most embedded I2C will not need classes and it was explicitly not recommended to use them. Add a deprecation warning for drivers who want to disable class based in the near future to gain boot-up time, so users relying on this technique can switch to something better. They really should.

---
  drivers/i2c/busses/i2c-omap.c |    2 +-
  drivers/i2c/i2c-core.c        |    6 ++++++
  include/linux/i2c.h           |    1 +
  3 files changed, 8 insertions(+), 1 deletion(-)
drivers/i2c/busses/i2c-omap.c +1 -1
index e02f9e3..f06109f 100644
@@ -1231,7 +1231,7 @@ omap_i2c_probe(struct platform_device *pdev)
  	adap = &dev->adapter;
  	i2c_set_adapdata(adap, dev);
  	adap->owner = THIS_MODULE;
-	adap->class = I2C_CLASS_HWMON;
+	adap->class = I2C_CLASS_HWMON | I2C_CLASS_DEPRECATED;
  	strlcpy(adap->name, "OMAP I2C adapter", sizeof(adap->name));
  	adap->algo = &omap_i2c_algo;
  	adap->dev.parent = &pdev->dev;
drivers/i2c/i2c-core.c +0 -0
index 48e31ed..47ea1f0 100644

drivers/i2c/i2c-core.c static int i2c_register_adapter(struct i2c_adapter *adap) · line 1007

Quoted 9 lines
drivers/i2c/i2c-core.c +6 -0
@@ -999,6 +999,12 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
  		return -EINVAL;
  	}
 
+	if (adap->class & I2C_CLASS_DEPRECATED)
+		dev_warn(&adap->dev, "This adapter will soon drop class based "
+			"instantiation of slaves\nPlease make sure all its I2C "
+			"devices are instantiated by other means.\nCheck "
+			"'Documentation/i2c/instantiating-devices' for details\n");
+

Seems, this need to be moved down - after res = device_register(&adap->dev);
- or - right before: bus_for_each_drv(&i2c_bus_type, NULL, adap, __process_new_adapter);

Quoted 8 lines
drivers/i2c/i2c-core.c +0 -0
  	rt_mutex_init(&adap->bus_lock);
  	mutex_init(&adap->userspace_clients_lock);
  	INIT_LIST_HEAD(&adap->userspace_clients);
include/linux/i2c.h +0 -0
index e988fa9..ffab838 100644

include/linux/i2c.h void i2c_unlock_adapter(struct i2c_adapter *); · line 479

Quoted 7 lines
include/linux/i2c.h +1 -0
@@ -473,6 +473,7 @@ void i2c_unlock_adapter(struct i2c_adapter *);
  #define I2C_CLASS_HWMON		(1<<0)	/* lm_sensors, ... */
  #define I2C_CLASS_DDC		(1<<3)	/* DDC bus on graphics adapters */
  #define I2C_CLASS_SPD		(1<<7)	/* Memory modules */
+#define I2C_CLASS_DEPRECATED	(1<<8)	/* Warn users that adapter will stop using classes */
 
  /* Internal numbers to terminate lists */
  #define I2C_CLIENT_END		0xfffeU

- grygorii

#9 lore raw

RFC 1/2 i2c: omap: drop class based instantiation of slaves

In reply to Wolfram Sang

Class based instantiation mechanism can cause huge delays when booting. For example: when CONFIG_SENSORS_LM75 option is enabled for omap4-sdp board - it introduces 5-6 ms boot delay.
It's not recommended to use this mechanism with embedded I2C, so disable it by leaving I2C adapter "class" field undefined (remove I2C_CLASS_HWMON).

---
 drivers/i2c/busses/i2c-omap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-omap.c +1 -1
index f06109f..ae2b27f 100644
@@ -1231,7 +1231,7 @@ omap_i2c_probe(struct platform_device *pdev)
 	adap = &dev->adapter;
 	i2c_set_adapdata(adap, dev);
 	adap->owner = THIS_MODULE;
-	adap->class = I2C_CLASS_HWMON | I2C_CLASS_DEPRECATED;
+	adap->class = I2C_CLASS_DEPRECATED;
 	strlcpy(adap->name, "OMAP I2C adapter", sizeof(adap->name));
 	adap->algo = &omap_i2c_algo;
 	adap->dev.parent = &pdev->dev;
Signature · 1 line
1.7.9.5
#10 lore raw

RFC 2/2 i2c: gpio: drop class based instantiation of slaves

Class based instantiation mechanism can cause huge delays when booting. For example: when CONFIG_SENSORS_LM75 option is enabled for or omap5-uevm board, where i2c-gpio is used for HDMI edid reading - it introduces up to 5 sec boot delay.
It's not recommended to use this mechanism with embedded I2C, so disable it by leaving I2C adapter "class" field undefined (remove I2C_CLASS_HWMON and I2C_CLASS_SPD) and add a deprecation warning to allow users, relying on this mechanism, to switch to something better.

CC Haavard Skinnemoen <[email protected]>
---
 drivers/i2c/busses/i2c-gpio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-gpio.c +1 -1
index bc6e139..33e3d0e 100644
@@ -215,7 +215,7 @@ static int i2c_gpio_probe(struct platform_device *pdev)
 		snprintf(adap->name, sizeof(adap->name), "i2c-gpio%d", pdev->id);
 
 	adap->algo_data = bit_data;
-	adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
+	adap->class = I2C_CLASS_DEPRECATED;
 	adap->dev.parent = &pdev->dev;
 	adap->dev.of_node = pdev->dev.of_node;
 
Signature · 1 line
1.7.9.5
#7 lore raw

Re: [RFC] i2c: add deprecation warning for class based instantiation

In reply to Grygorii Strashko

Hi,

Quoted 1 line

Sorry, for delayed reply - I've had problems with my e-mail.

You still have. This message has unwanted linebreaks.

Quoted 2 lines

I've tested this patch on our TI K3.4 product kernel with additional change below:

Thanks.

Quoted 3 lines
[    0.662567]  (null): This adapter will soon drop class based

instantiation of slaves
^^^^^ invalid adapter device name here

Good point, thanks! Will send an updated patch in a minute.

Quoted 1 line

In addition, I've found the following users of *i2c-gpio* (just FYI):

Ehrm, okay, and why exactly did you post it? :)

Regards,

Wolfram