hwmon: (pmbus/core) Add lock and unlock functions
authorEddie James <eajames@linux.ibm.com>
Wed, 12 Apr 2023 16:15:25 +0000 (11:15 -0500)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 19 Apr 2023 14:08:40 +0000 (07:08 -0700)
commita7ac37183ac2a0cc46d857997b2dd24997ca2754
treeb5e6d12e068df9c2bbfaeb190655cee7b73d43c5
parentab3e00416a0078be6d4126edc139536286d816e2
hwmon: (pmbus/core) Add lock and unlock functions

Debugfs operations may set the page number, which must be done
atomically with the subsequent i2c operation. Lock the update_lock
in the debugfs functions and provide a function for pmbus drivers
to lock and unlock the update_lock.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230412161526.252294-2-eajames@linux.ibm.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/pmbus.h
drivers/hwmon/pmbus/pmbus_core.c