diff mbox series

[v6,1/7] mfd: mp2629: fix failed to get iio channel by device name

Message ID 20221123175425.564042-2-sravanhome@gmail.com
State New
Headers show
Series [v6,1/7] mfd: mp2629: fix failed to get iio channel by device name | expand

Commit Message

Saravanan Sekar Nov. 23, 2022, 5:54 p.m. UTC
The mfd cell devices name populated on sysfs entry is dynamically derived
from an auto instance which introduced a regression. As a result
mpc2629_charger driver failed to get adc channel because of iio consumer
name mismatch with the sysfs.

/sys/class/i2c-adapter/i2c-1/mp2629_adc.0.auto/
/sys/class/i2c-adapter/i2c-1/mp2629_charger.1.auto/

Fixes: 466a62d7642f ("mfd: core: Make a best effort attempt to match devices with the correct of_nodes")
Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
---
 drivers/mfd/mp2629.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lee Jones Jan. 19, 2023, 3 p.m. UTC | #1
On Wed, 23 Nov 2022, Saravanan Sekar wrote:

> The mfd cell devices name populated on sysfs entry is dynamically derived

Could you please make an attempt to capitalise words that require it?

MFD, ADC, IIO, etc.  Also the start of the subject line description.

> from an auto instance which introduced a regression. As a result
> mpc2629_charger driver failed to get adc channel because of iio consumer

How can you regress something that doesn't appear to exist?

$ git grep -i mpc2629 next/master

> name mismatch with the sysfs.

Why is the charger driver reading sysfs?

> /sys/class/i2c-adapter/i2c-1/mp2629_adc.0.auto/
> /sys/class/i2c-adapter/i2c-1/mp2629_charger.1.auto/

Can you provide an error message or some debug prints or something that
will help describe the exact issue you are facing please?
 
> Fixes: 466a62d7642f ("mfd: core: Make a best effort attempt to match devices with the correct of_nodes")
> Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
> ---
>  drivers/mfd/mp2629.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mfd/mp2629.c b/drivers/mfd/mp2629.c
> index 16840ec5fd1c..f4c5aa06f38c 100644
> --- a/drivers/mfd/mp2629.c
> +++ b/drivers/mfd/mp2629.c
> @@ -51,7 +51,7 @@ static int mp2629_probe(struct i2c_client *client)
>  		return PTR_ERR(ddata->regmap);
>  	}
>  
> -	ret = devm_mfd_add_devices(ddata->dev, PLATFORM_DEVID_AUTO, mp2629_cell,
> +	ret = devm_mfd_add_devices(ddata->dev, PLATFORM_DEVID_NONE, mp2629_cell,
>  				   ARRAY_SIZE(mp2629_cell), NULL, 0, NULL);
>  	if (ret)
>  		dev_err(ddata->dev, "Failed to register sub-devices %d\n", ret);
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/mfd/mp2629.c b/drivers/mfd/mp2629.c
index 16840ec5fd1c..f4c5aa06f38c 100644
--- a/drivers/mfd/mp2629.c
+++ b/drivers/mfd/mp2629.c
@@ -51,7 +51,7 @@  static int mp2629_probe(struct i2c_client *client)
 		return PTR_ERR(ddata->regmap);
 	}
 
-	ret = devm_mfd_add_devices(ddata->dev, PLATFORM_DEVID_AUTO, mp2629_cell,
+	ret = devm_mfd_add_devices(ddata->dev, PLATFORM_DEVID_NONE, mp2629_cell,
 				   ARRAY_SIZE(mp2629_cell), NULL, 0, NULL);
 	if (ret)
 		dev_err(ddata->dev, "Failed to register sub-devices %d\n", ret);