From: Sachin Kamat <sachin.kamat@linaro.org>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH v2] backlight: Add LMS501KF03 LCD panel driver
Date: Mon, 30 Apr 2012 04:54:03 +0000 [thread overview]
Message-ID: <CAK9yfHxYBGXRjmadC9y_r8OSThTrhuGsKaKtLY-tRPFKHP5ExA@mail.gmail.com> (raw)
In-Reply-To: <1334835208-32055-1-git-send-email-sachin.kamat@linaro.org>
On 30/04/2012, Jingoo Han <jg1.han@samsung.com> wrote:
> On 28 April 2012 11:02, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>> Any comments on the revised patch?
>>
>> On 19 April 2012 17:03, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>> > LMS501KF03 is a 480x800 LCD module with brightness control.
>> > The driver uses 3-wired SPI inteface.
>> >
<snip>
>> > +
>> > +#define POWER_IS_ON(power) ((power) <= FB_BLANK_NORMAL)
>
> This could have been implemented as a regular lower-case C function.
> They're better than macros.
>
> Please refer to ams369fg06 amoled panel driver.
OK. Will modify.
>
<snip>
>> > +
>> > +const unsigned short SEQ_DISPLAY_OFF[] = {
>> > + 0x10,
>> > + ENDDEF
>> > +};
>> > +
>
>
> It's not irregular that these symbols are all-uppercase.
> How about replacing them with lower-case?
> ex) SEQ_xxx -> seq_xxx
OK. Will modify.
>
>
<snip>
>> > +static int lms501kf03_set_brightness(struct backlight_device *bd)
>> > +{
>> > + int ret = 0;
>> > + int brightness = bd->props.brightness;
>> > +
>> > + if (brightness < MIN_BRIGHTNESS ||
>> > + brightness > bd->props.max_brightness) {
>> > + dev_err(&bd->dev, "lcd brightness should be %d to
>> > %d.\n",
>> > + MIN_BRIGHTNESS, MAX_BRIGHTNESS);
>> > + return -EINVAL;
>> > + }
>> > +
>> > + return ret;
>> > +}
>> > +
>
> Are these backlight control functions really necessary?
> As I am concerned, this LMS501KF03 uses PWM backlight as backlight control.
> If PWM backlight driver is used, these backlight control functions are
> superfluous.
Yes, you are right. If PWM driver is used for backlight control, then
these functions are not necessary. However for the sake of
completeness of this driver, I have added them so that they could be
used to control backlight in cases where PWM is not used. Please let
me know your opinion.
>
>> > +static struct lcd_ops lms501kf03_lcd_ops = {
<snip>
>> > +
>> > + lcd->lcd_pd = (struct lcd_platform_data
>> > *)spi->dev.platform_data;
>
> This is an unnecessary cast of void*.
OK. Will remove it.
>
>
Thank you for reviewing the patch and providing your comments. I will
modify and send the updated patch after I get your opinion about
backlight control.
--
With warm regards,
Sachin
next prev parent reply other threads:[~2012-04-30 4:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-19 11:45 [PATCH v2] backlight: Add LMS501KF03 LCD panel driver Sachin Kamat
2012-04-28 2:14 ` Sachin Kamat
2012-04-30 0:00 ` Jingoo Han
2012-04-30 4:54 ` Sachin Kamat [this message]
2012-04-30 5:04 ` Jingoo Han
2012-04-30 5:20 ` Sachin Kamat
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=CAK9yfHxYBGXRjmadC9y_r8OSThTrhuGsKaKtLY-tRPFKHP5ExA@mail.gmail.com \
--to=sachin.kamat@linaro.org \
--cc=linux-fbdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).