Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Anand Moon <linux.amoon@gmail.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	Sjoerd Simons <sjoerd.simons@collabora.co.uk>,
	Markus Reichl <m.reichl@fivetechno.de>,
	Russell King <linux@arm.linux.org.uk>,
	Kukjin Kim <kgene@kernel.org>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	"linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>
Subject: Re: [PATCH v3 6/6] hwmon: pwm-fan: Update the duty cycle inorder to control the pwm-fan
Date: Sun, 12 Apr 2015 08:41:18 -0700	[thread overview]
Message-ID: <552A921E.7050604@roeck-us.net> (raw)
In-Reply-To: <CANAwSgQ=oorXVsorpvXAjTnLx3zy5pboRBruhirqy6EN_xjEdg@mail.gmail.com>

On 04/12/2015 08:29 AM, Anand Moon wrote:
> hi Guenter,
>
> I am referring to #linux/drivers/pwm/pwm-samsung.c
>
> Will update the comment.
>
Sure, but that doesn't help as patch description for the pwm-fan driver.

Guenter

> -Anand Moon
>
> On 12 April 2015 at 20:37, Guenter Roeck <linux@roeck-us.net> wrote:
>> On 04/12/2015 07:54 AM, Anand Moon wrote:
>>>
>>> In order to disable the PWM we need to update using following sequence.
>>>
>>>          pwm_config(pwm, 0, period);
>>>          pwm_disable(pwm);
>>>
>>> pwm_config() with a zero duty cycle to make it clear the timer and update
>>> the PWM registers.
>>> pwm_disable will clear the TCON_AUTORELOAD(tcon_chan) and update the PWM
>>> register.
>>>
>> There is no TCON_AUTORELOAD in this driver. Future developers will have no
>> idea
>> what you are talking about here. Please provide a generic comment.
>>
>>> Next change in state will get trigger unless a new PWM cycle happened.
>>>
>> That sentence is difficult to parse. Actually, I have no idea what it is
>> supposed to mean.
>>
>>>          pwm_config(pwm, duty, period);
>>>          pwm_enable(pwm);
>>>
>>> Through pwm_config we update the duty cycle and period and update the PWM
>>> register.
>>> pwm_enable will update the state to TCON_MANUALUPDATE(tcon_chan)
>>> and TCON_START(tcon_chan) | TCON_AUTORELOAD(tcon_chan) and update the PWM
>>> register.
>>>
>> This sentence does not make sense in the context of the pwm-fan driver.
>>
>>> Reported-by: Markus Reichl <m.reichl@fivetechno.de>
>>> Tested-by: Markus Reichl <m.reichl@fivetechno.de>
>>> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
>>> Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
>>> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
>>> ---
>>>    drivers/hwmon/pwm-fan.c | 10 ++++------
>>>    1 file changed, 4 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c
>>> index 7c83dc4..f25c841 100644
>>> --- a/drivers/hwmon/pwm-fan.c
>>> +++ b/drivers/hwmon/pwm-fan.c
>>> @@ -44,26 +44,24 @@ static int  __set_pwm(struct pwm_fan_ctx *ctx,
>>> unsigned long pwm)
>>>          int ret = 0;
>>>
>>>          mutex_lock(&ctx->lock);
>>> +
>>
>>
>> Please refrain from making unnecessary whitespace changes.
>>
>> Thanks,
>> Guenter
>>
>

      reply	other threads:[~2015-04-12 15:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-12 14:54 v3 Exynos5422 odroidxu3 pwm-fan control using thermal sensors Anand Moon
2015-04-12 14:54 ` [PATCH v3 1/6] ARM: dts :exynos5422-odroidxu3 Add pwm-fan node to the Odroid-XU3 board Anand Moon
2015-04-12 14:54 ` [PATCH v3 2/6] ARM: dts: OdroidXU3: Enable TMU at Exynos5422 base Anand Moon
2015-04-12 14:54 ` [PATCH v3 3/6] ARM: dts: define default thermal-zones for exynos5 Anand Moon
2015-04-12 14:54 ` [PATCH v3 4/6] ARM: dts exynos5420 update the cooling cells for core cpu0 Anand Moon
     [not found] ` <1428850452-4178-1-git-send-email-linux.amoon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-12 14:54   ` [PATCH v3 5/6] ARM: dts: Enable thermal_zone for exynos5422 Anand Moon
2015-04-12 14:54   ` [PATCH v3 6/6] hwmon: pwm-fan: Update the duty cycle inorder to control the pwm-fan Anand Moon
2015-04-12 15:07     ` Guenter Roeck
     [not found]       ` <552A8A1C.9000409-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2015-04-12 15:29         ` Anand Moon
2015-04-12 15:41           ` Guenter Roeck [this message]

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=552A921E.7050604@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edubezval@gmail.com \
    --cc=kgene@kernel.org \
    --cc=l.majewski@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux.amoon@gmail.com \
    --cc=linux@arm.linux.org.uk \
    --cc=m.reichl@fivetechno.de \
    --cc=sjoerd.simons@collabora.co.uk \
    /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