Home
last modified time | relevance | path

Searched hist:"87625 b24" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/hwmon/
H A Dina3221.c87625b24 Mon Nov 05 14:48:41 CST 2018 Nicolin Chen <nicoleotsuka@gmail.com> hwmon: (ina3221) Serialize sysfs ABI accesses

This change adds a mutex to serialize accesses of sysfs attributes.

This is required when polling CVRF bit of the MASK/ENABLE register
because this bit is cleared on a read of this MASK/ENABLE register
or a write to CONFIG register, which means that this bit might be
accidentally cleared by reading other fields like alert flags.

So this patch adds a mutex lock to protect the write() and read()
callbacks. The read_string() callback won't need the lock since it
just returns the label without touching any hardware register.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
87625b24 Mon Nov 05 14:48:41 CST 2018 Nicolin Chen <nicoleotsuka@gmail.com> hwmon: (ina3221) Serialize sysfs ABI accesses

This change adds a mutex to serialize accesses of sysfs attributes.

This is required when polling CVRF bit of the MASK/ENABLE register
because this bit is cleared on a read of this MASK/ENABLE register
or a write to CONFIG register, which means that this bit might be
accidentally cleared by reading other fields like alert flags.

So this patch adds a mutex lock to protect the write() and read()
callbacks. The read_string() callback won't need the lock since it
just returns the label without touching any hardware register.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>