diff options
author | Marek Vasut <marex@denx.de> | 2024-07-05 10:48:52 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-07-05 10:55:05 +0300 |
commit | 9d7eb234ac7a56b88aea8a52ed81553a730fe25c (patch) | |
tree | 4555306061dfff6fd2a5fa436071c1f6a11737d9 /tools/perf/scripts/python/gecko.py | |
parent | 08c367e45b6d322956878774f0b88bf5e52c6d54 (diff) | |
download | linux-9d7eb234ac7a56b88aea8a52ed81553a730fe25c.tar.xz |
nvmem: core: Implement force_ro sysfs attribute
Implement "force_ro" sysfs attribute to allow users to set read-write
devices as read-only and back to read-write from userspace. The choice
of the name is based on MMC core 'force_ro' attribute.
This solves a situation where an AT24 I2C EEPROM with GPIO based nWP
signal may have to be occasionally updated. Such I2C EEPROM device is
usually set as read-only during most of the regular system operation,
but in case it has to be updated in a controlled manner, it could be
unlocked using this new "force_ro" sysfs attribute and then re-locked
again.
The "read-only" DT property and config->read_only configuration is
respected and is used to set default state of the device, read-only
or read-write, for devices which do implement .reg_write function.
For devices which do not implement .reg_write function, the device
is unconditionally read-only and the "force_ro" attribute is not
visible.
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240705074852.423202-16-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions