public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* backlight: aat2870_bl: questions about setting max_current
@ 2011-07-06  6:55 Axel Lin
  2011-07-06  7:41 ` Jinyoung Park
  0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2011-07-06  6:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jin Park, Richard Purdie

hi Jin,
Just found some questions about setting max_current in current implementation of aat2870_bl:

1. Seems the implementation tests wrong value for setting aat2870_bl->max_current.
   I think you mean:

diff --git a/drivers/video/backlight/aat2870_bl.c b/drivers/video/backlight/aat2870_bl.c
index f13a3f7..a8a2545 100644
--- a/drivers/video/backlight/aat2870_bl.c
+++ b/drivers/video/backlight/aat2870_bl.c
@@ -175,7 +175,7 @@ static int aat2870_bl_probe(struct platform_device *pdev)
        else
                aat2870_bl->channels = AAT2870_BL_CH_ALL;
 
-       if (pdata->max_brightness > 0)
+       if (pdata->max_current > 0)
                aat2870_bl->max_current = pdata->max_current;
        else
                aat2870_bl->max_current = AAT2870_CURRENT_27_9;


2. Even above issue is fixed, you still cannot differentiate below 2 cases:
        a) if pdata->max_current is not set , or
        b) pdata->max_current is set to AAT2870_CURRENT_0_45 ( which is also 0 ).
   In either case, current implementation will set max_current to AAT2870_CURRENT_27_9.

Regards,
Axel




^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-06  8:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-06  6:55 backlight: aat2870_bl: questions about setting max_current Axel Lin
2011-07-06  7:41 ` Jinyoung Park
2011-07-06  7:50   ` Axel Lin
2011-07-06  8:19     ` Jinyoung Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox