Messages in this thread | | | Date | Fri, 31 Oct 2008 11:34:19 +0000 | From | Mark Brown <> | Subject | Re: [PATCH] watchdog: Add support for the WM8350 watchdog |
| |
On Thu, Oct 30, 2008 at 03:18:04PM -0700, Andrew Morton wrote: > Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> > + wm8350_reg_lock(wm8350);
> I was curious about this wm8350_reg_lock/wm8350_reg_unlock thing, so I > went to have a look at it. Nothing. Obviously its authors felt there > was no benefit in having anyone else understand what it does.
Well, there's really not that much more to it than what the function names say - some of the registers can be locked in hardware, meaning that the lock needs to be unlocked when writing to them. I'll come up with some sort of blurb and send a patch to Samuel but I'm not sure how much it'll actually help.
This is mostly for things particularly likely to cause damage to the system - in this case the hardware supports extremely short timeouts which might be too short to be able to kick the watchdog again if it fires and reboots (the lowest option is 0.125s IIRC). The only way to recover from that is to remove all power from the system.
> > + if (test_and_set_bit(1, &wm8350_wdt_users))
> It's odd that the driver uses bit 1 rather than bit 0.
Hrm, yeah. No idea why, the driver was like that when I first looked at it and I can't see any history explaining the choice.
| |