aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/debugfs.h
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2020-02-11 19:18:55 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2020-02-22 09:25:42 +0800
commit30332eeefec8f83afcea00c360f99ef64b87f220 (patch)
treef1d07f6fe23cb002d66933b9cc35e3c626d03db6 /include/linux/debugfs.h
parentcrypto: hisilicon - register zip engine to uacce (diff)
downloadwireguard-linux-30332eeefec8f83afcea00c360f99ef64b87f220.tar.xz
wireguard-linux-30332eeefec8f83afcea00c360f99ef64b87f220.zip
debugfs: regset32: Add Runtime PM support
Hardware registers of devices under control of power management cannot be accessed at all times. If such a device is suspended, register accesses may lead to undefined behavior, like reading bogus values, or causing exceptions or system lock-ups. Extend struct debugfs_regset32 with an optional field to let device drivers specify the device the registers in the set belong to. This allows debugfs_show_regset32() to make sure the device is resumed while its registers are being read. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/debugfs.h')
-rw-r--r--include/linux/debugfs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index 3d013de64f70..ad416853e722 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -35,6 +35,7 @@ struct debugfs_regset32 {
const struct debugfs_reg32 *regs;
int nregs;
void __iomem *base;
+ struct device *dev; /* Optional device for Runtime PM */
};
extern struct dentry *arch_debugfs_dir;