History

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.

Geert Uytterhoeven committed 6 years ago

Commit 30332ee1 parent 9e00df72 files · +9 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/debugfs.h+1−0
@@ -35,6 +35,7 @@ struct debugfs_regset32 { · 34 unmodified lines
35 const struct debugfs_reg32 *regs;35 const struct debugfs_reg32 *regs;
36 int nregs;36 int nregs;
37 void __iomem *base;37 void __iomem *base;
38 struct device *dev; /* Optional device for Runtime PM */
38};39};
39 40
40extern struct dentry *arch_debugfs_dir;41extern struct dentry *arch_debugfs_dir;