[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE-0n51TAtifbbruKhCJ_u5xH1j0zKjWOehGQFFdCez=RubxVA@mail.gmail.com>
Date: Fri, 14 Jan 2022 14:55:49 -0600
From: Stephen Boyd <swboyd@...omium.org>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Jiri Kosina <jikos@...nel.org>,
Zhengqiao Xia <xiazhengqiao@...qin.corp-partner.google.com>,
benjamin.tissoires@...hat.com, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org, dianders@...omium.org,
Wei-Ning Huang <wnhuang@...gle.com>,
Nicolas Boichat <drinkcat@...omium.org>,
"Sean O'Brien" <seobrien@...omium.org>, phoenixshen@...omium.org
Subject: Re: [PATCH v2] HID: google: modify HID device groups of eel
Quoting Dmitry Torokhov (2022-01-14 11:59:50)
> On Fri, Jan 14, 2022 at 01:25:12PM -0600, Stephen Boyd wrote:
> >
> > My understanding is that 'vivaldi' is mostly a keyboard layout and
> > 'hammer' is a detachable keyboard. We want to prevent the hid-vivaldi
> > driver from probing this particular device because the hid-vivaldi
> > driver doesn't know about detachable keyboards. Hammer devices also
> > support 360 degree wraparound so we know that the keyboard has been put
> > behind the screen or that it's being used to stand up the device on a
> > table.
> >
> > Given all that, I'm still confused. If we make the hid-google-hammer
> > driver probe this device and the keyboard layout is vivaldi then we'd
> > want the part of the vivaldi driver that exposes the
> > function_row_physmap through sysfs. Otherwise userspace won't know how
> > to handle the function row properly. I think we need the device to stack
> > two drivers here. Does that happen with HID?
>
> As far as I know HID does not easily allow "stacking" drivers like that.
Ok.
>
> Probably the easiest way would be to export vivaldi_feature_mapping()
> and the show method for the physical row map and call them from the
> hammer driver.
>
I worry about builtin vs. modular drivers so probably ought to make some
hid-vivaldi-common.c file that has the physmap code and then have both
drivers call that mini-library. The 'vivaldi_data' structure would need
to be figured out too. The hammer driver stores 'hammer_kbd_leds' in the
hid_get_drvdata() whereas the vivaldi driver stores 'vivalid_data' so we
can't simply call the show method for the sysfs attribute without some
minor surgery.
Powered by blists - more mailing lists