linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Mark Zhang <nvmarkzhang@gmail.com>
Cc: rpurdie@rpsys.net, jg1.han@samsung.com,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
	tomi.valkeinen@ti.com, linux-pwm@vger.kernel.org,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: How to set fops in "struct platform_pwm_backlight_data"?
Date: Thu, 17 Oct 2013 07:14:46 +0000	[thread overview]
Message-ID: <20131017071445.GA2502@ulmo.nvidia.com> (raw)
In-Reply-To: <525F8895.5010806@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-10-17  7:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-17  6:49 How to set fops in "struct platform_pwm_backlight_data"? Mark Zhang
2013-10-17  7:14 ` Thierry Reding [this message]
2013-10-18  4:48   ` Mark Zhang
2013-10-22  2:41     ` Mark Zhang
2013-10-22  7:24     ` Thierry Reding
2013-10-22  8:55       ` Mark Zhang
2013-10-22 12:49         ` Thierry Reding
2013-10-23  2:16           ` Mark Zhang
2013-10-23  8:00             ` Thierry Reding
2013-10-23  8:49               ` Mark Zhang
2013-10-23  9:09                 ` Thierry Reding
2013-10-23 10:31                   ` Mark Zhang
2013-10-23 10:54                     ` Thierry Reding
2013-10-23 11:33                       ` Mark Zhang
2013-10-23 10:36                   ` Mark Zhang
2013-10-23 10:46                     ` Mark Zhang
2013-10-23 10:58                       ` Thierry Reding
2013-10-23 11:34                         ` Mark Zhang
2013-10-23 10:51                     ` Thierry Reding

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=20131017071445.GA2502@ulmo.nvidia.com \
    --to=thierry.reding@gmail.com \
    --cc=jg1.han@samsung.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=nvmarkzhang@gmail.com \
    --cc=plagnioj@jcrosoft.com \
    --cc=rpurdie@rpsys.net \
    --cc=tomi.valkeinen@ti.com \
    /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).