]> git.baikalelectronics.ru Git - kernel.git/commit
debugfs: regset32: Add Runtime PM support
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 11 Feb 2020 18:18:55 +0000 (19:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:35:32 +0000 (11:35 +0200)
commit4e6d467542d9e21874b19c4a27b1bf5c57703e87
tree45a554e58eb7f94a3f3c8dd004b1a0d811ce0378
parent4db9cd6bdd91f81a66ef1befb6c02ab2853d3f71
debugfs: regset32: Add Runtime PM support

commit 94bd87e858134f625311e186d9273dd80dac05b4 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/debugfs/file.c
include/linux/debugfs.h