From patchwork Fri Oct 9 09:01:20 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyungmin Park X-Patchwork-Id: 52686 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9997GBa015426 for ; Fri, 9 Oct 2009 09:07:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760430AbZJIJCI (ORCPT ); Fri, 9 Oct 2009 05:02:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760426AbZJIJCI (ORCPT ); Fri, 9 Oct 2009 05:02:08 -0400 Received: from mailout5.samsung.com ([203.254.224.35]:55108 "EHLO mailout5.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760423AbZJIJCH (ORCPT ); Fri, 9 Oct 2009 05:02:07 -0400 Received: from epmmp1 (mailout5.samsung.com [203.254.224.35]) by mailout1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0KR800FSOP2HDI@mailout1.samsung.com>; Fri, 09 Oct 2009 18:01:29 +0900 (KST) Received: from TNRNDGASPAPP1.tn.corp.samsungelectronics.net ([165.213.149.150]) by mmp1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0KR800IWZP2HFB@mmp1.samsung.com>; Fri, 09 Oct 2009 18:01:29 +0900 (KST) Received: from july ([10.89.7.111]) by TNRNDGASPAPP1.tn.corp.samsungelectronics.net with Microsoft SMTPSVC(6.0.3790.3959); Fri, 09 Oct 2009 18:01:28 +0900 Received: by july (sSMTP sendmail emulation); Fri, 09 Oct 2009 18:01:20 +0900 Date: Fri, 09 Oct 2009 18:01:20 +0900 From: Kyungmin Park Subject: [PATCH 2/6] Haptic: Documentation for haptic class (v2) To: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Cc: soni.trilok@gmail.com Message-id: <20091009090120.GA24935@july> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: Mutt/1.5.14 (2007-02-12) X-OriginalArrivalTime: 09 Oct 2009 09:01:28.0294 (UTC) FILETIME=[16434060:01CA48BF] Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org diff --git a/Documentation/haptic-class.txt b/Documentation/haptic-class.txt new file mode 100644 index 0000000..6bee82a --- /dev/null +++ b/Documentation/haptic-class.txt @@ -0,0 +1,20 @@ + +Haptic handling under Linux +======================== + +In its simplest form, the haptic class just allows control of Haptics from +userspace. Haptic appears in /sys/class/haptic/. The maximum level of the +haptic is defined in max_level file. + +The interface is pretty simple - it provides oneshot mode where user +can specify duration of the effect (in milliseconds) and desired level +Of course, you can adjust the level by setting level property + +# echo ${millisecond} > /sys/class/haptic//oneshot + +# echo ${level} > /sys/class/haptic//level + +You can also enable or disable haptics devices by manipulating 'enable' attribute: + +# echo 1 > /sys/class/haptic//enable -> Enable +# echo 0 > /sys/class/haptic//enable -> Disable