Re: [PATCH] leds: driver for ab5500 high voltage leds

From: Mark Brown
Date: Wed Dec 14 2011 - 06:37:21 EST


On Wed, Dec 14, 2011 at 11:23:58AM +0100, Shreshtha Kumar SAHU wrote:

> The actual amount of current flowing hence brightness variation can then be
> altered using PWM, which is also the case in present driver.

> Hence the idea of current control sysfs interface is provided to further
> decrease the max current through the LED(s) if required for saving power
> (but can never exceed the max current set by the platform).
> After fixing the current, "brightness" interface can be used to control
> brightness which internally cofigures the PWM register.

The above basically sounds like you're using the current limit as a way
of adjusting the maximum brightness dynamically for power saving
reasons. This doesn't sound like something that individual drivers
should be doing, it sounds like something that either the subsystem or
userspace code ought to be implementing. It'd seem more natural for the
driver to scale both the PWM and current settings with brightness.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/