Re: regmap: mmio: lack of runtime_pm support for debugfs

From: Mark Brown
Date: Fri Feb 04 2022 - 14:41:14 EST


On Fri, Feb 04, 2022 at 11:21:51AM -0800, Brian Norris wrote:
> On Fri, Feb 4, 2022 at 11:02 AM Mark Brown <broonie@xxxxxxxxxx> wrote:

> > Are you sure you wouldn't be better off with a cache here, or marking
> > the registers as precious so they don't get read (perhaps conditionally
> > to allow reading while the device is live)?

> We do actually have a cache for the case I care about, but there's
> also a debugfs file for bypassing that and...for some reason I'm
> dealing with some diagnostic scripts that purposely toggle that. I'm
> not sure how wise that is, but in general I like to reduce the number
> of ways dumb user space can screw things up. I've even had to tell
> people that recursively grepping through sysfs or debugfs is a bad
> idea...

Are you sure this extra thing that bypasses the cache isn't an out of
tree patch? It really doesn't sound like a good idea to have that, and
if people think they need it they probably have drivers doing something
quite unfortunate. Or are you just looking at the upstream debugfs with
some volatile registers?

Attachment: signature.asc
Description: PGP signature