RE: [PATCH 1/2] leds-lm3530: comment correction about the range ofbrightness

From: Shreshtha Kumar SAHU
Date: Fri Apr 20 2012 - 03:30:33 EST

I feel driver should take care of range provided by hardware by
scaling the value provided by user, instead of limiting the max
brightness to user.

For .e.g. here it can be something like this -
err = i2c_smbus_write_byte_data(drvdata->client,
LM3530_BRT_CTRL_REG, brt_val / 2);

I am not sure if application really use/check max brightness in before
calculating/setting new brightness values.

-----Original Message-----
From: Kim, Milo [mailto:Milo.Kim@xxxxxx]
Sent: Thursday, April 19, 2012 12:11 PM
To: Andrew Morton
Cc: Shreshtha Kumar SAHU; linus.walleij@xxxxxxxxxx; Richard Purdie; linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH 1/2] leds-lm3530: comment correction about the range of brightness

max brightness is 127, so the range of brt_val should be from 0 to 127

Signed-off-by: Milo(Woogyom) Kim <>
include/linux/led-lm3530.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/led-lm3530.h b/include/linux/led-lm3530.h
index eeae6e7..4b13347 100644
--- a/include/linux/led-lm3530.h
+++ b/include/linux/led-lm3530.h
@@ -92,7 +92,7 @@ struct lm3530_pwm_data {
* @als2_resistor_sel: internal resistance from ALS2 input to ground
* @als_vmin: als input voltage calibrated for max brightness in mV
* @als_vmax: als input voltage calibrated for min brightness in mV
- * @brt_val: brightness value (0-255)
+ * @brt_val: brightness value (0-127)
* @pwm_data: PWM control functions (only valid when the mode is PWM)
struct lm3530_platform_data {

Best Regards,
Milo (Woogyom) Kim

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at