diff options
author | Iker Perez del Palomar Sustatxa <iker.perez@codethink.co.uk> | 2019-09-04 12:56:21 +0100 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2019-09-04 11:06:47 -0700 |
commit | 35cd180485425dcab3f587fd67f21552505939ac (patch) | |
tree | 94f112ff3029209afdcfb6d174cea89be2e6ff48 /drivers/hwmon/lm75.c | |
parent | cf48d17623281c2b3185030ed23f148bd47e15de (diff) |
hwmon: (lm75) Aproximate sample times to data-sheet values
Current sample time values are over estimated, this patches applies
values closer to the ones defined in the data-sheets.
Signed-off-by: Iker Perez del Palomar Sustatxa <iker.perez@codethink.co.uk>
[groeck: resolved conflicts; use default conversion times]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/lm75.c')
-rw-r--r-- | drivers/hwmon/lm75.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c index d45e5cc4adf5..5e6392294c03 100644 --- a/drivers/hwmon/lm75.c +++ b/drivers/hwmon/lm75.c @@ -123,15 +123,15 @@ static const struct lm75_params device_params[] = { [adt75] = { .clr_mask = 1 << 5, /* not one-shot mode */ .default_resolution = 12, - .default_sample_time = MSEC_PER_SEC / 8, + .default_sample_time = MSEC_PER_SEC / 10, }, [ds1775] = { .clr_mask = 3 << 5, .set_mask = 2 << 5, /* 11-bit mode */ .default_resolution = 11, - .default_sample_time = 750, + .default_sample_time = 500, .num_sample_times = 4, - .sample_times = (unsigned int []){ 188, 375, 750, 1500 }, + .sample_times = (unsigned int []){ 125, 250, 500, 1000 }, .resolutions = (u8 []) {9, 10, 11, 12 }, }, [ds75] = { @@ -154,7 +154,7 @@ static const struct lm75_params device_params[] = { }, [stlm75] = { .default_resolution = 9, - .default_sample_time = MSEC_PER_SEC / 5, + .default_sample_time = MSEC_PER_SEC / 6, }, [ds7505] = { .set_mask = 3 << 5, /* 12-bit mode*/ @@ -166,36 +166,36 @@ static const struct lm75_params device_params[] = { }, [g751] = { .default_resolution = 9, - .default_sample_time = MSEC_PER_SEC / 2, + .default_sample_time = MSEC_PER_SEC / 10, }, [lm75] = { .default_resolution = 9, - .default_sample_time = MSEC_PER_SEC / 2, + .default_sample_time = MSEC_PER_SEC / 10, }, [lm75a] = { .default_resolution = 9, - .default_sample_time = MSEC_PER_SEC / 2, + .default_sample_time = MSEC_PER_SEC / 10, }, [lm75b] = { .default_resolution = 11, - .default_sample_time = MSEC_PER_SEC / 4, + .default_sample_time = MSEC_PER_SEC / 10, }, [max6625] = { .default_resolution = 9, - .default_sample_time = MSEC_PER_SEC / 4, + .default_sample_time = MSEC_PER_SEC / 7, }, [max6626] = { .default_resolution = 12, - .default_sample_time = MSEC_PER_SEC / 4, + .default_sample_time = MSEC_PER_SEC / 7, .resolution_limits = 9, }, [max31725] = { .default_resolution = 16, - .default_sample_time = MSEC_PER_SEC / 8, + .default_sample_time = MSEC_PER_SEC / 20, }, [tcn75] = { .default_resolution = 9, - .default_sample_time = MSEC_PER_SEC / 8, + .default_sample_time = MSEC_PER_SEC / 18, }, [pct2075] = { .default_resolution = 11, @@ -213,7 +213,7 @@ static const struct lm75_params device_params[] = { .resolution_limits = 9, .default_sample_time = 240, .num_sample_times = 4, - .sample_times = (unsigned int []){ 75, 150, 300, 600 }, + .sample_times = (unsigned int []){ 30, 60, 120, 240 }, .resolutions = (u8 []) {9, 10, 11, 12 }, }, [tmp100] = { @@ -222,7 +222,7 @@ static const struct lm75_params device_params[] = { .default_resolution = 12, .default_sample_time = 320, .num_sample_times = 4, - .sample_times = (unsigned int []){ 75, 150, 300, 600 }, + .sample_times = (unsigned int []){ 40, 80, 160, 320 }, .resolutions = (u8 []) {9, 10, 11, 12 }, }, [tmp101] = { @@ -231,7 +231,7 @@ static const struct lm75_params device_params[] = { .default_resolution = 12, .default_sample_time = 320, .num_sample_times = 4, - .sample_times = (unsigned int []){ 75, 150, 300, 600 }, + .sample_times = (unsigned int []){ 40, 80, 160, 320 }, .resolutions = (u8 []) {9, 10, 11, 12 }, }, [tmp105] = { @@ -240,14 +240,14 @@ static const struct lm75_params device_params[] = { .default_resolution = 12, .default_sample_time = 220, .num_sample_times = 4, - .sample_times = (unsigned int []){ 38, 75, 150, 300 }, + .sample_times = (unsigned int []){ 28, 55, 110, 220 }, .resolutions = (u8 []) {9, 10, 11, 12 }, }, [tmp112] = { - .set_mask = 3 << 5, /* 12-bit mode */ + .set_mask = 3 << 5, /* 8 samples / second */ .clr_mask = 1 << 7, /* no one-shot mode*/ .default_resolution = 12, - .default_sample_time = MSEC_PER_SEC / 4, + .default_sample_time = 125, .num_sample_times = 4, .sample_times = (unsigned int []){ 125, 250, 1000, 4000 }, }, @@ -257,7 +257,7 @@ static const struct lm75_params device_params[] = { .default_resolution = 12, .default_sample_time = 220, .num_sample_times = 4, - .sample_times = (unsigned int []){ 38, 75, 150, 300 }, + .sample_times = (unsigned int []){ 28, 55, 110, 220 }, .resolutions = (u8 []) {9, 10, 11, 12 }, }, [tmp275] = { @@ -266,7 +266,7 @@ static const struct lm75_params device_params[] = { .default_resolution = 12, .default_sample_time = 220, .num_sample_times = 4, - .sample_times = (unsigned int []){ 38, 75, 150, 300 }, + .sample_times = (unsigned int []){ 28, 55, 110, 220 }, .resolutions = (u8 []) {9, 10, 11, 12 }, }, [tmp75] = { @@ -275,7 +275,7 @@ static const struct lm75_params device_params[] = { .default_resolution = 12, .default_sample_time = 220, .num_sample_times = 4, - .sample_times = (unsigned int []){ 38, 75, 150, 300 }, + .sample_times = (unsigned int []){ 28, 55, 110, 220 }, .resolutions = (u8 []) {9, 10, 11, 12 }, }, [tmp75b] = { /* not one-shot mode, Conversion rate 37Hz */ @@ -290,7 +290,7 @@ static const struct lm75_params device_params[] = { [tmp75c] = { .clr_mask = 1 << 5, /*not one-shot mode*/ .default_resolution = 12, - .default_sample_time = MSEC_PER_SEC / 4, + .default_sample_time = MSEC_PER_SEC / 12, } }; |