lkml.org 
[lkml]   [2013]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] backlight: platform_lcd: introduce probe callback
Date
On Friday, April 12, 2013 5:25 AM, Andrew Bresticker wrote:
>
> Platform LCD devices may need to do some device-specific
> initialization before they can be used (regulator or GPIO setup,
> for example), but currently the driver does not support any way of
> doing this. This patch adds a probe() callback to plat_lcd_data
> which platform LCD devices can set to indicate that device-specific
> initialization is needed.
>
> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>

CC'ed Andrew Morton,

It looks good.
Acked-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han


> ---
> drivers/video/backlight/platform_lcd.c | 6 ++++++
> include/video/platform_lcd.h | 1 +
> 2 files changed, 7 insertions(+)
>
> diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c
> index 17a6b83..f46180e 100644
> --- a/drivers/video/backlight/platform_lcd.c
> +++ b/drivers/video/backlight/platform_lcd.c
> @@ -86,6 +86,12 @@ static int platform_lcd_probe(struct platform_device *pdev)
> return -EINVAL;
> }
>
> + if (pdata->probe) {
> + err = pdata->probe(pdata);
> + if (err)
> + return err;
> + }
> +
> plcd = devm_kzalloc(&pdev->dev, sizeof(struct platform_lcd),
> GFP_KERNEL);
> if (!plcd) {
> diff --git a/include/video/platform_lcd.h b/include/video/platform_lcd.h
> index ad3bdfe..23864b2 100644
> --- a/include/video/platform_lcd.h
> +++ b/include/video/platform_lcd.h
> @@ -15,6 +15,7 @@ struct plat_lcd_data;
> struct fb_info;
>
> struct plat_lcd_data {
> + int (*probe)(struct plat_lcd_data *);
> void (*set_power)(struct plat_lcd_data *, unsigned int power);
> int (*match_fb)(struct plat_lcd_data *, struct fb_info *);
> };
> --
> 1.8.1.3
>




\
 
 \ /
  Last update: 2013-04-15 04:01    [W:0.081 / U:1.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site