[patch 1/2] mc13892: reboot on wdi event

Arnaud Patard (Rtp) arnaud.patard at rtp-net.org
Mon Feb 28 10:30:29 EST 2011


Mark Brown <broonie at opensource.wolfsonmicro.com> writes:

> On Mon, Feb 28, 2011 at 02:21:33PM +0100, Arnaud Patard wrote:
>
>> +
>> +	/* allows to reboot on wdi event */
>> +	ret = mc13xxx_reg_read(mc13892, MC13892_POWERCTL2, &val);
>> +	if (!ret) {
>> +		val |= MC13892_POWERCTL2_WDIRESET;
>> +		mc13xxx_reg_write(mc13892, MC13892_POWERCTL2, val);
>> +	}
>> +
>
> Also, why is this in the regulator driver?  The MFD core for the device
> might be a better choice - that'll ensure it gets done even if regulator
> support isn't enabled for some reason.

I was not sure where to put it so I put it in the place where the power
management is done. I can move it to the mfd driver. I'll only have to
make sure it's done only for mc13892 (I don't know what would be the
consequences to do it on mc13783 too and if there's a similar
configuration setting).

Arnaud



More information about the linux-arm-kernel mailing list