Skip to content

Commit a5700a6

Browse files
yc-hou-0919jamess-huang
authored andcommitted
Speed up ds18b20 convert time according to resolution
Change-Id: I501ddd7f335eabb86cf3dfa424edcdee0e944d69 Reviewed-on: https://tp-biosrd-v02/gerrit/82974 Reviewed-by: Jamess Huang(黃以民) <Jamess_Huang@asus.com> Tested-by: Jamess Huang(黃以民) <Jamess_Huang@asus.com>
1 parent 79bbb18 commit a5700a6

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/w1/slaves/w1_therm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <linux/types.h>
3030
#include <linux/slab.h>
3131
#include <linux/delay.h>
32-
#include <linux/uaccess.h>
3332

3433
#include "../w1.h"
3534
#include "../w1_int.h"
@@ -264,7 +263,7 @@ static ssize_t w1_slave_show(struct device *device,
264263

265264
if (!w1_reset_select_slave(sl)) {
266265
int count = 0;
267-
unsigned int tm = 750;
266+
unsigned int tm = 750/(1 << (3 - w1_ds18b20_res));
268267
unsigned long sleep_rem;
269268

270269
w1_write_8(dev, W1_READ_PSUPPLY);

0 commit comments

Comments
 (0)