diff options
author | Marcin Mielczarczyk <marcin.mielczarczyk@tieto.com> | 2010-06-18 10:04:45 +0200 |
---|---|---|
committer | srinidhi kasagar <srinidhi.kasagar@stericsson.com> | 2010-10-27 15:53:26 +0530 |
commit | f81a492d98d727a8d0d9ee437adf2c7b776a9ba0 (patch) | |
tree | a10e51eed9abf78f63908e014bedd8c22dc7e6b9 /Documentation | |
parent | 8ad6a42c427e9ee7040b702a09b245dfa5753a50 (diff) |
Vibrator: Timed output vibrator driver
ST-Ericsson vibrator driver which registers in Android specific
timed output device class.
ST-Ericsson ID: WP261766
This workpackage is dependent on delivery of WP259003 and WP259004.
Signed-off-by: Marcin Mielczarczyk <marcin.mielczarczyk@tieto.com>
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@tieto.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/1737
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Tested-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Change-Id: Ie432f0ea61014c918d1e8c91f399620ee7a9a5f3
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/2673
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/DocBook/Makefile | 2 | ||||
-rw-r--r-- | Documentation/DocBook/ste_timed_vibra.tmpl | 252 |
2 files changed, 253 insertions, 1 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 0711a9874fe..25f19a4240e 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile @@ -16,7 +16,7 @@ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \ alsa-driver-api.xml writing-an-alsa-driver.xml \ tracepoint.xml media.xml drm.xml \ u8500_usb.xml \ - ske_keypad.xml ste_ff_vibra.xml \ + ske_keypad.xml ste_ff_vibra.xml ste_timed_vibra.xml \ dma.xml gpio.xml i2s.xml i2c.xml mmc.xml \ prcmu-fw-api.xml msp.xml \ touchp.xml tc_keypad.xml stmpe.xml shrm.xml diff --git a/Documentation/DocBook/ste_timed_vibra.tmpl b/Documentation/DocBook/ste_timed_vibra.tmpl new file mode 100644 index 00000000000..969713286d5 --- /dev/null +++ b/Documentation/DocBook/ste_timed_vibra.tmpl @@ -0,0 +1,252 @@ +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> + +<book id="STE-Timed-Output-Vibrator-API-Guide"> + <bookinfo> + <title>Timed Output Vibrator Driver</title> + + <authorgroup> + <author> + <firstname>Marcin</firstname> + <surname>Mielczarczyk</surname> + <affiliation> + <address> + <email>marcin.mielczarczyk@tieto.com</email> + </address> + </affiliation> + </author> + </authorgroup> + + <copyright> + <year>2010</year> + <holder>ST-Ericsson</holder> + </copyright> + + <subjectset> + <subject> + <subjectterm>Linux standard functions</subjectterm> + </subject> + </subjectset> + + <legalnotice> + + <para> + This documentation is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later + version. + </para> + + <para> + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + </para> + + <para> + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + </para> + + <para> + For more details see the file COPYING in the source + distribution of Linux. + </para> + </legalnotice> + </bookinfo> + + <toc></toc> + + <chapter id="intro"> + <title>Introduction</title> + <para> + This documentation describes the implementation of ST-Ericsson's + Timed Output Vibrator driver for the ST-Ericsson Linux platforms. + </para> + </chapter> + + <chapter id="gettingstarted"> + <title>Getting Started</title> + <para> + There are no special compilation flags needed to build the + Timed Output Vibrator driver. + </para> + + <section id="basic-tutorial"> + <title>Basic Tutorial</title> + <para> + To enable the Timed Output Vibrator driver using Kconfig, go to + <constant> Device Drivers -> Staging -> Android </constant> + and enable the following: + <itemizedlist> + <listitem><para>ST-Ericsson Timed Output Vibrator driver</para></listitem> + </itemizedlist> + </para> + </section> + + </chapter> + + <chapter id="concepts"> + <title>Concepts</title> + <para> + Vibrator driver registers as timed output class device (implemented for Android). + </para> + </chapter> + + <chapter id="tasks"> + <title>Tasks</title> + <para> + Timed Output Vibrator can be controlled from user space using following device: + <itemizedlist> + <listitem><para>/sys/class/timed_output/vibrator/enable</para></listitem> + </itemizedlist> + To turn vibrator for 1s, following command should be executed: + <itemizedlist> + <listitem><para>echo 1000 > /sys/class/timed_output/vibrator/enable</para></listitem> + </itemizedlist> + </para> + + </chapter> + + <chapter id="driver-configuration"> + <title>Driver Configuration and Interaction</title> + <para> + There are no configuration parameters for Timed Output Vibrator Driver. + </para> + <section id="driver-implemented-operations"> + <title>Implemented operations in driver</title> + <para> + All available operations are provided by Timed Output class driver. + </para> + <para> + <table> + <title> Supported device driver operations </title> + <tgroup cols="2"><tbody> + <row><entry> enable </entry> <entry> Calls vibra_enable() function which controls timer and workqueue </entry> </row> + <row><entry> get_time </entry> <entry> Calls vibra_get_time() function which returns time remaining to the end of vibration </entry> </row> + </tbody></tgroup> + </table> + </para> + + </section> + <section id="driver-loading"> + <title>Driver loading parameters</title> + <para> + Not Applicable. + </para> + </section> + <section id="driver-ioctl"> + <title>Driver IO Control</title> + <para> + Not Applicable. + </para> + </section> + + <section id="driver-sysfs"> + <title>Driver Interaction with Sysfs</title> + <para> + Timed Output Vibrator driver is available in sysfs as <filename>/sys/class/timed_output/vibrator</filename> + </para> + <variablelist> + <varlistentry> + <term>enable</term> + <listitem> + <variablelist> + <varlistentry> + <term>Direction</term> + <listitem><para>read-write</para></listitem> + </varlistentry> + <varlistentry> + <term>Attribute file type</term> + <listitem> + <para>Text file</para> + </listitem> + </varlistentry> + <varlistentry> + <term>File path</term> + <listitem><para><filename>/sys/class/timed_output/vibrator/enable</filename></para> + </listitem> + </varlistentry> + <varlistentry> + <term>Description</term> + <listitem> + <para> + Vibrator is enabled for given period of time on file write (in miliseconds). + </para> + <para> + When written 0, vibrator stops. + </para> + <para> + When file is read, it gives remaining time to disable vibrator (in miliseconds). + </para> + </listitem> + </varlistentry> + </variablelist> + </listitem> + </varlistentry> + + </variablelist> + </section> + <section id="driver-proc"> + <title>Driver Interaction using /proc filesystem</title> + <para> + Not Applicable. + </para> + + </section> + + <section id="driver-other"> + <title>Other means for Driver Interaction</title> + <para> + Not Applicable. + </para> + </section> + + <section id="driver-node"> + <title>Driver Node File</title> + <para> + Not aplicable. + </para> + </section> + + + </chapter> + + + <chapter id="bugs"> + <title>Known Bugs And Assumptions</title> + <para> + <variablelist> + <varlistentry> + <term>None.</term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + + </variablelist> + + </para> + </chapter> + +<chapter id="pubfunctions"> + <title>Public Functions Provided</title> + <para> + Not Applicable. + </para> +</chapter> + +<chapter id="internal-functions"> + <title>Internal Functions Provided</title> + <para> + This chapter contains the autogenerated documentation of the internal functions. + </para> +!Edrivers/staging/android/ste_timed_vibra.c +</chapter> + +</book> |