From patchwork Mon Sep 19 07:41:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 9338725 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 3EEA06077A for ; Mon, 19 Sep 2016 07:41:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32E5F28E46 for ; Mon, 19 Sep 2016 07:41:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27BE028E9D; Mon, 19 Sep 2016 07:41:57 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 7D03B28E46 for ; Mon, 19 Sep 2016 07:41:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753252AbcISHlx (ORCPT ); Mon, 19 Sep 2016 03:41:53 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:38658 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936521AbcISHlu (ORCPT ); Mon, 19 Sep 2016 03:41:50 -0400 Received: from [175.41.48.77] (helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1bltD0-0001hZ-CS; Mon, 19 Sep 2016 07:41:47 +0000 From: Kai-Heng Feng To: jikos@kernel.org Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, masaki.ota@jp.alps.com, kai.heng.feng@canonical.com Subject: [PATCH] HID: alps: fix stick device not working after resume Date: Mon, 19 Sep 2016 15:41:39 +0800 Message-Id: <20160919074139.2551-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.9.3 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 The stick device does not work after resume, add U1_SP_ABS_MODE flag can make the device work after resume. Signed-off-by: Kai-Heng Feng --- drivers/hid/hid-alps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid-alps.c b/drivers/hid/hid-alps.c index 048befd..390f8d3 100644 --- a/drivers/hid/hid-alps.c +++ b/drivers/hid/hid-alps.c @@ -244,13 +244,13 @@ static int alps_raw_event(struct hid_device *hdev, static int alps_post_reset(struct hid_device *hdev) { return u1_read_write_register(hdev, ADDRESS_U1_DEV_CTRL_1, - NULL, U1_TP_ABS_MODE, false); + NULL, U1_TP_ABS_MODE | U1_SP_ABS_MODE, false); } static int alps_post_resume(struct hid_device *hdev) { return u1_read_write_register(hdev, ADDRESS_U1_DEV_CTRL_1, - NULL, U1_TP_ABS_MODE, false); + NULL, U1_TP_ABS_MODE | U1_SP_ABS_MODE, false); } #endif /* CONFIG_PM */