Hello Rodolfo, Thursday, February 22, 2007, 10:32:04 AM, you wrote: > On Wed, Feb 21, 2007 at 06:26:08PM +0200, Paul Sokolovsky wrote: k>> Why? It's the same, except that it already exists, generic one (not >> limited to pxafb), and requires 1 function (too bad that C doesn't >> support lambda's): > Ah, ok. >> I sent a bit of criticism for that too ;-). YMMV, but kernel >> solutions are just bound to be pretty simple and generic and lack >> any "niceties", which you'd likely want to do anyway eventually. For >> example, what if you'll want to implement "fade out" effect for >> keyboard backlight? Doing it in adhoc manner in kernel? Whereas with >> the LCD classdev, you can write generic "fade out" trigger and >> attach/detach it from userspace. > I agree. I just wish to add a backlight support for my LCD and > minikeypad. > What do you suggest to me in order to accomplish such task? Well, I write exactly to share experience and work towards having best practices for backlight, etc. control, reusable on wide range of embedded/handheld devices. We in handhelds.org codebase have attached patch* to make corgi_bl more suitable for general use. This patch was submitted to Richard (so, more votes needed ;-) ). Otherwise, snippet I pasted is from real machine implementation, HP iPaq h4000. As for keyboard backlight, another port we have, HTC Universal, has: normal indicator LEDs, keyboard backlight, flashlight, ring vibra. All of these are handled via Generic LED API: http://handhelds.org/cgi-bin/cvsweb.cgi/linux/kernel26/arch/arm/mach-pxa/htcuniversal/htcuniversal_leds.c?rev=1.6&content-type=text/x-cvsweb-markup To show that it is not an anomaly, but hopefully, a trend, here's vibra driver for the upcoming OpenMoko phone: http://wiki.openmoko.org/wiki/Neo1973_Hardware#Vibrator So, if you have freedom to add keyboard backlight control to your userspace, that would allow you to do many interesting things without disturbing the kernel. [*] Optimized for size, full one should patch <asm/arch/sharpsl.h> of course. > Thanks for your suggestions, > Rodolfo -- Best regards, Paul mailto:[email protected]
Attachment:
driver-corgi-bl-generalize.patch
Description: Binary data
- Follow-Ups:
- Re: [PATCH 1/1] PXAFB: Support for backlight control
- From: Rodolfo Giometti <[email protected]>
- Re: [PATCH 1/1] PXAFB: Support for backlight control
- References:
- [PATCH 1/1] PXAFB: Support for backlight control
- From: Rodolfo Giometti <[email protected]>
- Re: [PATCH 1/1] PXAFB: Support for backlight control
- From: Paul Sokolovsky <[email protected]>
- Re: [PATCH 1/1] PXAFB: Support for backlight control
- From: Rodolfo Giometti <[email protected]>
- Re: [PATCH 1/1] PXAFB: Support for backlight control
- From: Paul Sokolovsky <[email protected]>
- Re: [PATCH 1/1] PXAFB: Support for backlight control
- From: Rodolfo Giometti <[email protected]>
- [PATCH 1/1] PXAFB: Support for backlight control
- Prev by Date: Re: request_module: runaway loop modprobe net-pf-1 (is Re: Linux 2.6.21-rc1)
- Next by Date: RE: [kvm-devel] [PATCH 10/13] KVM: Wire up hypercall handlers to a central arch-independent location
- Previous by thread: Re: [PATCH 1/1] PXAFB: Support for backlight control
- Next by thread: Re: [PATCH 1/1] PXAFB: Support for backlight control
- Index(es):