Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5874583d authored by Henrik Rydberg's avatar Henrik Rydberg Committed by Guenter Roeck
Browse files

hwmon: (applesmc) Introduce a register lookup table



One main problem with the current driver is the inability to quickly
search for supported keys, resulting in detailed feature maps per
machine model which are cumbersome to maintain.

This patch adds a register lookup table, which enables binary search
for supported keys. The lookup also reduces the io frequency, so the
original mutex is replaced by locks around the actual io.

Signed-off-by: default avatarHenrik Rydberg <rydberg@euromail.se>
[guenter.roeck@ericsson.com: Added value range check to key_at_index_store()]
Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
parent 1ee7c71b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment