diff options
| author | Nicolin Chen <[email protected]> | 2018-11-05 12:48:41 -0800 |
|---|---|---|
| committer | Guenter Roeck <[email protected]> | 2018-12-16 15:13:11 -0800 |
| commit | 87625b24986bc2aeea20cf8a795b01a799a471b0 (patch) | |
| tree | 0ecb77de1ace9053b85d771d24d6e152fbb67b18 /tools/perf/scripts/python | |
| parent | efb0489ea8fa12c6a5b51c0b3e35f4f3d5d54939 (diff) | |
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 <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions