Da903x regulator driver. Bug?
- From: Jonathan Cameron <jic23@xxxxxxxxx>
- Date: Fri, 24 Oct 2008 16:47:27 +0100
Firstly, is lkml the right place to ask questions about regulator drivers?
Secondly, though I can't track down any examples, I'm guessing the following
is a valid board config for the da903x reg etc.
static struct regulator_init_data stargate2_ld8_init_data = {
.supply_regulator_dev = NULL,
.constraints = {
.name = "vdd_mica",
.min_uV = 1800000,
.max_uV = 1900000,
.valid_modes_mask = REGULATOR_CHANGE_VOLTAGE,
},
};
/* playing with this ld0 as it only goes to an external connector */
static struct da903x_subdev_info stargate2_da9030_subdevs[] = {
{
.name = "da903x-regulator",
.id = DA9030_ID_LDO8,
.platform_data = &stargate2_ld8_init_data,
},
};
static struct da903x_platform_data stargate2_da9030_pdata = {
.num_subdevs = ARRAY_SIZE(stargate2_da9030_subdevs),
.subdevs = stargate2_da9030_subdevs,
};
static struct i2c_board_info __initdata stargate2_pwr_i2c_board_info [] = {
{
.type = "da9030",
.addr = 0x49,
.platform_data = &stargate2_da9030_pdata,
.irq = gpio_to_irq(1),
},
};
// and relevant registration code.
Now if this is now things are expected to be, there is a bug in
regulators/da903x.c in da903x_regulator_probe
rdev = regulator_register(&ri->desc, pdev->dev.parent, ri);
should be
rdev = regulator_register(&ri->desc, &pdev->dev, ri);
or else you aren't going to get the constraint. I think the
first will give you the device of the mfd, not the regulator.
Thanks,
Jonathan
--
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/
- Follow-Ups:
- [PATCH] da903x regulator bug fix
- From: Jonathan Cameron
- Re: Da903x regulator driver. Bug?
- From: Jonathan Cameron
- [PATCH] da903x regulator bug fix
- Prev by Date: Re: [ofa-general] Re: [PATCH] maintainers: moderated mailing list
- Next by Date: RE: e1000e fails after several S3 resumes (2.6.26 Debian, TP T60)
- Previous by thread: WARNING: at fs/buffer.c:1186 mark_buffer_dirty+0x51/0x66()
- Next by thread: Re: Da903x regulator driver. Bug?
- Index(es):