linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 1/1] hwmon: (lm75) Aproximate sample times to data-sheet values
       [not found] ` <20190904115621.15057-2-iker.perez@codethink.co.uk>
@ 2019-09-04 18:12   ` Guenter Roeck
  0 siblings, 0 replies; only message in thread
From: Guenter Roeck @ 2019-09-04 18:12 UTC (permalink / raw)
  To: Iker Perez; +Cc: linux-hwmon

On Wed, Sep 04, 2019 at 12:56:21PM +0100, Iker Perez wrote:
> From: Iker Perez del Palomar Sustatxa <iker.perez@codethink.co.uk>
> 
> 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>

Merged with my lm75 patch series and applied to hwmon-next.

Thanks,
Guenter

> ---
>  drivers/hwmon/lm75.c | 40 ++++++++++++++++++++--------------------
>  1 file changed, 20 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
> index f68ef9d451ab..2bb3e4ea5abd 100644
> --- a/drivers/hwmon/lm75.c
> +++ b/drivers/hwmon/lm75.c
> @@ -123,13 +123,13 @@ 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 = MSEC_PER_SEC,
> +		.default_sample_time = MSEC_PER_SEC / 2,
>  	},
>  	[ds75] = {
>  		.clr_mask = 3 << 5,
> @@ -145,45 +145,45 @@ 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*/
>  		.default_resolution = 12,
> -		.default_sample_time = MSEC_PER_SEC / 4,
> +		.default_sample_time = MSEC_PER_SEC / 5
>  	},
>  	[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,
> @@ -194,19 +194,19 @@ static const struct lm75_params device_params[] = {
>  		.clr_mask = 1 << 7,	/* not one-shot mode */
>  		.default_resolution = 12,
>  		.resolution_limits = 9,
> -		.default_sample_time = MSEC_PER_SEC,
> +		.default_sample_time = MSEC_PER_SEC / 4,
>  	},
>  	[tmp100] = {
>  		.set_mask = 3 << 5,	/* 12-bit mode */
>  		.clr_mask = 1 << 7,	/* not one-shot mode */
>  		.default_resolution = 12,
> -		.default_sample_time = MSEC_PER_SEC,
> +		.default_sample_time = MSEC_PER_SEC / 3,
>  	},
>  	[tmp101] = {
>  		.set_mask = 3 << 5,	/* 12-bit mode */
>  		.clr_mask = 1 << 7,	/* not one-shot mode */
>  		.default_resolution = 12,
> -		.default_sample_time = MSEC_PER_SEC,
> +		.default_sample_time = MSEC_PER_SEC / 3,
>  	},
>  	[tmp112] = {
>  		.set_mask = 3 << 5,	/* 12-bit mode */
> @@ -218,25 +218,25 @@ static const struct lm75_params device_params[] = {
>  		.set_mask = 3 << 5,	/* 12-bit mode */
>  		.clr_mask = 1 << 7,	/* not one-shot mode*/
>  		.default_resolution = 12,
> -		.default_sample_time = MSEC_PER_SEC / 2,
> +		.default_sample_time = MSEC_PER_SEC / 4,
>  	},
>  	[tmp175] = {
>  		.set_mask = 3 << 5,	/* 12-bit mode */
>  		.clr_mask = 1 << 7,	/* not one-shot mode*/
>  		.default_resolution = 12,
> -		.default_sample_time = MSEC_PER_SEC / 2,
> +		.default_sample_time = MSEC_PER_SEC / 4,
>  	},
>  	[tmp275] = {
>  		.set_mask = 3 << 5,	/* 12-bit mode */
>  		.clr_mask = 1 << 7,	/* not one-shot mode*/
>  		.default_resolution = 12,
> -		.default_sample_time = MSEC_PER_SEC / 2,
> +		.default_sample_time = MSEC_PER_SEC / 4,
>  	},
>  	[tmp75] = {
>  		.set_mask = 3 << 5,	/* 12-bit mode */
>  		.clr_mask = 1 << 7,	/* not one-shot mode*/
>  		.default_resolution = 12,
> -		.default_sample_time = MSEC_PER_SEC / 2,
> +		.default_sample_time = MSEC_PER_SEC / 4,
>  	},
>  	[tmp75b] = { /* not one-shot mode, Conversion rate 37Hz */
>  		.clr_mask = 1 << 7 | 3 << 5,
> @@ -253,7 +253,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,
>  	}
>  };
>  
> -- 
> 2.11.0
> 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-04 18:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190904115621.15057-1-iker.perez@codethink.co.uk>
     [not found] ` <20190904115621.15057-2-iker.perez@codethink.co.uk>
2019-09-04 18:12   ` [PATCH 1/1] hwmon: (lm75) Aproximate sample times to data-sheet values Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).