Skip to content

Commit bc341a1

Browse files
committed
hwmon: (lm90) Re-enable interrupts after alert clears
If alert handling is broken, interrupts are disabled after an alert and re-enabled after the alert clears. However, if there is an interrupt handler, this does not apply if alerts were originally disabled and enabled when the driver was loaded. In that case, interrupts will stay disabled after an alert was handled though the alert handler even after the alert condition clears. Address the situation by always re-enabling interrupts after the alert condition clears if there is an interrupt handler. Fixes: 2abdc35 ("hwmon: (lm90) Unmask hardware interrupt") Cc: Dmitry Osipenko <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
1 parent a66c5ed commit bc341a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hwmon/lm90.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ static int lm90_update_device(struct device *dev)
848848
* Re-enable ALERT# output if it was originally enabled and
849849
* relevant alarms are all clear
850850
*/
851-
if (!(data->config_orig & 0x80) &&
851+
if ((client->irq || !(data->config_orig & 0x80)) &&
852852
!(data->alarms & data->alert_alarms)) {
853853
if (data->config & 0x80) {
854854
dev_dbg(&client->dev, "Re-enabling ALERT#\n");

0 commit comments

Comments
 (0)