hwmon: (nct6775) Add read-only mode
authorZev Weiss <zev@bewilderbeest.net>
Wed, 27 Apr 2022 01:01:51 +0000 (18:01 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 20 May 2022 17:57:06 +0000 (10:57 -0700)
commitbd2e82bd4f4839f70c00a480e0133dc9650d7211
tree15d30751e9f927349a525c7899ac6407ff6d3243
parent3c7e4935d46803f009e344546e41e777df7537b1
hwmon: (nct6775) Add read-only mode

When enabled, all write bits are removed from the modes of all sysfs
attribute files.  This provides a bit of infrastructure for the
upcoming i2c version of this driver, which should generally avoid
writes to device registers so as not to interfere with simultaneous
use of the device via the LPC interface.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Link: https://lore.kernel.org/r/20220427010154.29749-5-zev@bewilderbeest.net
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/nct6775.c