diff options
author | Daniel Matyas <daniel.matyas@analog.com> | 2023-09-19 11:34:49 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2023-10-28 18:21:36 +0200 |
commit | 9ca6696718cc3f8ca94172d834567f35500f21bf (patch) | |
tree | 4d919640e4eca1669cd95e046689a5438319d9cf /drivers/hwmon/iio_hwmon.c | |
parent | MAINTAINERS: Add Hal as one of the maintainers of SFCTEMP HWMON DRIVER (diff) | |
download | linux-9ca6696718cc3f8ca94172d834567f35500f21bf.tar.xz linux-9ca6696718cc3f8ca94172d834567f35500f21bf.zip |
hwmon: (max31827) Make code cleaner
Used enums and while loops to replace switch for selecting and getting
update interval from conversion rate bits.
Divided the write_alarm_val function into 2 functions. The new function
is more generic: it can be used not only for alarm writes, but for any
kind of writes which require the device to be in shutdown mode.
Signed-off-by: Daniel Matyas <daniel.matyas@analog.com>
Link: https://lore.kernel.org/r/20230919093456.10592-1-daniel.matyas@analog.com
[groeck: Reverted error return value change (EOPNOTSUPP -> EINVAL)]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/iio_hwmon.c')
0 files changed, 0 insertions, 0 deletions