hwmon: (pmbus) Add support for guarded PMBus lock

Add support for guard(pmbus_lock)() and scoped_guard(pmbus_lock)()
to be able to simplify the PMBus code.

Also introduce pmbus_lock() as pre-requisite for supporting
guard().

Reviewed-by: Sanman Pradhan <psanman@juniper.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
Guenter Roeck 2026-03-20 07:18:37 -07:00
commit 1814f4d3ff
2 changed files with 13 additions and 0 deletions