All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 01/15] hwmon: (it87) Fix pwm frequency display for chips with newer pwm cont
Date: Mon, 30 Mar 2015 15:10:40 +0000	[thread overview]
Message-ID: <55196770.6080908@roeck-us.net> (raw)
In-Reply-To: <1427697235-23566-2-git-send-email-linux@roeck-us.net>

On 03/30/2015 04:07 AM, Jean Delvare wrote:
> Hi Guenter,
>
> On Sun, 29 Mar 2015 23:33:41 -0700, Guenter Roeck wrote:
>> On chips with newer pwm control, the pwm frequency divider is 256
>> instead of 128. Since the base pwm frequency remained the same, the actual
>> pwm frequency is half of what it used to be with the older pwm control
>> mechanism.
>>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>> ---
>>   drivers/hwmon/it87.c | 34 +++++++++++++++++++++++++---------
>>   1 file changed, 25 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
>> index ab12dc2eb896..7ab5bd026e91 100644
>> --- a/drivers/hwmon/it87.c
>> +++ b/drivers/hwmon/it87.c
>> @@ -502,15 +502,25 @@ static int DIV_TO_REG(int val)
>>   }
>>   #define DIV_FROM_REG(val) (1 << (val))
>>
>> +/*
>> + * pwm base frequencies. The frequency has to be divided by either 128 or 256,
>> + * depending on the chip type, to calculate the actual pwm frequency.
>> + *
>> + * Some of the chip datasheets suggest a base frequency of 51kHz instead
>> + * of 750kHz for the slowest base frequency, resulting in a pwm frequency
>> + * of 200Hz. Sometimes both pwm frequency select registers are affected,
>> + * sometimes just one. It is unknown if this is a datasheet error or real,
>> + * so this is ignored for now.
>
> Leaving a space between the number and kHz or Hz makes it easier to
> read IMHO. I would also capitalize PWM everywhere.
>
> Other than these minor suggestions, this looks good, good catch! I never
> noticed this difference between the various chips.
>

Hi Jean,

I made those changes. Should I resubmit, or do I have your Reviewed-by: ?

Thanks,
Guenter



_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  parent reply	other threads:[~2015-03-30 15:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30  6:33 [lm-sensors] [PATCH 01/15] hwmon: (it87) Fix pwm frequency display for chips with newer pwm control Guenter Roeck
2015-03-30 11:07 ` [lm-sensors] [PATCH 01/15] hwmon: (it87) Fix pwm frequency display for chips with newer pwm cont Jean Delvare
2015-03-30 15:10 ` Guenter Roeck [this message]
2015-03-30 16:35 ` Jean Delvare
2015-03-30 18:22 ` Guenter Roeck

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=55196770.6080908@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=lm-sensors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.