Re: [RFC PATCH] report acpi video hot key event through inputdevice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2007-08-14 at 18:43 +0800, Zhang Rui wrote:
> On Tue, 2007-08-14 at 19:58 +0800, Richard Hughes wrote:
> > 
> > On Wed, 2007-08-08 at 14:37 +0800, Zhang Rui wrote:
> > > On Mon, 2007-07-30 at 12:47 +0100, Richard Hughes wrote:
> > > > On 30/07/07, Matthew Garrett <mjg59@xxxxxxxxxxxxx> wrote:
> > > > > On Sun, Jul 29, 2007 at 12:40:16PM -0400, Luming Yu wrote:
> > > > > >       switch (event) {
> > > > > >       case ACPI_VIDEO_NOTIFY_SWITCH:  /* User requested a
> > switch,
> > > > > >                                        * most likely via
> > hotkey. */
> > > > > >               acpi_bus_generate_event(device, event, 0);
> > > > > > +             keycode = KEY_UNKNOWN;
> > > > >
> > > > > KEY_SWITCHVIDEOMODE ?
> > > >
> > > > Yes, please use this. This is what other ACPI drivers are using.
> > > >
> > > > > What's wrong with the existing KEY_BRIGHTNESSDOWN and
> > KEY_BRIGHTNESSUP?
> > > >
> > > > Agree, this matches other drivers like thinkpad_acpi and
> > sony-laptop.
> > > >
> > > > > > +#define KEY_BRIGHTNESS_ZERO  0x1fd
> > > > > > +#define KEY_BRIGHTNESS_OFF   0x1fe
> > > > >
> > > > > You almost certainly want to go via linux-input if you're adding
> > new
> > > > > keycodes.
> > > >
> > > > Yup - do we have to distinguish between zero and off? Or is off
> > > > "switch panel backlight off" and zero is "switch to lowest
> > brightness
> > > > level"?
> > > >
> > > Hmm, I think they are slightly different.
> > > IMO, "zero" equals _BCM(0), it means to turn off the backlight, but
> > we
> > > may still see the screen if there is a ambient light.
> > > "off" means turn off the output device, i.e. set to D1/D2/D3 state.
> > 
> > Sure, so they are different states, but to a user they are both
> > effectively the same "screen is off". Is there any use case to
> I'm not sure of this.
> But in some cases, I do can still see the screen although it's very dark
> after I "echo 0 >/sys/class/backlight/acpi_video0/brightness".
> IMO, this is because the ambient light is on.
> 
Oops, I misunderstood what you mean. ;-p
> >  Is there any use case to removing the backlight without powering down the display?
I don't know.
Maybe "brightness zero" and "display device off" mean the same to a
user, but they are quite different to others, like the Graphics driver.
It still has to work when "brightness zero" because it's still
displaying, but it can throttle down/shutdown some parts when the
display device is off.
It's reasonable to send them as different input events.

Thanks,
Rui
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux