aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-19 17:09:52 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:09:52 +0000
commita87a0ef35f6f1d0c18af247dd0fc3a5027613b63 (patch)
tree76a72e81a772c205e6e9dd29795b3e87b03cf519 /include
parent1ffbee7922d337215844b9e0b7607fc4202abe88 (diff)
fix-lis302dl-resume-and-init-reload-boot-coefficients.patch
Reported-by: John Lee <john_lee@openmoko.com> We don't reset the devices either at init or resume, where init means use the BOOT bit to reload device calibration coefficients from internal EEPROM. John Lee saw brain-damaged behaviour after resume and sometimes after boot (since it may not have lost power to force a BOOT itself that makes sense). This patch - adds a diagnostic dump feature down /sys - forces BOOT action on init and resume, and waits for completion - makes sure XYZ capture is enabled on resume - adds some constants in the .h and removes some magic numbers in the code by using them Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/lis302dl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/lis302dl.h b/include/linux/lis302dl.h
index 0d6b4c48bcb..4d8ded98942 100644
--- a/include/linux/lis302dl.h
+++ b/include/linux/lis302dl.h
@@ -66,6 +66,15 @@ enum lis302dl_reg_ctrl1 {
LIS302DL_CTRL1_DR = 0x80,
};
+enum lis302dl_reg_ctrl2 {
+ LIS302DL_CTRL2_HPC1 = 0x01,
+ LIS302DL_CTRL2_HPC2 = 0x02,
+ LIS302DL_CTRL2_HPFF1 = 0x04,
+ LIS302DL_CTRL2_HPFF2 = 0x08,
+ LIS302DL_CTRL2_FDS = 0x10,
+ LIS302DL_CTRL2_BOOT = 0x40,
+ LIS302DL_CTRL2_SIM = 0x80,
+};
enum lis302dl_reg_ctrl3 {
LIS302DL_CTRL3_PP_OD = 0x40,
LIS302DL_CTRL3_IHL = 0x80,