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:   Thu, 15 Jul 2021 13:39:26 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Jiri Kosina <jikos@...nel.org>
Cc:     Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        Maxim Mikityanskiy <maxtram95@...il.com>,
        linux-leds@...r.kernel.org, Daniel Kurtz <djkurtz@...omium.org>,
        Oliver Neukum <oneukum@...e.de>,
        "open list:HID CORE LAYER" <linux-input@...r.kernel.org>,
        lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/6] HID: hid-input: Add offhook and ring LEDs for
 headsets

On Thu, Jul 15, 2021 at 08:57:44PM +0200, Jiri Kosina wrote:
> On Tue, 6 Jul 2021, Benjamin Tissoires wrote:
> 
> > > A lot of USBHID headsets available on the market have LEDs that indicate
> > > ringing and off-hook states when used with VoIP applications. This
> > > commit exposes these LEDs via the standard sysfs interface.
> > >
> > > Signed-off-by: Maxim Mikityanskiy <maxtram95@...il.com>
> > > ---
> > >  drivers/hid/hid-input.c                | 2 ++
> > >  drivers/input/input-leds.c             | 2 ++
> > >  include/uapi/linux/input-event-codes.h | 2 ++
> > >  3 files changed, 6 insertions(+)
> > >
> > > diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> > > index 4286a51f7f16..44b8243f9924 100644
> > > --- a/drivers/hid/hid-input.c
> > > +++ b/drivers/hid/hid-input.c
> > > @@ -798,6 +798,8 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
> > >                 case 0x4b:  map_led (LED_MISC);     break;    /*   "Generic Indicator"        */
> > >                 case 0x19:  map_led (LED_MAIL);     break;    /*   "Message Waiting"          */
> > >                 case 0x4d:  map_led (LED_CHARGING); break;    /*   "External Power Connected" */
> > > +               case 0x17:  map_led (LED_OFFHOOK);  break;    /*   "Off-Hook"                 */
> > > +               case 0x18:  map_led (LED_RING);     break;    /*   "Ring"                     */
> > >
> > >                 default: goto ignore;
> > >                 }
> > > diff --git a/drivers/input/input-leds.c b/drivers/input/input-leds.c
> > > index 0b11990ade46..bc6e25b9af25 100644
> > > --- a/drivers/input/input-leds.c
> > > +++ b/drivers/input/input-leds.c
> > > @@ -33,6 +33,8 @@ static const struct {
> > >         [LED_MISC]      = { "misc" },
> > >         [LED_MAIL]      = { "mail" },
> > >         [LED_CHARGING]  = { "charging" },
> > > +       [LED_OFFHOOK]   = { "offhook" },
> > 
> > I am pretty sure this also needs to be reviewed by the led folks.
> > Adding them in Cc.
> 
> Can we please get Ack from the LED maintainers? Thanks.

I do not think we should be adding more LED bits to the input
subsystem/events; this functionality should be routed purely though LED
subsystem. input-leds is a bridge for legacy input functionality
reflecting it onto the newer LED subsystem.

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ