Commit 9ca66967 authored by Daniel Matyas's avatar Daniel Matyas Committed by Guenter Roeck
Browse files

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: default avatarDaniel 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: default avatarGuenter Roeck <linux@roeck-us.net>
parent b344041d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment