Re: [PATCH 4/4] Input: ads7846 - modificatons of _stop()/_disable() conditions
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2010-09-17 06:39:13
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2010-09-17 06:39:13
Hi Jason, On Thursday, September 16, 2010 03:51:26 am Jason Wang wrote:
The design like that, we can stop or disable ADC, one difference is the disable not only stop the ADC but also close the power regulator. So we change the condition flag to stopped in the _stop() function. Because we call __ads7846_disable() in the suspend/resume process, so move disabled flag modification from ads7846_disable() to the __ads7846_disable(), otherwise when we call _disable() in the suspend, and the ADC is really suspended but the flag shows that it isn't.
I disagree with the patch. "Disable" knob is separate from PM knobs (suspend/resume); and thus that attribute should only read "1" when user forcibly disabled the device via sysfs. Same goes for open/close. Thanks. -- Dmitry