[RFC PATCH] Fix accelerometer resume path

Michael Trimarchi trimarchi at gandalf.sssup.it
Mon Oct 12 19:29:28 CEST 2009


Werner Almesberger wrote:
> Michael Trimarchi wrote:
>   
>> This fix the resume path of the accelerometer. If the accelerometer
>> is not power up, restore to initial status.
>>     
>
> That code looks indeed very fishy.
>
> However, it makes me wonder why the copy is being changed in the first
> place. It doesn't look like the sort of thing you do without a reason,
> good or bad.
>
> Also, the LIS302 manual is very terse on the semantics of the "power
> down mode". If there are operations that aren't permitted in power
> down mode, it may well be necessary to keep the chip in power up while
> restoring the registers. This could be accomplished by putting
> LIS302DL_REG_CTRL1 last in regs_to_save.
>
> If all power down does is stop collecting data, then your patch would
> be correct as is.
>   
Ok, we must check on the datasheet this issue. Experience on the device
show me that the patch is correct so it is possible to write on it.

Another solution can be a reverse restore so the CTRL1 is the last one

Michael

> - Werner
>
>   




More information about the openmoko-kernel mailing list