From: Guenter Roeck <linux@roeck-us.net>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH v3] hwmon: (nct7802) Add pwm control
Date: Sat, 04 Jul 2015 18:04:27 +0000 [thread overview]
Message-ID: <5598202B.7010000@roeck-us.net> (raw)
In-Reply-To: <1436021854-13072-1-git-send-email-const@MakeLinux.com>
Hi Constantine,
On 07/04/2015 07:57 AM, Constantine Shulyupin wrote:
> Added fan output control registers.
> Modes of operation are PWM (default) and DC.
>
> Introduced show_pwm, store_pwm, nct7802_pwm_attrs, nct7802_pwm_group.
>
> ---
> Change log:
> Fixed in v2:
> - renamed fanX_output to pwmX
> - introduced nct7802_pwm_group and nct7802_pwm_attrs
> - renamed show_dec to show_pwd
> - used kstrtou8 instead kstrtouint
> Fixed in v3:
> - spilt functions declarations to fit 80 columns
> - removed unnecessary initializations
> - rearranged variable declarations
> - shortened return expression
> - renamed store_u8 to store_pwm
>
Looks good at first glance, but ...
> Signed-off-by: Constantine Shulyupin <const@MakeLinux.com>
> ---
> drivers/hwmon/nct7802.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 47 insertions(+)
>
> diff --git a/drivers/hwmon/nct7802.c b/drivers/hwmon/nct7802.c
> index afa242d..6382d4d 100644
> --- a/drivers/hwmon/nct7802.c
> +++ b/drivers/hwmon/nct7802.c
> @@ -102,6 +102,36 @@ static ssize_t store_temp_type(struct device *dev,
> return err ? : count;
> }
>
> +static ssize_t show_pwm(struct device *dev, struct device_attribute *devattr,
> + char *buf)
> +{
> + struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
> + struct nct7802_data *data = dev_get_drvdata(dev);
> + unsigned int;
... it is always a good idea to at least compile test the code
after a change, as trivial as the change may appear to be.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2015-07-04 18:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-04 14:57 [lm-sensors] [PATCH v3] hwmon: (nct7802) Add pwm control Constantine Shulyupin
2015-07-04 14:57 ` Constantine Shulyupin
2015-07-04 18:04 ` Guenter Roeck [this message]
2015-07-04 18:08 ` [lm-sensors] " Guenter Roeck
2015-07-05 6:57 ` Jean Delvare
2015-07-05 6:57 ` Jean Delvare
2015-07-05 13:00 ` [lm-sensors] " Guenter Roeck
2015-07-05 13:00 ` 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=5598202B.7010000@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.