Message ID | 20190614065438.142867-1-phoenixshen@chromium.org (mailing list archive) |
---|---|
State | Mainlined |
Commit | d096aa3eb6045a6a475a0239f3471c59eedf3d61 |
Headers | show |
Series | Input: cros_ec_keyb: mask out extra flags in event_type | expand |
On Thu, Jun 13, 2019 at 11:54 PM Ting Shen <phoenixshen@chromium.org> wrote: > > http://crosreview.com/1341159 added a EC_MKBP_HAS_MORE_EVENTS flag to > the event_type field, the receiver side should mask out this extra bit when > processing the event. > > Signed-off-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Enrico Granata <egranata@google.com> > > --- > > drivers/input/keyboard/cros_ec_keyb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c > index d5600118159835..38cb6d82d8fe67 100644 > --- a/drivers/input/keyboard/cros_ec_keyb.c > +++ b/drivers/input/keyboard/cros_ec_keyb.c > @@ -237,7 +237,7 @@ static int cros_ec_keyb_work(struct notifier_block *nb, > if (queued_during_suspend && !device_may_wakeup(ckdev->dev)) > return NOTIFY_OK; > > - switch (ckdev->ec->event_data.event_type) { > + switch (ckdev->ec->event_data.event_type & EC_MKBP_EVENT_TYPE_MASK) { > case EC_MKBP_EVENT_KEY_MATRIX: > pm_wakeup_event(ckdev->dev, 0); > > -- > 2.22.0.rc2.383.gf4fbbf30c2-goog >
On Fri, Jun 14, 2019 at 11:27:03AM -0700, Enrico Granata wrote: > On Thu, Jun 13, 2019 at 11:54 PM Ting Shen <phoenixshen@chromium.org> wrote: > > > > http://crosreview.com/1341159 added a EC_MKBP_HAS_MORE_EVENTS flag to > > the event_type field, the receiver side should mask out this extra bit when > > processing the event. > > > > Signed-off-by: Ting Shen <phoenixshen@chromium.org> > > Reviewed-by: Enrico Granata <egranata@google.com> EC_MKBP_EVENT_TYPE_MASK is not in Linus' tree. It would be better to merge this path through whatever tree that is bringing in that definition. Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Thanks.
Hi Dmitry, On Fri, Jun 14, 2019 at 11:55:33AM -0700, Dmitry Torokhov wrote: > On Fri, Jun 14, 2019 at 11:27:03AM -0700, Enrico Granata wrote: > > On Thu, Jun 13, 2019 at 11:54 PM Ting Shen <phoenixshen@chromium.org> wrote: > > > > > > http://crosreview.com/1341159 added a EC_MKBP_HAS_MORE_EVENTS flag to > > > the event_type field, the receiver side should mask out this extra bit when > > > processing the event. > > > > > > Signed-off-by: Ting Shen <phoenixshen@chromium.org> > > > > Reviewed-by: Enrico Granata <egranata@google.com> > > EC_MKBP_EVENT_TYPE_MASK is not in Linus' tree. It would be better to > merge this path through whatever tree that is bringing in that > definition. > > Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Yup, this looks like it's coming in through Lee's MFD tree, a series from Gwendal to update cros_ec_commands.h. 784dd15c930f mfd: cros_ec: Fix event processing API That commit is in the immutable branch for v5.3 here: git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-cros-v5.3 I'd recommend the chrome-platform tree since we'll be pulling in that IB too for some other refactoring Enric is working on. Thanks, Benson > > Thanks. > > -- > Dmitry
On Fri, Jun 14, 2019 at 12:09:57PM -0700, Benson Leung wrote: > Hi Dmitry, > > On Fri, Jun 14, 2019 at 11:55:33AM -0700, Dmitry Torokhov wrote: > > On Fri, Jun 14, 2019 at 11:27:03AM -0700, Enrico Granata wrote: > > > On Thu, Jun 13, 2019 at 11:54 PM Ting Shen <phoenixshen@chromium.org> wrote: > > > > > > > > http://crosreview.com/1341159 added a EC_MKBP_HAS_MORE_EVENTS flag to > > > > the event_type field, the receiver side should mask out this extra bit when > > > > processing the event. > > > > > > > > Signed-off-by: Ting Shen <phoenixshen@chromium.org> > > > > > > Reviewed-by: Enrico Granata <egranata@google.com> > > > > EC_MKBP_EVENT_TYPE_MASK is not in Linus' tree. It would be better to > > merge this path through whatever tree that is bringing in that > > definition. > > > > Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> > > Yup, this looks like it's coming in through Lee's MFD tree, a series from > Gwendal to update cros_ec_commands.h. > > 784dd15c930f mfd: cros_ec: Fix event processing API > > That commit is in the immutable branch for v5.3 here: > git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-cros-v5.3 > > I'd recommend the chrome-platform tree since we'll be pulling in that IB too > for some other refactoring Enric is working on. Yeah, I'm fine with this going through chrome-platform. Thanks.
Hi Ting, On Fri, Jun 14, 2019 at 02:54:38PM +0800, Ting Shen wrote: > http://crosreview.com/1341159 added a EC_MKBP_HAS_MORE_EVENTS flag to > the event_type field, the receiver side should mask out this extra bit when > processing the event. > > Signed-off-by: Ting Shen <phoenixshen@chromium.org> > Reviewed-by: Benson Leung <bleung@chromium.org> Looks good for chrome-platform, once ib-mfd-cros-v5.3 is merged. Thanks, Benson
On 14/6/19 8:54, Ting Shen wrote: > http://crosreview.com/1341159 added a EC_MKBP_HAS_MORE_EVENTS flag to > the event_type field, the receiver side should mask out this extra bit when > processing the event. > > Signed-off-by: Ting Shen <phoenixshen@chromium.org> > > --- > > drivers/input/keyboard/cros_ec_keyb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c > index d5600118159835..38cb6d82d8fe67 100644 > --- a/drivers/input/keyboard/cros_ec_keyb.c > +++ b/drivers/input/keyboard/cros_ec_keyb.c > @@ -237,7 +237,7 @@ static int cros_ec_keyb_work(struct notifier_block *nb, > if (queued_during_suspend && !device_may_wakeup(ckdev->dev)) > return NOTIFY_OK; > > - switch (ckdev->ec->event_data.event_type) { > + switch (ckdev->ec->event_data.event_type & EC_MKBP_EVENT_TYPE_MASK) { > case EC_MKBP_EVENT_KEY_MATRIX: > pm_wakeup_event(ckdev->dev, 0); > > Applied for chrome-platform-5.3 Thanks, ~ Enric
diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c index d5600118159835..38cb6d82d8fe67 100644 --- a/drivers/input/keyboard/cros_ec_keyb.c +++ b/drivers/input/keyboard/cros_ec_keyb.c @@ -237,7 +237,7 @@ static int cros_ec_keyb_work(struct notifier_block *nb, if (queued_during_suspend && !device_may_wakeup(ckdev->dev)) return NOTIFY_OK; - switch (ckdev->ec->event_data.event_type) { + switch (ckdev->ec->event_data.event_type & EC_MKBP_EVENT_TYPE_MASK) { case EC_MKBP_EVENT_KEY_MATRIX: pm_wakeup_event(ckdev->dev, 0);
http://crosreview.com/1341159 added a EC_MKBP_HAS_MORE_EVENTS flag to the event_type field, the receiver side should mask out this extra bit when processing the event. Signed-off-by: Ting Shen <phoenixshen@chromium.org> --- drivers/input/keyboard/cros_ec_keyb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)