linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] backlight: Add LMS501KF03 LCD panel driver
Date: Wed, 18 Apr 2012 16:21:25 +0000	[thread overview]
Message-ID: <4F8EEA05.1050403@gmx.de> (raw)
In-Reply-To: <1334558406-22576-1-git-send-email-sachin.kamat@linaro.org>

On 04/16/2012 06:40 AM, Sachin Kamat wrote:
> LMS501KF03 is a 480x800 LCD module with brightness control.
> The driver uses 3-wired SPI inteface.
> 
> Signed-off-by: Ilho Lee <Ilho215.lee@samsung.com>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---

> diff --git a/drivers/video/backlight/lms501kf03.c b/drivers/video/backlight/lms501kf03.c
> new file mode 100644
> index 0000000..3dc85d4
> --- /dev/null
> +++ b/drivers/video/backlight/lms501kf03.c
> +static int lms501kf03_ldi_enable(struct lms501kf03 *lcd)
> +{
> +	int ret, i;
> +	const unsigned short *init_seq[] = {
> +		SEQ_DISPLAY_ON,
> +	};

Is this array expected to grow at some point?
Otherwise I'd suggest to get rid of it and simplify the code below.

> +
> +	for (i = 0; i < ARRAY_SIZE(init_seq); i++) {
> +		ret = lms501kf03_panel_send_sequence(lcd, init_seq[i]);
> +		if (ret)
> +			break;
> +	}
> +
> +	return ret;
> +}
> +
> +static int lms501kf03_ldi_disable(struct lms501kf03 *lcd)
> +{
> +	int ret, i;
> +
> +	const unsigned short *init_seq[] = {
> +		SEQ_DISPLAY_OFF,
> +	};

dito

> +
> +	for (i = 0; i < ARRAY_SIZE(init_seq); i++) {
> +		ret = lms501kf03_panel_send_sequence(lcd, init_seq[i]);
> +		if (ret)
> +			break;
> +	}
> +
> +	return ret;
> +}


Best regards,

Florian Tobias Schandinat

  reply	other threads:[~2012-04-18 16:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16  6:52 [PATCH] backlight: Add LMS501KF03 LCD panel driver Sachin Kamat
2012-04-18 16:21 ` Florian Tobias Schandinat [this message]
2012-04-19  7:52 ` 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=4F8EEA05.1050403@gmx.de \
    --to=florianschandinat@gmx.de \
    --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).