Skip to content

Commit

Permalink
Merge tag 'hwmon-for-linus-v4.14-rc7' of git://git.kernel.org/pub/scm…
Browse files Browse the repository at this point in the history
…/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:

 - Fix initial temperature readings for TMP102

 - Fix timeouts in DA9052 driver by increasing its sampling rate

* tag 'hwmon-for-linus-v4.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (tmp102) Fix first temperature reading
  hwmon: (da9052) Increase sample rate when using TSI
  • Loading branch information
torvalds committed Oct 26, 2017
2 parents ecda3d9 + d072543 commit 035bcf8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
5 changes: 5 additions & 0 deletions drivers/hwmon/da9052-hwmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,11 @@ static int da9052_hwmon_probe(struct platform_device *pdev)
/* disable touchscreen features */
da9052_reg_write(hwmon->da9052, DA9052_TSI_CONT_A_REG, 0x00);

/* Sample every 1ms */
da9052_reg_update(hwmon->da9052, DA9052_ADC_CONT_REG,
DA9052_ADCCONT_ADCMODE,
DA9052_ADCCONT_ADCMODE);

err = da9052_request_irq(hwmon->da9052, DA9052_IRQ_TSIREADY,
"tsiready-irq", da9052_tsi_datardy_irq,
hwmon);
Expand Down
13 changes: 5 additions & 8 deletions drivers/hwmon/tmp102.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,11 @@ static int tmp102_probe(struct i2c_client *client,
return err;
}

tmp102->ready_time = jiffies;
if (tmp102->config_orig & TMP102_CONF_SD) {
/*
* Mark that we are not ready with data until the first
* conversion is complete
*/
tmp102->ready_time += msecs_to_jiffies(CONVERSION_TIME_MS);
}
/*
* Mark that we are not ready with data until the first
* conversion is complete
*/
tmp102->ready_time = jiffies + msecs_to_jiffies(CONVERSION_TIME_MS);

hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name,
tmp102,
Expand Down

0 comments on commit 035bcf8

Please sign in to comment.