[PATCH] Input: cros_ec_keyb: mask out extra flags in event_type

Subsystems: input (keyboard, mouse, joystick, touchscreen) drivers, the rest

STALE2645d

7 messages, 5 authors, 2019-06-18 · open the first message on its own page

[PATCH] Input: cros_ec_keyb: mask out extra flags in event_type

From: Ting Shen <hidden>
Date: 2019-06-14 06:54:53

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 <redacted>

---

 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

Re: [PATCH] Input: cros_ec_keyb: mask out extra flags in event_type

From: Enrico Granata <hidden>
Date: 2019-06-14 18:27:23

On Thu, Jun 13, 2019 at 11:54 PM Ting Shen [off-list ref] 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 <redacted>
Reviewed-by: Enrico Granata <redacted>
quoted hunk
---

 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

Re: [PATCH] Input: cros_ec_keyb: mask out extra flags in event_type

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2019-06-14 18:55:38

On Fri, Jun 14, 2019 at 11:27:03AM -0700, Enrico Granata wrote:
On Thu, Jun 13, 2019 at 11:54 PM Ting Shen [off-list ref] wrote:
quoted
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 <redacted>
Reviewed-by: Enrico Granata <redacted>
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.

-- 
Dmitry

Re: [PATCH] Input: cros_ec_keyb: mask out extra flags in event_type

From: Benson Leung <hidden>
Date: 2019-06-14 19:10:07

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:
quoted
On Thu, Jun 13, 2019 at 11:54 PM Ting Shen [off-list ref] wrote:
quoted
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 <redacted>
Reviewed-by: Enrico Granata <redacted>
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
-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@google.com
Chromium OS Project
bleung@chromium.org

Re: [PATCH] Input: cros_ec_keyb: mask out extra flags in event_type

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2019-06-14 19:19:08

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:
quoted
On Fri, Jun 14, 2019 at 11:27:03AM -0700, Enrico Granata wrote:
quoted
On Thu, Jun 13, 2019 at 11:54 PM Ting Shen [off-list ref] wrote:
quoted
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 <redacted>
Reviewed-by: Enrico Granata <redacted>
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.

-- 
Dmitry

Re: [PATCH] Input: cros_ec_keyb: mask out extra flags in event_type

From: Benson Leung <hidden>
Date: 2019-06-14 19:32:38

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 <redacted>
Reviewed-by: Benson Leung <bleung@chromium.org>

Looks good for chrome-platform, once ib-mfd-cros-v5.3 is merged.

Thanks,
Benson

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@google.com
Chromium OS Project
bleung@chromium.org

Re: [PATCH] Input: cros_ec_keyb: mask out extra flags in event_type

From: Enric Balletbo i Serra <hidden>
Date: 2019-06-18 08:43:28


On 14/6/19 8:54, Ting Shen wrote:
quoted hunk
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 <redacted>

---

 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help