Re: [PATCH 1/1] hwmon: (lm75) Aproximate sample times to data-sheet values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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
> 



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux