Re: [PATCH] backlight: Add LMS501KF03 LCD panel driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
> Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx>
> ---

> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Tourism]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux