Skip to content

Commit

Permalink
als hack: trigger sensor data processing on als read while in auto mode
Browse files Browse the repository at this point in the history
  • Loading branch information
nadlabak committed Dec 8, 2012
1 parent a71b5ae commit 45426a0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/leds/led-lm3530.c
Expand Up @@ -237,6 +237,13 @@ static ssize_t ld_lm3530_als_show(struct device *dev,
dev);
struct lm3530_data *als_data = i2c_get_clientdata(client);

/* hack: if we're in automatic mode, don't wait for an interrupt
and schedule the processing of the current sensor data now */
if (als_data->mode == AUTOMATIC) {
disable_irq(als_data->client->irq);
queue_work(als_data->working_queue, &als_data->wq);
}

return sprintf(buf, "%u\n", als_data->mode);
}

Expand Down

0 comments on commit 45426a0

Please sign in to comment.