Re: [lm-sensors] [PATCH] hwmon: pwm-fan: Add pwm-fan driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux