Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

taos: more changes for blade

  • Loading branch information...
commit ffdd174a21542d1ece7768d6f3445a4a40b66b19 1 parent 9643190
@TomGiordano authored
Showing with 13 additions and 3 deletions.
  1. +13 −3 drivers/i2c/chips/taos.c
View
16 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;
+#else
static u16 als_time_param = 27;
+#endif
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;

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

@TomGiordano 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.

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

http://android.modaco.com/topic/335328-cyanogenmod-7-android-237-is-now-gen-2-only/page__view__findpost__p__1845889

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 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)

http://code.google.com/p/cyanogenmod/issues/detail?id=4380

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
#elif defined(CONFIG_MACH_JOE)
static u16 gain_trim_param = 25;
#elif defined(CONFIG_MACH_SKATE)
@@ -242,8 +246,8 @@ static u16 gain_trim_param = 25; //this value is set according to specific devic
#endif
#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;
@@ -251,9 +255,15 @@ static u16 prox_threshold_lo_param = 500;
static u16 prox_threshold_hi_param = 1023;
static u16 prox_threshold_lo_param = 1023;
#endif
+#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;
+#else
static u8 prox_int_time_param = 0xF6;
static u8 prox_adc_time_param = 0xFF;
static u8 prox_wait_time_param = 0xFF;
+#endif
static u8 prox_intr_filter_param = 0x00;
static u8 prox_config_param = 0x00;

3 comments on commit ffdd174

@burstlam

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?

@TomGiordano

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

@TomGiordano

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.
Something went wrong with that request. Please try again.