Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp5958417ybx; Mon, 11 Nov 2019 01:21:14 -0800 (PST) X-Google-Smtp-Source: APXvYqx8rjxXBae9FkTi6s33VOsbnEWbl9GSQTfYJ09+eRUcG9XSeFqGL0Si92+9x691jxGy04HR X-Received: by 2002:a17:906:1354:: with SMTP id x20mr22162601ejb.131.1573464074587; Mon, 11 Nov 2019 01:21:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573464074; cv=none; d=google.com; s=arc-20160816; b=tJ5ir/7rH1JiFpI+GlB06j3T9nEzVSjc3A12pqNnKvgaVPGwGZ2e9XwLZC+0j2Vixh uOOh/pWHjBi1El9z4+HvSj6hKvLx/n1LT9EgkK4a/PpX4ftNNJ8Gct7v8DG99Ncs/Zl5 iZkRyYZQAUmhqYQRZMlZI4Nw9XidKuX6LP3qe1cmhFMlfypEkNuKzAIiMvGlVFsYHQQa krtqf88MUQULYs3gl7eew8HnT12435hOxYLmL+Sx8eHpltb8sBSPPjf/fu7pG7JUFK6E 64T7isBfDgW10aWT1wmXYkpOZKGVJjta1YQabpgJba5Q97zpsn/u3/hFlw5+WuUsspIY LvEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=V+PWYo9Ircdrd7QCz3pVYb+pm+h+yJc9iuogOvEH45s=; b=MMmmX3sMH23iju2qqNBkVfdwjGZ5wVDj1G3WDb3hnQRo3x+iMAUJ/vjOejBJMPtU1N PE11PCs92E7mxrYLwkYxidRpLDa+GglvULBxfYb+nzjgxZzsXkC50gnn+ynefR8+kOL7 h2idik8azpEyNAa+jZJbLKNgOY0YP7TOuTCDY4aA6E5mtwn88wpR7JT8O6IgJvHbp+0T KEr66YjUPDRigbsk7A26Q9XW6a264CtcYu3q1uALD9ojVwOj06VUoBjXrjdBayQpp3T0 l8POw6hGOKk89LJ6yIeGqmdA0QzJOlnadkksiEu0rlblN4DX5PwFwkk4/pBybXfIzDNY Gxaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k10si9476334edx.350.2019.11.11.01.20.51; Mon, 11 Nov 2019 01:21:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726903AbfKKJUL (ORCPT + 99 others); Mon, 11 Nov 2019 04:20:11 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:60374 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726808AbfKKJUK (ORCPT ); Mon, 11 Nov 2019 04:20:10 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 0656328EB4A Subject: Re: [PATCH v4 07/17] Revert "Input: cros_ec_keyb - add back missing mask for event_type" To: Gwendal Grignou , briannorris@chromium.org, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, lee.jones@linaro.org, bleung@chromium.org, dianders@chromium.org, groeck@chromium.org, fabien.lahoudere@collabora.com Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-input@vger.kernel.org, Dmitry Torokhov References: <20191105222652.70226-1-gwendal@chromium.org> <20191105222652.70226-8-gwendal@chromium.org> From: Enric Balletbo i Serra Message-ID: <30edd741-310a-9c94-78ed-74dec084f382@collabora.com> Date: Mon, 11 Nov 2019 10:20:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191105222652.70226-8-gwendal@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, cc'in Dmitry and linux-input list which is missing On 5/11/19 23:26, Gwendal Grignou wrote: > This reverts commit 62c3801619e16b68a37ea899b76572145dfe41c9. > > This patch is not needed anymore since we clear EC_MKBP_HAS_MORE_EVENTS > flag before calling the notifiers in patch > "9d9518f5b52a (platform: chrome: cros_ec: handle MKBP more events flag)" > > Signed-off-by: Gwendal Grignou > --- > No changes in v4, v3. > New to v2. > > drivers/input/keyboard/cros_ec_keyb.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c > index 8d4d9786cc74..a29e81fdf186 100644 > --- a/drivers/input/keyboard/cros_ec_keyb.c > +++ b/drivers/input/keyboard/cros_ec_keyb.c > @@ -226,8 +226,6 @@ static int cros_ec_keyb_work(struct notifier_block *nb, > { > struct cros_ec_keyb *ckdev = container_of(nb, struct cros_ec_keyb, > notifier); > - uint8_t mkbp_event_type = ckdev->ec->event_data.event_type & > - EC_MKBP_EVENT_TYPE_MASK; > u32 val; > unsigned int ev_type; > > @@ -239,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 (mkbp_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); > > @@ -266,7 +264,7 @@ static int cros_ec_keyb_work(struct notifier_block *nb, > case EC_MKBP_EVENT_SWITCH: > pm_wakeup_event(ckdev->dev, 0); > > - if (mkbp_event_type == EC_MKBP_EVENT_BUTTON) { > + if (ckdev->ec->event_data.event_type == EC_MKBP_EVENT_BUTTON) { > val = get_unaligned_le32( > &ckdev->ec->event_data.data.buttons); > ev_type = EV_KEY; >