From patchwork Mon Dec 11 18:19:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jason Gerecke X-Patchwork-Id: 10105647 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2DD9E60360 for ; Mon, 11 Dec 2017 18:19:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B6DE297B0 for ; Mon, 11 Dec 2017 18:19:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F150E297EA; Mon, 11 Dec 2017 18:19:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_TVD_MIME_EPI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C59D297B0 for ; Mon, 11 Dec 2017 18:19:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752321AbdLKSTd (ORCPT ); Mon, 11 Dec 2017 13:19:33 -0500 Received: from mail-ua0-f174.google.com ([209.85.217.174]:36652 "EHLO mail-ua0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752316AbdLKSTc (ORCPT ); Mon, 11 Dec 2017 13:19:32 -0500 Received: by mail-ua0-f174.google.com with SMTP id w47so12616130uah.3 for ; Mon, 11 Dec 2017 10:19:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Et6kEAuj46MD68a8rDC0XeYCZNmqVY0MTMCITlSgtO0=; b=P8SA5tZu16fLGxqHNO+4Y9DxlbdS76EwZavcJfJ+5NJEjoE99vsLLHNd3wBZivLVGT r9fRJDGb23s9hS2bAwe3CiiHgagg1bemf0Oy5TfJF+uFbq9RLuvJle56RIzxzgamHQLH fqdx9dMIVlqVPx9K48x5E7jCIX0yNSUfjZEu4dQ3id6iQ4iCfblxh4RAlBOdWzN7rO2y E2m6p2yyuKV9SNyQSvPnh3zhGrv2Sxs7YVbPQVeK81ULw41NfJfs4VFyYcC9Ao90SFpZ 5HJjKwNvB6JrpjD8JbtBtLZrndrfC08TVhQoUxMbzImXU3x0EKPmu03o+iD4Yf1zMlvd 9hFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Et6kEAuj46MD68a8rDC0XeYCZNmqVY0MTMCITlSgtO0=; b=UN1VsC648CyXl2FSfxpLksCyXZZQOxjlsDH6A3DfjzlxFA6y1IY3E4XBKLCb1P/PV4 6nMkNf3wrRovgui3EXqag2k43Qhwf/MH3yGO2sZsSlyT0iy2nKuiHx2LVZKFf8NFFw0+ Dos+SKCMFMhLnG8fjBVTZ7+rytBmeXLPohn89pdQ7EaWx6E/saip2t24PwKQnbXk6LVF 3ltoo9xEtGHCOAbC4L57eUlvBjcEv3BPWnGcWDfuNtY95h7qagZQxkqz5y7yj2xQgjmO a3CCqc/5DbPQyOBaXy7YiP+bKXOdyDXXqHBCx+QTlLQT6f9Xw7k5YXzjrPU4ztO/Qxcj lZmA== X-Gm-Message-State: AKGB3mL/bmJmjtG9dIixMZFmIsqhqdmk/xKZUZAyKD2kN4RJzAMYCeL7 DfA+/z5aeiB4XR8Tba9oNmK9fpgNfO2XX3VmESV4Hcys X-Google-Smtp-Source: ACJfBovRimqwK99xfjguw2r9wmgCY+MeCXr2t19qexTGw1c1MfjUw6mkzHdfOEge4kUukctw1Lu2wE+ZpAAVKEast1Y= X-Received: by 10.176.4.16 with SMTP id 16mr1493633uav.161.1513016371905; Mon, 11 Dec 2017 10:19:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.2.199 with HTTP; Mon, 11 Dec 2017 10:19:30 -0800 (PST) In-Reply-To: <2c3db740-8afa-2c35-f4b8-fe38253ff6fc@scrye.com> References: <458e9d7a-2599-915c-c15e-d08b43f4998d@scrye.com> <2c3db740-8afa-2c35-f4b8-fe38253ff6fc@scrye.com> From: Jason Gerecke Date: Mon, 11 Dec 2017 10:19:30 -0800 Message-ID: Subject: Re: Lenovo Active Pen 2 and wacom tablet on yoga 920 To: Kevin Fenzi Cc: Linux Input Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Dec 8, 2017 at 2:24 PM, Kevin Fenzi wrote: > On 12/08/2017 01:24 PM, Jason Gerecke wrote: >> Sorry about the delay in getting back to you on this issue. It looks > > No problem at all. Thanks for looking into it! > >> like there are several different reasons that we could be getting >> EREMOTEIO from the lower levels. Would you mind running the sysinfo.sh >> script described at [1] and filing a bug to the project with the >> output attached? > > Done: > https://github.com/linuxwacom/wacom-hid-descriptors/issues/9 > >> This should give me an idea of what kind of hardware >> is present in your 920. You might also try doing the following to see >> if anything interesting gets printed to the dmesg log: >> >> # echo "file drivers/i2c/*.c +p" > /sys/kernel/debug/dynamic_debug/control >> # modprobe -r wacom >> # modprobe wacom > > Seems to say: > > # echo "file drivers/i2c/*.c +p" > /sys/kernel/debug/dynamic_debug/control > -bash: /sys/kernel/debug/dynamic_debug/control: Operation not permitted > >> >> Some of the I2C modules (which I suspect your sensor is using) log >> debug messages prior to returning EREMOTEIO. The above will cause >> these debug messages to be printed to dmesg and then reload the wacom >> module. With luck, we might gain a little more information about >> what's triggering the error. > > Sadly not... but I will poke and it and see if I can figure out why it's > not working. > > kevin > Thanks for the sysinfo output :) It looks like your system has the sensor connected through a designware I2C controller. The only place I see EREMOTEIO used within the designware driver is to signal that it got a NAK at some point during the transfer. It is supposed to print out additional details using dev_dbg, but that won't be useful until the "Operation not permitted" error is overcome. Some NAK conditions are transient, so its possible that our driver just needs to retry the command. Please read the page at [1] for instructions to compile out out-of-tree version of the wacom driver. In place of the "Download" instructions on that page, use the "Development" instructions. Once you're set, apply the attached patch by running `git am /path/to/file.patch` from within the input-wacom directory. Compile the driver and then load it in place of the system driver by running `sudo modprobe -r wacom && sudo insmod 4.5/wacom.ko`. Check to see if there's any interesting dmesg output and if the pen works. [1]: http://linuxwacom.sourceforge.net/wiki/index.php/Input-wacom Jason --- Now instead of four in the eights place / you’ve got three, ‘Cause you added one / (That is to say, eight) to the two, / But you can’t take seven from three, / So you look at the sixty-fours.... From 1f846c7d78034b1946080cc9ffb6672f5cfe638c Mon Sep 17 00:00:00 2001 From: Jason Gerecke Date: Mon, 11 Dec 2017 10:16:11 -0800 Subject: [PATCH input-wacom] TEST: Always retry in get/set report --- 4.5/wacom_sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/4.5/wacom_sys.c b/4.5/wacom_sys.c index 39aaab0..036b5bb 100644 --- a/4.5/wacom_sys.c +++ b/4.5/wacom_sys.c @@ -52,7 +52,7 @@ static int wacom_get_report(struct hid_device *hdev, u8 type, u8 *buf, do { retval = hid_hw_raw_request(hdev, buf[0], buf, size, type, HID_REQ_GET_REPORT); - } while ((retval == -ETIMEDOUT || retval == -EAGAIN) && --retries); + } while (--retries); if (retval < 0) hid_err(hdev, "wacom_get_report: ran out of retries " @@ -69,7 +69,7 @@ static int wacom_set_report(struct hid_device *hdev, u8 type, u8 *buf, do { retval = hid_hw_raw_request(hdev, buf[0], buf, size, type, HID_REQ_SET_REPORT); - } while ((retval == -ETIMEDOUT || retval == -EAGAIN) && --retries); + } while (--retries); if (retval < 0) hid_err(hdev, "wacom_set_report: ran out of retries " -- 2.15.1