提交 5874583d 编写于 作者: H Henrik Rydberg 提交者: Guenter Roeck

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: NHenrik Rydberg <rydberg@euromail.se>
[guenter.roeck@ericsson.com: Added value range check to key_at_index_store()]
Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com>
上级 1ee7c71b
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册