From: Richard Purdie <rpurdie@rpsys.net>
To: Rodolfo Giometti <giometti@enneenne.com>
Cc: linux-fbdev-devel@lists.sourceforge.net,
linux-arm-kernel@lists.arm.linux.org.uk,
Paul Sokolovsky <pmiscml@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] PXAFB: Support for backlight control
Date: Thu, 22 Feb 2007 00:59:06 +0000 [thread overview]
Message-ID: <1172105946.5790.78.camel@localhost.localdomain> (raw)
In-Reply-To: <20070221145353.GA23916@enneenne.com>
On Wed, 2007-02-21 at 15:53 +0100, Rodolfo Giometti wrote:
> Backlight control support for the PXA fram buffer.
>
> Signed-off-by: Rodolfo Giometti <giometti@enneenne.com>
>
> ---
>
> Each platform should define the backlight properties in its own setup
> file in "linux/arch/arm/mach-pxa/" as follow:
>
> static int pxafb_bl_get_brightness(struct backlight_device *bl_dev)
> {
> return read_the_backlight_brightness();
> }
>
> static int pxafb_bl_update_status(struct backlight_device *bl_dev)
> {
> int perc, ret;
>
> if (bl_dev->props->power != FB_BLANK_UNBLANK ||
> bl_dev->props->fb_blank != FB_BLANK_UNBLANK)
> perc = 0;
> else
> perc = bl_dev->props->brightness;
>
> write_the_backlight_brightness(perc);
>
> return 0;
> }
>
> static struct backlight_properties wwpc1100_backlight_props = {
> .get_brightness = pxafb_bl_get_brightness,
> .update_status = pxafb_bl_update_status,
> .max_brightness = 100,
> };
>
> and then seting up the fb info as follow:
>
> wwpc1100_pxafb_info.modes = &special_modes;
> wwpc1100_pxafb_info.bl_props = &wwpc1100_backlight_props;
> set_pxa_fb_info(&wwpc1100_pxafb_info);
Reading through the patch its:
1) Not against any mainline kernel
2) Not against a recent kernel
There were a number of backlight class changes just merged into mainline
and you need to sync up any patch against them.
As mentioned by others, there is no need to tie the backlight driver
into the framebuffer any more. Have a look at
drivers/video/backlight/corgi_bl.c for an example (its used by PXA
devices).
I have said elsewhere I will take patches to make corgi_bl a more
generic driver (or maybe create a simple generic backlight driver) along
the lines of what Paul mentioned.
Regards,
Richard
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
next prev parent reply other threads:[~2007-02-22 1:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-21 14:53 [PATCH 1/1] PXAFB: Support for backlight control Rodolfo Giometti
2007-02-21 16:00 ` Paul Sokolovsky
2007-02-21 16:12 ` Rodolfo Giometti
2007-02-21 16:26 ` Paul Sokolovsky
2007-02-22 8:32 ` Rodolfo Giometti
2007-02-22 10:33 ` Paul Sokolovsky
2007-02-22 16:37 ` Rodolfo Giometti
2007-02-22 17:11 ` Richard Purdie
2007-02-28 16:54 ` [Linux-fbdev-devel] " James Simmons
2007-02-22 0:59 ` Richard Purdie [this message]
2007-02-22 8:28 ` Rodolfo Giometti
2007-02-22 9:27 ` Richard Purdie
2007-02-22 9:32 ` Rodolfo Giometti
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=1172105946.5790.78.camel@localhost.localdomain \
--to=rpurdie@rpsys.net \
--cc=giometti@enneenne.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=pmiscml@gmail.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).