lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 22 Oct 2013 09:24:43 +0200
From:	Thierry Reding <thierry.reding@...il.com>
To:	Mark Zhang <nvmarkzhang@...il.com>
Cc:	rpurdie@...ys.net, jg1.han@...sung.com,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@...osoft.com>,
	tomi.valkeinen@...com, linux-pwm@...r.kernel.org,
	"linux-fbdev@...r.kernel.org" <linux-fbdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: How to set fops in "struct platform_pwm_backlight_data"?

On Fri, Oct 18, 2013 at 12:48:12PM +0800, Mark Zhang wrote:
> On 10/17/2013 03:14 PM, Thierry Reding wrote:
> > 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.
> > 
> 
> Okay, I just want to set the "notify" function pointer in "struct
> platform_pwm_backlight_data", because I want to tune the brightness
> value before the pwm-bl sets the brightness to hardware. I don't know
> how to do that, unless we define the platform data explicitly.

Okay, my question should have been what you need the functions for and
why you think you need them.

Thierry

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ