r3593 - branches/src/target/kernel/2.6.24.x/patches
laforge at sita.openmoko.org
laforge at sita.openmoko.org
Thu Dec 6 11:42:25 CET 2007
Author: laforge
Date: 2007-12-06 11:42:10 +0100 (Thu, 06 Dec 2007)
New Revision: 3593
Modified:
branches/src/target/kernel/2.6.24.x/patches/gta01-backlight.patch
Log:
sync commit 3212 from 2.6.22.x: remove dynamic pclk-dependent backlight pwm counter calculation, sicne it no longer works with new pwm api
Modified: branches/src/target/kernel/2.6.24.x/patches/gta01-backlight.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta01-backlight.patch 2007-12-06 08:45:53 UTC (rev 3592)
+++ branches/src/target/kernel/2.6.24.x/patches/gta01-backlight.patch 2007-12-06 10:42:10 UTC (rev 3593)
@@ -35,7 +35,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.23/drivers/video/backlight/gta01_bl.c
-@@ -0,0 +1,257 @@
+@@ -0,0 +1,256 @@
+/*
+ * Backlight Driver for FIC GTA01 (Neo1973) GSM Phone
+ *
@@ -97,14 +97,13 @@
+#define GTA01BL_SUSPENDED 0x01
+#define GTA01BL_BATTLOW 0x02
+
-+#define GTA01BL_FREQ 400
-+
+/* On the GTA01 / Neo1973, we use a 50 or 66MHz PCLK, which gives
+ * us a 6.25..8.25MHz DIV8 clock, which is further divided by a
+ * prescaler of 4, resulting in a 1.56..2.06MHz tick. This results in a
+ * minimum frequency of 24..31Hz. At 400Hz, we need to set the count
+ * to something like 3906..5156, providing us a way sufficient resolution
+ * for display brightness adjustment. */
++#define GTA01BL_COUNTER 5156
+
+static int gta01bl_send_intensity(struct backlight_device *bd)
+{
@@ -151,7 +150,7 @@
+ gta01bl.pwm.timerid = PWM0;
+ gta01bl.pwm.prescaler = (4 - 1);
+ gta01bl.pwm.divider = S3C2410_TCFG1_MUX0_DIV8;
-+ gta01bl.pwm.counter = (((gta01bl.pwm.pclk_rate) / 32) / GTA01BL_FREQ) -1;
++ gta01bl.pwm.counter = GTA01BL_COUNTER;
+ gta01bl.pwm.comparer = gta01bl.pwm.counter;
+
+ rc = s3c2410_pwm_enable(>a01bl.pwm);
More information about the commitlog
mailing list