lkml.org 
[lkml]   [2013]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to set fops in "struct platform_pwm_backlight_data"?
On Thu, Oct 17, 2013 at 02:49:57PM +0800, Mark Zhang wrote:
> Hi,
>
> This is the first time I send mail to linux-pwm, I didn't read through
> the mails in this list, so if somebody already asked this question, I'm
> sorry about that.
>
> I wanna set some fops in "struct platform_pwm_backlight_data". But the
> currrent probe function in pwm_bl.c says:
>
> -------
> if (!data) {
> ret = pwm_backlight_parse_dt(&pdev->dev, &defdata);
> if (ret < 0) {
> dev_err(&pdev->dev, "failed to find platform data\n");
> return ret;
> }
>
> data = &defdata;
> }
> -------
>
> This looks like if we set the platform data for pwm backlight device,
> "pwm_backlight_parse_dt" will never have a chance to be called, which
> means the stuffs I defined in backlight DT node will be ignored.
>
> If I don't set the platform data for pwm backlight device, according to
> the pwm_backlight_probe, I will never have a chance to set some fops
> which I need(like "notify", "check_fb"...).
>
> So, what I suppose to do now? Maybe there is a way to set function
> pointers in DT?

Perhaps you could describe in more detail what you need the functions
for.

Generally you're not supposed to mix DT and platform data. Without more
info that's about all I can say.

Thierry
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-10-17 09:41    [W:0.098 / U:4.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site