OMAP vibration device

From WebOS Internals
Revision as of 00:30, 22 July 2009 by Hopspitfire (talk | contribs) (New page: The device which vibrates when the phone gets a call is able to be controlled on a rooted Pre via sysfs. This can be done manually or through shell scripts. <pre><nowiki> root@castle:/# c...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The device which vibrates when the phone gets a call is able to be controlled on a rooted Pre via sysfs. This can be done manually or through shell scripts.

root@castle:/# cd /sys/bus/platform/devices/omap_vibe/
root@castle:/sys/devices/platform/omap_vibe# ls -F
bus@         direction   driver@      duty_cycle  modalias    power/       subsystem@   uevent

The file direction indicates if the vibration is currently on or off

root@castle:/sys/devices/platform/omap_vibe# cat direction
0

When it is 0, the device is off, at any other value the device is on.

root@castle:/sys/devices/platform/omap_vibe# echo -n 1 > direction

The intensity of the vibration can be changed by modifying the duty_cycle file, but the results of this seem to be affected by the charging state of the phone. On the charger (touchstone or USB) the lowest accepted value seems to be 20 which produces a very SLOW vibration, but when on battery power no values below 50 produce vibration. The highest accepted value is 100. The default value is 50.

root@castle:/sys/devices/platform/omap_vibe# echo 100 > duty_cycle
root@castle:/sys/devices/platform/omap_vibe# echo 20 > duty_cycle
root@castle:/sys/devices/platform/omap_vibe# echo 50 > duty_cycle