diff options
author | Jean-Louis Biasini <jlbiasini@gmail.com> | 2013-07-29 14:01:37 +0300 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2013-07-29 14:28:24 +0200 |
commit | be72c4f2bf664a20f5ccc020a05a29d8ae7a16f7 (patch) | |
tree | fc1a839d7e8e33ca2cf40eb2e6a86c09772c78a9 /firmware/export/synaptics-rmi.h | |
parent | 49bcf3530962c40857c510af431968960ba4bdc6 (diff) | |
download | rockbox-be72c4f2bf664a20f5ccc020a05a29d8ae7a16f7.tar.gz rockbox-be72c4f2bf664a20f5ccc020a05a29d8ae7a16f7.zip |
[RMI Driver] Implement power saving support
Implement standard values and functions to operate on power control
register. This allow to modify both reporting rate and sleep mode
in order to save power.
Change-Id: I2bdffd4160e10eec488eb5e19de8a2a258ddbb04
Reviewed-on: http://gerrit.rockbox.org/529
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
Diffstat (limited to 'firmware/export/synaptics-rmi.h')
-rw-r--r-- | firmware/export/synaptics-rmi.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/firmware/export/synaptics-rmi.h b/firmware/export/synaptics-rmi.h index 38a9955dcc..564f1fd7e7 100644 --- a/firmware/export/synaptics-rmi.h +++ b/firmware/export/synaptics-rmi.h @@ -97,6 +97,17 @@ struct rmi_2d_absolute_data_t #define RMI_2D_GEST_FLICK_X_BM 0x0f #define RMI_2D_GEST_FLICK_Y_BM 0xf0 #define RMI_2D_GEST_FLICK_Y_BP 4 +/* RMI Device Control register */ +#define RMI_REPORT_RATE_BM 0xc0 +#define RMI_SLEEP_MODE_BM 0x07 +#define RMI_REPORT_RATE_NORMAL 0x80 +#define RMI_REPORT_RATE_LOW 0x40 +#define RMI_SLEEP_MODE_FORCE_FULLY_AWAKE 0x00 +#define RMI_SLEEP_MODE_NORMAL 0x01 +#define RMI_SLEEP_MODE_LOW_POWER 0x02 +#define RMI_SLEEP_MODE_VERY_LOW_POWER 0x03 +#define RMI_SLEEP_MODE_SENSOR_SLEEP 0x04 + struct rmi_2d_relative_data_t { @@ -127,5 +138,9 @@ int rmi_write(int address, int byte_count, const unsigned char *buffer); /* Write one register * WARNING: don't cross a page boundary ! */ int rmi_write_single(int address, unsigned char byte); +/* set the device to the given sleep mode */ +void rmi_set_sleep_mode(unsigned char sleep_mode); +/* set the device's report rate to the given value */ +void rmi_set_report_rate(unsigned char report_rate); #endif |