From: Jingoo Han <jg1.han@samsung.com>
To: 'Andrew Bresticker' <abrestic@chromium.org>,
'Andrew Morton' <akpm@linux-foundation.org>
Cc: linux-fbdev@vger.kernel.org, 'Richard Purdie' <rpurdie@rpsys.net>,
'Florian Tobias Schandinat' <FlorianSchandinat@gmx.de>,
linux-kernel@vger.kernel.org,
'Doug Anderson' <dianders@chromium.org>,
'Jingoo Han' <jg1.han@samsung.com>
Subject: Re: [PATCH v2] backlight: platform_lcd: introduce probe callback
Date: Mon, 15 Apr 2013 01:47:17 +0000 [thread overview]
Message-ID: <000001ce397b$292da160$7b88e420$%han@samsung.com> (raw)
In-Reply-To: <1365711890-15168-1-git-send-email-abrestic@chromium.org>
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
>
next prev parent reply other threads:[~2013-04-15 1:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 18:36 [PATCH] backlight: platform_lcd: introduce probe callback Andrew Bresticker
2013-04-11 19:14 ` Doug Anderson
2013-04-11 20:17 ` Andrew Bresticker
2013-04-11 20:24 ` [PATCH v2] " Andrew Bresticker
2013-04-11 20:30 ` Doug Anderson
2013-04-15 1:47 ` Jingoo Han [this message]
2013-04-15 23:06 ` Andrew Morton
2013-04-16 0:53 ` Jingoo Han
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='000001ce397b$292da160$7b88e420$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=FlorianSchandinat@gmx.de \
--cc=abrestic@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=dianders@chromium.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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).