From patchwork Sun Nov 4 08:38:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Achatz X-Patchwork-Id: 1693491 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0E6B93FCDF for ; Sun, 4 Nov 2012 08:39:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751120Ab2KDIjE (ORCPT ); Sun, 4 Nov 2012 03:39:04 -0500 Received: from mail-in-05.arcor-online.net ([151.189.21.45]:59696 "EHLO mail-in-05.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751065Ab2KDIjA (ORCPT ); Sun, 4 Nov 2012 03:39:00 -0500 Received: from mail-in-05-z2.arcor-online.net (mail-in-05-z2.arcor-online.net [151.189.8.17]) by mx.arcor.de (Postfix) with ESMTP id 67B5CE3C5C; Sun, 4 Nov 2012 09:38:59 +0100 (CET) Received: from mail-in-16.arcor-online.net (mail-in-16.arcor-online.net [151.189.21.56]) by mail-in-05-z2.arcor-online.net (Postfix) with ESMTP id 628E86F29B8; Sun, 4 Nov 2012 09:38:59 +0100 (CET) Received: from [192.168.0.7] (dslb-094-218-206-010.pools.arcor-ip.net [94.218.206.10]) (Authenticated sender: screamingfist@arcor.de) by mail-in-16.arcor-online.net (Postfix) with ESMTPSA id 2FF588576; Sun, 4 Nov 2012 09:38:59 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-16.arcor-online.net 2FF588576 Subject: [PATCH 2/4] HID: roccat: Enabling Savu device reset From: Stefan Achatz Reply-To: erazor_de@users.sourceforge.net To: Rob Landley , Jiri Kosina , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-input@vger.kernel.org Date: Sun, 04 Nov 2012 09:38:58 +0100 Message-ID: <1352018338.2673.132.camel@neuromancer.tessier-ashpool> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 (2.30.3-1.fc13) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Device can be reset to factory state by sending a command via info sysfs attr. Changed from ro to rw to enable this feature. Signed-off-by: Stefan Achatz --- .../ABI/testing/sysfs-driver-hid-roccat-savu | 3 +-- drivers/hid/hid-roccat-savu.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu b/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu index b42922c..f1e02a9 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu +++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu @@ -40,8 +40,8 @@ What: /sys/bus/usb/devices/-:./ Description: When read, this file returns general data like firmware version. + When written, the device can be reset. The data is 8 bytes long. - This file is readonly. Users: http://roccat.sourceforge.net What: /sys/bus/usb/devices/-:./::./savu/roccatsavu/macro @@ -74,4 +74,3 @@ Description: The mouse has a Avago ADNS-3090 sensor. This file allows reading and writing of the mouse sensors registers. The data has to be 4 bytes long. Users: http://roccat.sourceforge.net - diff --git a/drivers/hid/hid-roccat-savu.c b/drivers/hid/hid-roccat-savu.c index 014afba..31747a2 100644 --- a/drivers/hid/hid-roccat-savu.c +++ b/drivers/hid/hid-roccat-savu.c @@ -120,7 +120,7 @@ SAVU_SYSFS_RW(profile, PROFILE) SAVU_SYSFS_RW(general, GENERAL) SAVU_SYSFS_RW(buttons, BUTTONS) SAVU_SYSFS_RW(macro, MACRO) -SAVU_SYSFS_R(info, INFO) +SAVU_SYSFS_RW(info, INFO) SAVU_SYSFS_RW(sensor, SENSOR) static struct bin_attribute savu_bin_attributes[] = { @@ -129,7 +129,7 @@ static struct bin_attribute savu_bin_attributes[] = { SAVU_BIN_ATTRIBUTE_RW(general, GENERAL), SAVU_BIN_ATTRIBUTE_RW(buttons, BUTTONS), SAVU_BIN_ATTRIBUTE_RW(macro, MACRO), - SAVU_BIN_ATTRIBUTE_R(info, INFO), + SAVU_BIN_ATTRIBUTE_RW(info, INFO), SAVU_BIN_ATTRIBUTE_RW(sensor, SENSOR), __ATTR_NULL };