Browse files

taos: more changes for blade

  • Loading branch information...
1 parent 9643190 commit ffdd174a21542d1ece7768d6f3445a4a40b66b19 @TomGiordano committed Oct 30, 2011
Showing with 13 additions and 3 deletions.
  1. +13 −3 drivers/i2c/chips/taos.c
@@ -221,14 +221,18 @@ static struct file_operations taos_fops = {
// device configuration
struct taos_cfg *taos_cfgp;
static u32 calibrate_target_param = 300000;
+#if defined(CONFIG_MACH_BLADE)
+static u16 als_time_param = 100;
static u16 als_time_param = 27;
static u16 scale_factor_param = 1;
static u8 filter_history_param = 3;
static u8 filter_count_param = 1;
static u8 gain_param = 1;
#if defined(CONFIG_MACH_BLADE)
-static u16 gain_trim_param = 25;
+static u16 gain_trim_param = 512;
burstlam Nov 16, 2011 Contributor

Turn it up to 512 make the light sensor to stop working.
100 or below is fine.

TomGiordano Nov 17, 2011 Owner

Works fine for me. It was 512 before and worked fine.
Test it using an app like z-device test. Do you see values changing? The configuration in CM7 might need some changes.

burstlam Nov 17, 2011 Contributor

Mine is working fine. The issue reported by Chinese blade forum and fellows from Modaco also report the same issue

um. It looks to me that until they run z-device, the amb sensor is not responding
Auto brightness stay 100% and doesn't change with tick or not inside the display menu.

but with the values of 100 or below, this symptom vanish.

TomGiordano Nov 17, 2011 Owner

Users were complaining about exactly the same problem before this change. It is a configuration issue with the thresholds used to adjust the backlight. (see /device/zte/blade/overlay/frameworks/base/core/res/res/values/config.xml)

#elif defined(CONFIG_MACH_JOE)
static u16 gain_trim_param = 25;
#elif defined(CONFIG_MACH_SKATE)
@@ -242,18 +246,24 @@ static u16 gain_trim_param = 25; //this value is set according to specific devic
#if defined(CONFIG_MACH_BLADE)
-static u16 prox_threshold_hi_param = 800;
-static u16 prox_threshold_lo_param = 250;
+static u16 prox_threshold_hi_param = 8000;
+static u16 prox_threshold_lo_param = 8500;
#elif defined(CONFIG_MACH_SKATE)
static u16 prox_threshold_hi_param = 600;
static u16 prox_threshold_lo_param = 500;
static u16 prox_threshold_hi_param = 1023;
static u16 prox_threshold_lo_param = 1023;
+#if defined(CONFIG_MACH_BLADE)
+static u8 prox_int_time_param = 0xEE;
+static u8 prox_adc_time_param = 0xEE;
+static u8 prox_wait_time_param = 0xF6;
static u8 prox_int_time_param = 0xF6;
static u8 prox_adc_time_param = 0xFF;
static u8 prox_wait_time_param = 0xFF;
static u8 prox_intr_filter_param = 0x00;
static u8 prox_config_param = 0x00;

3 comments on commit ffdd174


I can't notice a difference with a value of 100(I'm currently using) with yours on the line "static u16 gain_trim_param" on my OLED blade.
I could get a range of 0-5. I will deliever this 2 patches to the Chinese Blade forum and see whether it works on the blade of Sep & Oct shipment.
indeed, isn't it the hi & lo prox threshold values interchanged on purpose?


oops. hi/lo should be the other way. als_time_param is related to the light sensor, not prox.


Thanks. I still don't get the full range 0-5 with the defaults, but it does work in the phone app which is good enough. Hopefully this will give better results for others.

gain_trim_param was 512 in 2.6.32. All of the values here come from 2.6.32.

Please sign in to comment.