i2c-mpc: suppress I2C device probing
Subsystems (2)
PATCH 1/1 i2c-mpc: suppress I2C device probing
This patch suppresses I2C device probing by clearing the class field of the "struct i2c_adapter" for the MPC I2C bus adapters. Some board configurations which rely on probing must be fixed up by adding a proper I2C device node to the DTS file, like the TQM85xx modules.
---drivers/i2c/busses/i2c-mpc.c | 1 -
1 file changed, 1 deletion(-)
drivers/i2c/busses/i2c-mpc.c +0 -0
@@ -312,7 +312,6 @@ static struct i2c_adapter mpc_ops = {
.name = "MPC adapter", .id = I2C_HW_MPC107, .algo = &mpc_algo, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, .timeout = 1, };
Quoted 6 lines · Wolfgang Grandegger
This patch suppresses I2C device probing by clearing the class field of the "struct
i2c_adapter" for the MPC I2C bus adapters. Some board configurations which rely on probing must be fixed up by adding a proper I2C device node to the DTS file, like the TQM85xx modules.Signed-off-by Wolfgang Grandegger <[email protected]>
Quoted 17 lines
---
drivers/i2c/busses/i2c-mpc.c| 1 -1 file changed, 1 deletion(-)Index:
powerpc/drivers/i2c/busses/i2c-mpc.c
===================================================================drivers/i2c/busses/i2c-mpc.c +0
-1@@ -312,7 +312,6 @@ static struct i2c_adapter mpc_ops = { .name = "MPC adapter", .id = I2C_HW_MPC107, .algo = &mpc_algo, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, .timeout = 1, };
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
Hi Grant, Wolgang,
Quoted 13 lines · Grant Likely
Quoted 6 lines · Wolfgang Grandegger
This patch suppresses I2C device probing by clearing the class field of the "struct
i2c_adapter" for the MPC I2C bus adapters. Some board configurations which rely on probing must be fixed up by adding a proper I2C device node to the DTS file, like the TQM85xx modules.Signed-off-by Wolfgang Grandegger <[email protected]>Acked-by Grant Likely <[email protected]>Quoted 4 lines
---
drivers/i2c/busses/i2c-mpc.c| 1 -1 file changed, 1 deletion(-)
Quoted 11 lines
drivers/i2c/busses/i2c-mpc.c static struct i2c_adapter mpc_ops = { · line 316
Quoted 11 lines
Index:
powerpc/drivers/i2c/busses/i2c-mpc.c
===================================================================drivers/i2c/busses/i2c-mpc.c +0
-1@@ -312,7 +312,6 @@ static struct i2c_adapter mpc_ops = { .name = "MPC adapter", .id = I2C_HW_MPC107, .algo = &mpc_algo, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, .timeout = 1, };
Unless you intend to push this patch upstream yourself (through the ppc tree), you should send it to Ben Dooks (who is in charge of this part of the i2c subsystem) with Cc to the i2c list.
Signature · 1 line
Jean Delvare
Quoted 16 lines · Jean Delvare
Hi Grant, Wolgang,
Quoted 13 lines · Grant Likely
Quoted 6 lines · Wolfgang Grandegger
This patch suppresses I2C device probing by clearing the class field of the "struct
i2c_adapter" for the MPC I2C bus adapters. Some board configurations which rely on probing must be fixed up by adding a proper I2C device node to the DTS file, like the TQM85xx modules.Signed-off-by Wolfgang Grandegger <[email protected]>Acked-by Grant Likely <[email protected]>Quoted 4 lines
---
drivers/i2c/busses/i2c-mpc.c| 1 -1 file changed, 1 deletion(-)
Quoted 15 lines
Quoted 11 lines
drivers/i2c/busses/i2c-mpc.c static struct i2c_adapter mpc_ops = { · line 316
Quoted 11 lines
Index:
powerpc/drivers/i2c/busses/i2c-mpc.c
===================================================================drivers/i2c/busses/i2c-mpc.c +0
-1@@ -312,7 +312,6 @@ static struct i2c_adapter mpc_ops = { .name = "MPC adapter", .id = I2C_HW_MPC107, .algo = &mpc_algo, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, .timeout = 1, };Unless you intend to push this patch upstream yourself (through the ppc tree), you should send it to Ben Dooks (who is in charge of this part of the i2c subsystem) with Cc to the i2c list.
I just want to mention, that other I2 bus drivers set I2C_CLASS_HWMON as well. Here are the PowerPC related ones:
$ grep I2C_CLASS_HWMON * i2c-cpm.c: .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, i2c-mpc.c: .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, i2c-ibm_iic.c: adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; i2c-pasemi.c: smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD; i2c-mv64xxx.c: drv_data->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
It would be consequent to remove them as well.
Wolfgang.
Hi Wolfgang,
Quoted 8 lines
$ grep I2C_CLASS_HWMON * i2c-cpm.c: .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, i2c-mpc.c: .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, i2c-ibm_iic.c: adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; i2c-pasemi.c: smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD; i2c-mv64xxx.c: drv_data->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;It would be consequent to remove them as well.
ACK for the i2c-cpm part.
Thanks,
Jochen
Quoted 9 lines · Jochen Friedrich
Hi Wolfgang,
Quoted 7 lines
$ grep I2C_CLASS_HWMON * i2c-cpm.c: .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, i2c-mpc.c: .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, i2c-ibm_iic.c: adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; i2c-pasemi.c: smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD; i2c-mv64xxx.c: drv_data->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
Quoted 3 lines
Quoted 1 line
It would be consequent to remove them as well.
ACK for the i2c-cpm part.
No objection on my side. It's really up to each platform to choose the way they want to handle i2c device creation, and stick to it.
As I understand it, the removal of the adapter class needs to be synchronized with platform code changes. Thus it might make sense to push these through their respective arch trees, rather than the i2c tree.
Signature · 1 line
Jean Delvare
Quoted 14 lines · Jean Delvare
Quoted 9 lines · Jochen Friedrich
Hi Wolfgang,
Quoted 7 lines
$ grep I2C_CLASS_HWMON * i2c-cpm.c: .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, i2c-mpc.c: .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, i2c-ibm_iic.c: adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; i2c-pasemi.c: smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD; i2c-mv64xxx.c: drv_data->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;Quoted 3 lines
Quoted 1 line
It would be consequent to remove them as well.
ACK for the i2c-cpm part.
Quoted 7 lines
No objection on my side. It's really up to each platform to choose the way they want to handle i2c device creation, and stick to it.
As I understand it, the removal of the adapter class needs to be synchronized with platform code changes. Thus it might make sense to push these through their respective arch trees, rather than the i2c tree.
All right, I'm happy to pick these patches up if nobody objects.
g.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.