public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Kamil Debski <k.debski@samsung.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	lm-sensors@lm-sensors.org, Tomasz Figa <t.figa@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [lm-sensors] [PATCH] hwmon: pwm-fan: Add pwm-fan driver
Date: Thu, 10 Jul 2014 09:17:13 -0700	[thread overview]
Message-ID: <53BEBC89.8080205@roeck-us.net> (raw)
In-Reply-To: <107401cf9c52$1fe0a0e0$5fa1e2a0$%debski@samsung.com>

Hi Kamil,

On 07/10/2014 08:17 AM, Kamil Debski wrote:
>
>>
>>> +	}
>>> +
>>> +	dev_set_drvdata(&pdev->dev, ctx);
>>> +	platform_set_drvdata(pdev, ctx);
>>> +
>>> +	/* Set duty cycle to maximum allowed */
>>> +	ctx->duty_cycle = ctx->pwm->period - 1;
>>> +	ctx->pwm_value = MAX_PWM;
>>> +	pwm_config(ctx->pwm, ctx->duty_cycle, ctx->pwm->period);
>
> Guenter, I have a question regarding this. I see that gpio-fan reads
> the state of gpios and uses this as the initial setting.
> Led-pwm on init sets the brightness to LED_OFF.
>
> What should be the default state after init? Should the fan be off or
> at full power? I am thinking about adding an optional node to device
> tree that could be used to set this. But the question remains - what
> should be the default setting?
>

Trick question ... I can not really answer it. you can try the devicetree
option, but be prepared to have it rejected - the usual argument is that
dt shall only describe the HW but not its configuration.

Ultimately, either way is fine with me.

Guenter


  reply	other threads:[~2014-07-10 16:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09 14:53 [PATCH] hwmon: pwm-fan: Add pwm-fan driver Kamil Debski
2014-07-09 16:58 ` [lm-sensors] " Guenter Roeck
2014-07-10 15:17   ` Kamil Debski
2014-07-10 16:17     ` Guenter Roeck [this message]
2014-07-14 13:47   ` Kamil Debski
2014-07-09 17:49 ` Tobias Klauser
2014-07-10 15:19   ` Kamil Debski

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=53BEBC89.8080205@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=devicetree@vger.kernel.org \
    --cc=k.debski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=m.szyprowski@samsung.com \
    --cc=t.figa@samsung.com \
    /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