From patchwork Fri Feb 25 05:15:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafi Rubin X-Patchwork-Id: 588971 X-Patchwork-Delegate: jikos@jikos.cz Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1P5MUVI028996 for ; Fri, 25 Feb 2011 05:22:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750879Ab1BYFWg (ORCPT ); Fri, 25 Feb 2011 00:22:36 -0500 Received: from fox.seas.upenn.edu ([158.130.68.12]:60081 "EHLO fox.seas.upenn.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750768Ab1BYFWg (ORCPT ); Fri, 25 Feb 2011 00:22:36 -0500 Received: from hex.seas.upenn.edu (hex.seas.upenn.edu [158.130.62.166]) (authenticated bits=0) by fox.seas.upenn.edu (8.14.3/8.14.3) with ESMTP id p1P5FYJ9015107 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 25 Feb 2011 00:15:38 -0500 From: Rafi Rubin To: jkosina@suse.cz, linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org, micki@n-trig.com, rydberg@euromail.se, chatty@enac.fr, trivial@kernel.org, peter.hutterer@who-t.net, Rafi Rubin Subject: [PATCH 2/2] HID: ntrig mapping more firmware id bits Date: Fri, 25 Feb 2011 00:15:32 -0500 Message-Id: <1298610932-21957-2-git-send-email-rafi@seas.upenn.edu> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1298610932-21957-1-git-send-email-rafi@seas.upenn.edu> References: <1298610932-21957-1-git-send-email-rafi@seas.upenn.edu> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15, 1.0.148, 0.0.0000 definitions=2011-02-25_02:2011-02-25, 2011-02-25, 1970-01-01 signatures=0 X-Proofpoint-Spam-Reason: safe Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 25 Feb 2011 05:22:37 +0000 (UTC) diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c index 616f091..3ce4624 100644 --- a/drivers/hid/hid-ntrig.c +++ b/drivers/hid/hid-ntrig.c @@ -96,15 +96,15 @@ struct ntrig_data { */ static int ntrig_version_string(unsigned char *raw, char *buf) { - __u8 a = (raw[1] & 0x0e) >> 1; + __u8 a = (raw[1] & 0x1e) >> 1; __u8 b = (raw[0] & 0x3c) >> 2; __u8 c = ((raw[0] & 0x03) << 3) | ((raw[3] & 0xe0) >> 5); __u8 d = ((raw[3] & 0x07) << 3) | ((raw[2] & 0xe0) >> 5); - __u8 e = raw[2] & 0x07; + __u8 e = raw[2] & 0x1f; /* * As yet unmapped bits: - * 0b11000000 0b11110001 0b00011000 0b00011000 + * 0b11000000 0b11100001 0b00000000 0b00011000 */ return sprintf(buf, "%u.%u.%u.%u.%u", a, b, c, d, e);