diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2021-06-18 23:54:54 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2021-06-19 13:09:49 +0200 |
commit | 2abdc357c55d9e728f6710cf22618889f16a00f6 (patch) | |
tree | ee30b5db25b5205ef57e66f2bbd4ecd2ca3f6c72 /drivers | |
parent | hwmon: (lm90) Use hwmon_notify_event() (diff) | |
download | linux-2abdc357c55d9e728f6710cf22618889f16a00f6.tar.xz linux-2abdc357c55d9e728f6710cf22618889f16a00f6.zip |
hwmon: (lm90) Unmask hardware interrupt
The ALERT interrupt is enabled by default after power-on, but it could
be masked by bootloader. For example this is the case on Acer A500 tablet
device. Unmask the hardware interrupt if interrupt is provided.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hwmon/lm90.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index e7b678a40b39..658b486d2f5e 100644 --- a/drivers/hwmon/lm90.c +++ b/drivers/hwmon/lm90.c @@ -1704,6 +1704,13 @@ static int lm90_init_client(struct i2c_client *client, struct lm90_data *data) if (data->kind == max6696) config &= ~0x08; + /* + * Interrupt is enabled by default on reset, but it may be disabled + * by bootloader, unmask it. + */ + if (client->irq) + config &= ~0x80; + config &= 0xBF; /* run */ lm90_update_confreg(data, config); |