Skip to content

Commit

Permalink
hwmon: (lm90) Unmask hardware interrupt
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Osipenko authored and Guenter Roeck committed Jun 19, 2021
1 parent 94dbd23 commit 2abdc35
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/hwmon/lm90.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 2abdc35

Please sign in to comment.