From: Guenter Roeck <linux@roeck-us.net>
To: Iker Perez <iker.perez@codethink.co.uk>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH 1/1] hwmon: (lm75) Aproximate sample times to data-sheet values
Date: Wed, 4 Sep 2019 11:12:10 -0700 [thread overview]
Message-ID: <20190904181210.GA7938@roeck-us.net> (raw)
In-Reply-To: <20190904115621.15057-2-iker.perez@codethink.co.uk>
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
>
parent reply other threads:[~2019-09-04 18:17 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20190904115621.15057-2-iker.perez@codethink.co.uk>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190904181210.GA7938@roeck-us.net \
--to=linux@roeck-us.net \
--cc=iker.perez@codethink.co.uk \
--cc=linux-hwmon@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).