From patchwork Mon Jan 18 16:49:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastien Nocera X-Patchwork-Id: 73675 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0IGo9Ct013591 for ; Mon, 18 Jan 2010 16:50:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751356Ab0ARQuI (ORCPT ); Mon, 18 Jan 2010 11:50:08 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751734Ab0ARQuH (ORCPT ); Mon, 18 Jan 2010 11:50:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:4967 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751356Ab0ARQuG (ORCPT ); Mon, 18 Jan 2010 11:50:06 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0IGo2Zq000602 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Jan 2010 11:50:03 -0500 Received: from [10.36.8.89] (vpn2-8-89.ams2.redhat.com [10.36.8.89]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0IGnx53000784; Mon, 18 Jan 2010 11:50:01 -0500 Subject: [PATCHes] Implement Bluetooth Wacom tablet's mode change in the kernel From: Bastien Nocera To: Dmitry Torokhov , linux-input , BlueZ development Cc: bgunn@solekai.com, Ping Date: Mon, 18 Jan 2010 16:49:59 +0000 Message-ID: <1263833399.20565.2905.camel@localhost.localdomain> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From 6f83c0d084631033db9cb9b9452f5cf2e2bf67c2 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 18 Jan 2010 16:13:41 +0000 Subject: [PATCH 2/2] [hid] Implement Wacom quirk in the kernel The hid-wacom driver required user-space to poke at the tablet to make it send data about the cursor location. This patch makes it do the same thing but in the kernel. Signed-off-by: Bastien Nocera --- drivers/hid/hid-wacom.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c index 7475421..4030824 100644 --- a/drivers/hid/hid-wacom.c +++ b/drivers/hid/hid-wacom.c @@ -155,6 +155,7 @@ static int wacom_probe(struct hid_device *hdev, struct hid_input *hidinput; struct input_dev *input; struct wacom_data *wdata; + char rep_data[3]; int ret; wdata = kzalloc(sizeof(*wdata), GFP_KERNEL); @@ -177,6 +178,18 @@ static int wacom_probe(struct hid_device *hdev, goto err_free; } + rep_data[0] = 0x53; /* HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE */ + rep_data[1] = 0x03; rep_data[2] = 0x00; + ret = hdev->hid_output_raw_report (hdev, rep_data, 3); + if (ret < 0) + dev_err(&hdev->dev, "failed to poke device #1, %d\n", ret); + + rep_data[0] = 0x71; /* HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE */ + /* 0x06 - high reporting speed, 0x05 - low speed */ + rep_data[1] = 0x06; rep_data[2] = 0x00; + ret = hdev->hid_output_raw_report (hdev, rep_data, 3); + dev_err(&hdev->dev, "failed to poke device #2, %d\n", ret); + hidinput = list_entry(hdev->inputs.next, struct hid_input, list); input = hidinput->input; -- 1.6.5.2