diff mbox series

[v4,6/8] power: supply: fix failed to get iio channel by device name

Message ID 20221024132757.3345400-7-sravanhome@gmail.com (mailing list archive)
State Superseded
Headers show
Series Add support for mp2733 battery charger | expand

Commit Message

saravanan sekar Oct. 24, 2022, 1:27 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)
Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
---
 drivers/mfd/mp2629.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andy Shevchenko Oct. 24, 2022, 1:49 p.m. UTC | #1
On Mon, Oct 24, 2022 at 4:28 PM Saravanan Sekar <sravanhome@gmail.com> wrote:
>
> 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)

Wrong Fixes tag format, moreover the fixes should be grouped at the
beginning of the series, so it will be visible and splittable based on
this property.
saravanan sekar Oct. 24, 2022, 2:02 p.m. UTC | #2
On 24/10/22 15:49, Andy Shevchenko wrote:
> On Mon, Oct 24, 2022 at 4:28 PM Saravanan Sekar <sravanhome@gmail.com> wrote:
>>
>> 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)
> 
> Wrong Fixes tag format, moreover the fixes should be grouped at the
> beginning of the series, so it will be visible and splittable based on
> this property.

Thanks for quick review Andy, I will correct fixes tag format and group 
all the fixes beginning of series in v5.

Thanks,
Saravanan
Sebastian Reichel Oct. 28, 2022, 2:05 p.m. UTC | #3
Hi,

On Mon, Oct 24, 2022 at 04:02:21PM +0200, saravanan sekar wrote:
> On 24/10/22 15:49, Andy Shevchenko wrote:
> > On Mon, Oct 24, 2022 at 4:28 PM Saravanan Sekar <sravanhome@gmail.com> wrote:
> > > 
> > > 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)
> > 
> > Wrong Fixes tag format, moreover the fixes should be grouped at the
> > beginning of the series, so it will be visible and splittable based on
> > this property.
> 
> Thanks for quick review Andy, I will correct fixes tag format and group all
> the fixes beginning of series in v5.
> 
> Thanks,
> Saravanan

Also the patch subject has incorrect prefix. It should be "mfd:"
instead of "power: supply:".

-- Sebastian
diff mbox series

Patch

diff --git a/drivers/mfd/mp2629.c b/drivers/mfd/mp2629.c
index f59c97e70f83..57db0f5009b9 100644
--- a/drivers/mfd/mp2629.c
+++ b/drivers/mfd/mp2629.c
@@ -53,7 +53,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);