Re: da9052-regulator fails to probe in linux-next

From: Fabio Estevam
Date: Tue Dec 09 2014 - 20:19:39 EST


On Tue, Dec 9, 2014 at 11:07 PM, Fabio Estevam <festevam@xxxxxxxxx> wrote:

> Now I am back to the original da9052 regulator probe issue. If I do:
>
> --- a/drivers/mfd/da9052-core.c
> +++ b/drivers/mfd/da9052-core.c
> @@ -554,7 +554,7 @@ int da9052_device_init(struct da9052 *da9052, u8 chip_id)
> return ret;
> }
>
> - ret = mfd_add_devices(da9052->dev, -1, da9052_subdev_info,
> + ret = mfd_add_devices(da9052->dev, 0, da9052_subdev_info,
> ARRAY_SIZE(da9052_subdev_info), NULL, 0, NULL);
>
> ,then the da9052 regulator can probe succesfully:
>
> ls /sys/class/regulator/
> regulator.0 regulator.11 regulator.14 regulator.2 regulator.5
> regulator.8
> regulator.1 regulator.12 regulator.15 regulator.3 regulator.6
> regulator.9
> regulator.10 regulator.13 regulator.16 regulator.4 regulator.7
>
> ,except for this one:
>
> [ 0.157574] da9052-regulator da9052-regulator.14: invalid regulator
> ID specified
> [ 0.157713] da9052-regulator: probe of da9052-regulator.14 failed
> with error -2

Ok, if I do the same fix as in commit b668422872 ("mfd: viperboard:
Fix platform-device id collision)

--- a/drivers/mfd/da9052-core.c
+++ b/drivers/mfd/da9052-core.c
@@ -554,7 +554,7 @@ int da9052_device_init(struct da9052 *da9052, u8 chip_id)
return ret;
}

- ret = mfd_add_devices(da9052->dev, -1, da9052_subdev_info,
+ ret = mfd_add_devices(da9052->dev, PLATFORM_DEVID_AUTO,
da9052_subdev_info,

Then I don't get any more da9052 warnings.

Will submit a patch shortly.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/