From patchwork Tue Jul 31 17:27:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UHJ6ZW15c8OF4oCaYXcgRmlyc3p0?= X-Patchwork-Id: 1261551 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id BAF75DF26F for ; Tue, 31 Jul 2012 18:24:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755942Ab2GaSYD (ORCPT ); Tue, 31 Jul 2012 14:24:03 -0400 Received: from 50.97.138.99-static.reverse.softlayer.com ([50.97.138.99]:41134 "EHLO wren.arvixe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753623Ab2GaSYB (ORCPT ); Tue, 31 Jul 2012 14:24:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=firszt.eu; s=default; h=Message-Id:Date:Subject:Cc:To:From; bh=Xo4dEeE3fIa55AxcVNbfJF4d/sucw1H7dES7nro/i8o=; b=3r3FFyblPdCXUbzslm8YuP17+HEH9V08t/UBOHNBPEqo5voAk66GOuiECl6QmGTg5Q3dpJpEz1CL8o0TTsPIIkG35ZKxSp2X4RXvjU46oMv3DgL6cclb0amt4yqFbwyg; Received: from [79.97.114.76] (port=36103 helo=localhost.localdomain) by wren.arvixe.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77) (envelope-from ) id 1SwGFs-001W0f-Nv; Tue, 31 Jul 2012 12:29:13 -0500 From: Przemo Firszt To: pinglinux@gmail.com, jkosina@suse.cz, linux-doc@vger.kernel.org, linuxwacom-devel@lists.sourceforge.net, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Przemo Firszt Subject: [PATCH 1/2] HID: wacom: Use half of brightness for low state Date: Tue, 31 Jul 2012 18:27:55 +0100 Message-Id: <1343755676-2999-1-git-send-email-przemo@firszt.eu> X-Mailer: git-send-email 1.7.11.1 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - wren.arvixe.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - firszt.eu X-Source: X-Source-Args: X-Source-Dir: Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Intuos4 WL leds have 2 states: high and low. With no activity tablet uses low state; using pen triggers high state. Both can be set independently, but it would require setting another led device to control them separately. This patch uses the brightness set through leds subsytem as high and half of that value as low. Signed-off-by: Przemo Firszt Acked-by: Ping Cheng for the whole set. --- drivers/hid/hid-wacom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c index fe23a1e..848842e 100644 --- a/drivers/hid/hid-wacom.c +++ b/drivers/hid/hid-wacom.c @@ -91,7 +91,8 @@ static void wacom_leds_set_brightness(struct led_classdev *led_dev, if (buf) { buf[0] = WAC_CMD_LED_CONTROL; buf[1] = led; - buf[2] = value; + buf[2] = value >> 2; + buf[3] = value; hdev->hid_output_raw_report(hdev, buf, 9, HID_FEATURE_REPORT); kfree(buf); }