lkml.org 
[lkml]   [2012]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/6] regmap: add runtime PM calls to debugfs file IO
On Wed, Apr 04, 2012 at 03:48:32PM -0600, Stephen Warren wrote:

> It's quite probably that devices need to be active in order for their
> registers to be read/written. In normal regmap usage by drivers, it's the
> responsibility of the driver to assure this if needed. However, regmap
> debugfs file handling is outside the driver's control, so we need to
> explicitly ensure this.

This feels wrong, it's too invasive on the device. If we're in cache
only mode (which we should be if the device is off and we have a cache)
then I'd expect us to error out if we can't satisfy the read from cache
rather than wake the device up which might be terribly expensive and
cause register writes which change the device state we were trying to
inspect, and if we have a cache then we might not need to interact with
the hardware at all at which point the wakeup would've been needless.
It's certainly not what I'd expect a diagnostic interface to be doing,
I'd expect it to reflect the current state of the device.

Now, quite how the mmio bus deals with access to a suspended device is
probably platform specific and certainly more fun than at least I2C (SPI
has issues since it's hard to tell if the device is there or not and the
MISO line might be undriven but at least you'll not lock up or anything).
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-04-05 00:21    [W:0.062 / U:0.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site