linux-omap-psp 2.6.32: update touchbook patches and defconfig
authorKoen Kooi <k-kooi@ti.com>
Wed, 31 Mar 2010 10:01:25 +0000 (12:01 +0200)
committerKoen Kooi <koen@openembedded.org>
Mon, 12 Apr 2010 17:43:31 +0000 (19:43 +0200)
20 files changed:
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0001-ARM-OMAP-add-spi-platform-devices.patch
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0002-MMA7455L-accelerometer-driver.patch
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0003-bq27x00_battery-remove-error-message-output.patch
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0004-bq27x00_battery-add-charged-gpio.patch
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0005-ARM-OMAP-Hack-beagle-asoc-driver-to-support-touchboo.patch [deleted file]
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0005-adf7846-add-more-debugging.patch [moved from recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0007-adf7846-add-more-debugging.patch with 96% similarity]
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0006-ads7846-read-max-mix-x-y-from-pdata.patch [moved from recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0008-ads7846-read-max-mix-x-y-from-pdata.patch with 89% similarity]
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0007-ads7846-add-settling-delay-to-pdata.patch [moved from recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-ads7846-add-settling-delay-to-pdata.patch with 94% similarity]
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0008-DSS2-OMAPFB-Translate-X-Y-coordinates-for-the-video-.patch [new file with mode: 0644]
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-DSS2-fix-rotation-offsets.patch [new file with mode: 0644]
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0010-DSS2-Fix-scaling-checks-when-rotation-is-90-or-270-d.patch [moved from recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0011-DSS2-Fix-scaling-checks-when-rotation-is-90-or-270-d.patch with 89% similarity]
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0010-Touch-Book-turn-on-off-the-class-D-amplifier-dependi.patch [deleted file]
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0011-add-touchbook-hid-driver.patch [moved from recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0012-add-touchbook-hid-driver.patch with 98% similarity]
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0012-Make-backlight-controls-accessible-to-users.patch [moved from recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0013-Make-backlight-controls-accessible-to-users.patch with 86% similarity]
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0013-ads7846-don-t-error-out-when-there-s-no-pendown-gpio.patch [moved from recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0014-ads7846-don-t-error-out-when-there-s-no-pendown-gpio.patch with 85% similarity]
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0014-ASoC-add-driver-for-omap3-touchbook.patch [new file with mode: 0644]
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0015-backlight-add-PWM-support.patch [new file with mode: 0644]
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0016-ARM-OMAP-omap3-touchbook-update-boardfile.patch [moved from recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0006-ARM-OMAP-omap3-touchbook-update-boardfile.patch with 95% similarity]
recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/defconfig
recipes/linux/linux-omap-psp_2.6.32.bb

index f44abc3..f1995f5 100644 (file)
@@ -1,7 +1,7 @@
-From 45e62c073f088072ea131e5eda1446f63fc97acf Mon Sep 17 00:00:00 2001
+From 87d5c6d0256618e63e20777dcf3bc57f71249415 Mon Sep 17 00:00:00 2001
 From: Tim Yamin <plasm@roo.me.uk>
 Date: Sat, 11 Apr 2009 13:05:21 -0700
-Subject: [PATCH 01/14] ARM: OMAP: add spi platform devices
+Subject: [PATCH 01/16] ARM: OMAP: add spi platform devices
 
 ---
  arch/arm/mach-omap2/devices.c |   32 ++++++++++++++++++++++++++++++++
index 6a19217..f8e7606 100644 (file)
@@ -1,7 +1,7 @@
-From dce7f7b177775843b843dcc147ac04e9a99bb60a Mon Sep 17 00:00:00 2001
+From 0b1495ce483319984853f09a0d51b97e119df980 Mon Sep 17 00:00:00 2001
 From: Tim Yamin <plasm@roo.me.uk>
 Date: Tue, 23 Mar 2010 09:52:10 +0100
-Subject: [PATCH 02/14] MMA7455L accelerometer driver
+Subject: [PATCH 02/16] MMA7455L accelerometer driver
 
 ---
  drivers/input/misc/Kconfig    |    9 +
index 228f2aa..ad8017f 100644 (file)
@@ -1,7 +1,7 @@
-From 914cf78bd36ac36b0f33ef4108a2bf68337a612c Mon Sep 17 00:00:00 2001
+From 49e4563c87bce62dc4f69ad692a59e82ca0f8640 Mon Sep 17 00:00:00 2001
 From: Gregoire Gentil <gregoire@gentil.com>
 Date: Fri, 12 Mar 2010 11:41:17 +0100
-Subject: [PATCH 03/14] bq27x00_battery: remove error message output
+Subject: [PATCH 03/16] bq27x00_battery: remove error message output
 
 ---
  drivers/power/bq27x00_battery.c |    5 -----
index 6701032..32b2c35 100644 (file)
@@ -1,7 +1,7 @@
-From c72622f546557a12ba1c1a0d6d678cb8fb886039 Mon Sep 17 00:00:00 2001
+From e9ae476c0553b5f01a5f38621a4abf68deb24874 Mon Sep 17 00:00:00 2001
 From: Gregoire Gentil <gregoire@gentil.com>
 Date: Fri, 12 Mar 2010 11:42:45 +0100
-Subject: [PATCH 04/14] bq27x00_battery: add charged gpio
+Subject: [PATCH 04/16] bq27x00_battery: add charged gpio
 
 ---
  drivers/power/bq27x00_battery.c |   21 +++++++++++++++++++++
diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0005-ARM-OMAP-Hack-beagle-asoc-driver-to-support-touchboo.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0005-ARM-OMAP-Hack-beagle-asoc-driver-to-support-touchboo.patch
deleted file mode 100644 (file)
index 8d0cb29..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-From 3937249a21d70f55b5f8a5d2a94e28bac588c09f Mon Sep 17 00:00:00 2001
-From: Gregoire Gentil <gregoire@gentil.com>
-Date: Fri, 12 Mar 2010 11:47:59 +0100
-Subject: [PATCH 05/14] ARM: OMAP: Hack beagle asoc driver to support touchbook, tweak touchbook KConfig
-
----
- arch/arm/mach-omap2/Kconfig  |    1 +
- sound/soc/omap/Kconfig       |    8 ++++++++
- sound/soc/omap/Makefile      |    2 ++
- sound/soc/omap/omap3beagle.c |    4 ++--
- 4 files changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
-index b72ae06..6f2bf4e 100644
---- a/arch/arm/mach-omap2/Kconfig
-+++ b/arch/arm/mach-omap2/Kconfig
-@@ -113,6 +113,7 @@ config MACH_OMAP3_PANDORA
- config MACH_OMAP3_TOUCHBOOK
-       bool "OMAP3 Touch Book"
-       depends on ARCH_OMAP3 && ARCH_OMAP34XX
-+      select OMAP_PACKAGE_CBB
-       select BACKLIGHT_CLASS_DEVICE
- config MACH_OMAP_3430SDP
-diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
-index 61952aa..a7c06ab 100644
---- a/sound/soc/omap/Kconfig
-+++ b/sound/soc/omap/Kconfig
-@@ -101,6 +101,14 @@ config SND_OMAP_SOC_OMAP3_BEAGLE
-       help
-         Say Y if you want to add support for SoC audio on the Beagleboard.
-+config SND_OMAP_SOC_OMAP3_TOUCHBOOK
-+      tristate "SoC Audio support for OMAP3 Touch Book"
-+      depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP3_TOUCHBOOK
-+      select SND_OMAP_SOC_MCBSP
-+      select SND_SOC_TWL4030
-+      help
-+        Say Y if you want to add support for SoC audio on the Touch Book.
-+
- config SND_OMAP_SOC_ZOOM2
-       tristate "SoC Audio support for Zoom2"
-       depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP_ZOOM2
-diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
-index 19283e5..9c972d6 100644
---- a/sound/soc/omap/Makefile
-+++ b/sound/soc/omap/Makefile
-@@ -16,6 +16,7 @@ snd-soc-am3517evm-objs := am3517evm.o
- snd-soc-sdp3430-objs := sdp3430.o
- snd-soc-omap3pandora-objs := omap3pandora.o
- snd-soc-omap3beagle-objs := omap3beagle.o
-+snd-soc-omap3touchbook-objs := omap3beagle.o
- snd-soc-zoom2-objs := zoom2.o
- snd-soc-igep0020-objs := igep0020.o
-@@ -29,5 +30,6 @@ obj-$(CONFIG_SND_OMAP_SOC_AM3517EVM) += snd-soc-am3517evm.o
- obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o
- obj-$(CONFIG_SND_OMAP_SOC_OMAP3_PANDORA) += snd-soc-omap3pandora.o
- obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o
-+obj-$(CONFIG_SND_OMAP_SOC_OMAP3_TOUCHBOOK) += snd-soc-omap3beagle.o
- obj-$(CONFIG_SND_OMAP_SOC_ZOOM2) += snd-soc-zoom2.o
- obj-$(CONFIG_SND_OMAP_SOC_IGEP0020) += snd-soc-igep0020.o
-diff --git a/sound/soc/omap/omap3beagle.c b/sound/soc/omap/omap3beagle.c
-index d88ad5c..248b789 100644
---- a/sound/soc/omap/omap3beagle.c
-+++ b/sound/soc/omap/omap3beagle.c
-@@ -116,13 +116,13 @@ static struct platform_device *omap3beagle_snd_device;
- static int __init omap3beagle_soc_init(void)
- {
-       int ret;
--
-+/*
-       if (!machine_is_omap3_beagle()) {
-               pr_debug("Not OMAP3 Beagle!\n");
-               return -ENODEV;
-       }
-       pr_info("OMAP3 Beagle SoC init\n");
--
-+*/
-       omap3beagle_snd_device = platform_device_alloc("soc-audio", -1);
-       if (!omap3beagle_snd_device) {
-               printk(KERN_ERR "Platform device allocation failed\n");
--- 
-1.6.6.1
-
@@ -1,7 +1,7 @@
-From 1b90e477d484f666ba2224b950b2810fcaf53df2 Mon Sep 17 00:00:00 2001
+From 798baf132eac5022ce6c2da7e2d54eb0e65b0193 Mon Sep 17 00:00:00 2001
 From: Gregoire Gentil <gregoire@gentil.com>
 Date: Fri, 12 Mar 2010 13:50:38 +0100
-Subject: [PATCH 07/14] adf7846: add more debugging
+Subject: [PATCH 05/16] adf7846: add more debugging
 
 ---
  drivers/input/touchscreen/ads7846.c |   73 +++++++++++++++++++++++++++++++++++
@@ -1,7 +1,7 @@
-From 95fae00f5191e445a2192a85c73b02b287eb3db6 Mon Sep 17 00:00:00 2001
+From 5b11cfec0cd8f01eba7468a76e764d526ad15bdb Mon Sep 17 00:00:00 2001
 From: Gregoire Gentil <gregoire@gentil.com>
 Date: Fri, 12 Mar 2010 13:50:45 +0100
-Subject: [PATCH 08/14] ads7846: read max/mix x/y from pdata
+Subject: [PATCH 06/16] ads7846: read max/mix x/y from pdata
 
 ---
  drivers/input/touchscreen/ads7846.c |    5 +++--
@@ -1,7 +1,7 @@
-From dd9c33edf9c2734a7107c96c61d3ffcea90837f4 Mon Sep 17 00:00:00 2001
+From cd23f48aad0b24bc2ed8156bc578a2b2d8f2ed9f Mon Sep 17 00:00:00 2001
 From: Gregoire Gentil <gregoire@gentil.com>
 Date: Fri, 12 Mar 2010 13:50:52 +0100
-Subject: [PATCH 09/14] ads7846: add settling delay to pdata
+Subject: [PATCH 07/16] ads7846: add settling delay to pdata
 
 ---
  drivers/input/touchscreen/ads7846.c |   22 ++++++++++++++++++++++
diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0008-DSS2-OMAPFB-Translate-X-Y-coordinates-for-the-video-.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0008-DSS2-OMAPFB-Translate-X-Y-coordinates-for-the-video-.patch
new file mode 100644 (file)
index 0000000..e4c4361
--- /dev/null
@@ -0,0 +1,99 @@
+From 7f0896fb74c200f0dd39c8f66cac510f511b60f7 Mon Sep 17 00:00:00 2001
+From: Tim Yamin <plasm@roo.me.uk>
+Date: Mon, 20 Apr 2009 20:29:11 -0700
+Subject: [PATCH 08/16] DSS2: OMAPFB: Translate X/Y coordinates for the video planes when rotating.
+
+When rotating the video planes, translate the X/Y coordinates such that
+a [0,0] from userspace always maps to the correct upper left corner of
+the display. This patch assumes that you rotate plane 0 before rotating
+plane 1. Patch also corrects the scaling parameters so that the video is
+displayed in the correct orientation (vertically, instead of horizontally)
+when rotating by 90 / 270 degrees.
+
+Signed-off-by: Tim Yamin <plasm@roo.me.uk>
+---
+ drivers/video/omap2/dss/dispc.c   |   16 ++++++++++++----
+ drivers/video/omap2/dss/manager.c |    2 +-
+ drivers/video/omap2/dss/overlay.c |   19 ++++++++++++++-----
+ 3 files changed, 27 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index c6d5fc5..1b38c49 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1685,10 +1685,18 @@ static int _dispc_setup_plane(enum omap_plane plane,
+       _dispc_set_pic_size(plane, width, height);
+       if (plane != OMAP_DSS_GFX) {
+-              _dispc_set_scaling(plane, width, height,
+-                                 out_width, out_height,
+-                                 ilace, five_taps, fieldmode);
+-              _dispc_set_vid_size(plane, out_width, out_height);
++              if (rotation == 1 || rotation == 3) {
++                      _dispc_set_scaling(plane, width, height,
++                                         out_height, out_width,
++                                         ilace, five_taps, fieldmode);
++                      _dispc_set_vid_size(plane, out_height, out_width);
++              } else {
++                      _dispc_set_scaling(plane, width, height,
++                                         out_width, out_height,
++                                         ilace, five_taps, fieldmode);
++                      _dispc_set_vid_size(plane, out_width, out_height);
++              }
++
+               _dispc_set_vid_color_conv(plane, cconv);
+       }
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+index 27d9c46..7c62dea 100644
+--- a/drivers/video/omap2/dss/manager.c
++++ b/drivers/video/omap2/dss/manager.c
+@@ -702,7 +702,7 @@ static int configure_overlay(enum omap_plane plane)
+       u16 outw, outh;
+       u16 x, y, w, h;
+       u32 paddr;
+-      int r;
++      int r, pos_x = 0, pos_y = 0;
+       DSSDBGF("%d", plane);
+diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c
+index b7f9a73..0bc0592 100644
+--- a/drivers/video/omap2/dss/overlay.c
++++ b/drivers/video/omap2/dss/overlay.c
+@@ -374,6 +374,20 @@ int dss_check_overlay(struct omap_overlay *ovl, struct omap_dss_device *dssdev)
+                       outh = info->out_height;
+       }
++      if ((ovl->supported_modes & info->color_mode) == 0) {
++              DSSERR("overlay doesn't support mode %d\n", info->color_mode);
++              return -EINVAL;
++      }
++
++      if (ovl->id != OMAP_DSS_GFX && (info->rotation == 1 ||
++          info->rotation == 3)) {
++              if(outw > dh || outh > dw)
++                      return -EINVAL;
++
++              /* If coordinates are invalid, they will be clipped later... */
++              return 0;
++      }
++
+       if (dw < info->pos_x + outw) {
+               DSSDBG("check_overlay failed 1: %d < %d + %d\n",
+                               dw, info->pos_x, outw);
+@@ -386,11 +400,6 @@ int dss_check_overlay(struct omap_overlay *ovl, struct omap_dss_device *dssdev)
+               return -EINVAL;
+       }
+-      if ((ovl->supported_modes & info->color_mode) == 0) {
+-              DSSERR("overlay doesn't support mode %d\n", info->color_mode);
+-              return -EINVAL;
+-      }
+-
+       return 0;
+ }
+-- 
+1.6.6.1
+
diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-DSS2-fix-rotation-offsets.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-DSS2-fix-rotation-offsets.patch
new file mode 100644 (file)
index 0000000..3a2f3b2
--- /dev/null
@@ -0,0 +1,69 @@
+From a592b342f23d503feebd3c895b1b6d176e132cdb Mon Sep 17 00:00:00 2001
+From: Gregoire Gentil <gregoire@gentil.com>
+Date: Wed, 31 Mar 2010 11:32:23 +0200
+Subject: [PATCH 09/16] DSS2: fix rotation offsets
+
+---
+ drivers/video/omap2/omapfb/omapfb-main.c |   34 +++++++++++++++++++++++++----
+ 1 files changed, 29 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
+index c2c9663..1b116b6 100644
+--- a/drivers/video/omap2/omapfb/omapfb-main.c
++++ b/drivers/video/omap2/omapfb/omapfb-main.c
+@@ -859,12 +859,14 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl,
+       u32 data_start_p;
+       void __iomem *data_start_v;
+       struct omap_overlay_info info;
+-      int xres, yres;
++      int xres, yres, xoff, yoff;
+       int screen_width;
+       int mirror;
+       int rotation = var->rotate;
+       int i;
++      xoff = var->xoffset;
++      yoff = var->yoffset;
+       for (i = 0; i < ofbi->num_overlays; i++) {
+               if (ovl != ofbi->overlays[i])
+                       continue;
+@@ -893,10 +895,32 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl,
+               data_start_v = omapfb_get_region_vaddr(ofbi, 0);
+       }
+-      if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
+-              offset = calc_rotation_offset_vrfb(var, fix, 0);
+-      else
+-              offset = calc_rotation_offset_dma(var, fix, rotation);
++    if (ofbi->rotation == FB_ROTATE_CW || ofbi->rotation == FB_ROTATE_UD) {
++              if (var->yres < var->yres_virtual) {
++                      if (var->yoffset)
++                              yoff = 0;
++                      else
++                              yoff = var->yres_virtual - var->yres;
++              }
++      }
++
++      if (ofbi->rotation == FB_ROTATE_CCW || ofbi->rotation == FB_ROTATE_UD) {
++              if (var->xres < var->xres_virtual) {
++                      if (var->xoffset)
++                              xoff = 0;
++                      else
++                              xoff = var->xres_virtual - var->xres;
++              }
++      }
++
++      if (ofbi->rotation == FB_ROTATE_CW || ofbi->rotation == FB_ROTATE_CCW) {
++              offset = ((xoff * fix->line_length) >> 1) +
++                              ((yoff * var->bits_per_pixel) >> 2);
++      } else
++      {
++              offset = yoff * fix->line_length +
++                              ((xoff * var->bits_per_pixel) >> 3);
++      }
+       data_start_p += offset;
+       data_start_v += offset;
+-- 
+1.6.6.1
+
@@ -1,14 +1,14 @@
-From 0f0b6b8dbe24f34d0442a734302b0c406bad8f74 Mon Sep 17 00:00:00 2001
+From 23ddd0dafbf79d7919aa90479dc038e1d9e7c905 Mon Sep 17 00:00:00 2001
 From: Tim Yamin <plasm@roo.me.uk>
 Date: Fri, 12 Mar 2010 13:57:38 +0100
-Subject: [PATCH 11/14] DSS2: Fix scaling checks when rotation is 90 or 270 degrees.
+Subject: [PATCH 10/16] DSS2: Fix scaling checks when rotation is 90 or 270 degrees.
 
 ---
  drivers/video/omap2/dss/dispc.c |   25 +++++++++++++++++++------
  1 files changed, 19 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
-index c6d5fc5..8da571e 100644
+index 1b38c49..d648c08 100644
 --- a/drivers/video/omap2/dss/dispc.c
 +++ b/drivers/video/omap2/dss/dispc.c
 @@ -1563,16 +1563,29 @@ static int _dispc_setup_plane(enum omap_plane plane,
diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0010-Touch-Book-turn-on-off-the-class-D-amplifier-dependi.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0010-Touch-Book-turn-on-off-the-class-D-amplifier-dependi.patch
deleted file mode 100644 (file)
index 1edce7b..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-From db8f1eba9154789c45c6a92413bbbd94f5d9c7f5 Mon Sep 17 00:00:00 2001
-From: Tim Yamin <plasm@roo.me.uk>
-Date: Wed, 29 Apr 2009 17:30:25 -0700
-Subject: [PATCH] Touch Book: turn on/off the class D amplifier depending on whether the  headphones are plugged into the jack or not.
-
-Signed-off-by: Tim Yamin <plasm@roo.me.uk>
----
- sound/soc/omap/omap3beagle.c |   33 +++++++++++++++++++++++++++++++++
- 1 files changed, 33 insertions(+), 0 deletions(-)
-
-diff --git a/sound/soc/omap/omap3beagle.c b/sound/soc/omap/omap3beagle.c
-index fd24a4a..1236638 100644
---- a/sound/soc/omap/omap3beagle.c
-+++ b/sound/soc/omap/omap3beagle.c
-@@ -20,7 +20,10 @@
-  */
- #include <linux/clk.h>
-+#include <linux/irq.h>
-+#include <linux/interrupt.h>
- #include <linux/platform_device.h>
-+
- #include <sound/core.h>
- #include <sound/pcm.h>
- #include <sound/soc.h>
-@@ -35,6 +38,9 @@
- #include "omap-pcm.h"
- #include "../codecs/twl4030.h"
-+#define TB_HEADPHONE_GPIO 56
-+#define TB_HEADPHONE_IRQ  OMAP_GPIO_IRQ(TB_HEADPHONE_GPIO)
-+
- static int omap3beagle_hw_params(struct snd_pcm_substream *substream,
-       struct snd_pcm_hw_params *params)
- {
-@@ -103,6 +109,34 @@ static struct snd_soc_device omap3beagle_snd_devdata = {
- static struct platform_device *omap3beagle_snd_device;
-+static void jack_work_func(struct work_struct *wq)
-+{
-+      int status = gpio_get_value(TB_HEADPHONE_GPIO);
-+
-+      struct snd_soc_device *socdev = platform_get_drvdata(omap3beagle_snd_device);
-+      struct snd_soc_codec *codec = socdev->card->codec;
-+
-+      if(status) {
-+              snd_soc_dapm_disable_pin(codec, "HFL");
-+              snd_soc_dapm_disable_pin(codec, "HFR");
-+        } else {
-+              snd_soc_dapm_enable_pin(codec, "HFL");
-+              snd_soc_dapm_enable_pin(codec, "HFR");
-+      }
-+
-+      enable_irq(TB_HEADPHONE_IRQ);
-+
-+      //snd_soc_dapm_sync(codec);
-+}
-+DECLARE_WORK(jack_work, jack_work_func);
-+
-+static irqreturn_t touchbook_headphone_event(int irq, void *snd)
-+{
-+      disable_irq_nosync(irq);
-+      schedule_work(&jack_work);
-+      return IRQ_HANDLED;
-+}
-+
- static int __init omap3beagle_soc_init(void)
- {
-       int ret;
-@@ -123,10 +156,19 @@ static int __init omap3beagle_soc_init(void)
-       omap3beagle_snd_devdata.dev = &omap3beagle_snd_device->dev;
-       *(unsigned int *)omap3beagle_dai.cpu_dai->private_data = 1; /* McBSP2 */
-+      /* Touch Book -- headphone jack sensor */
-+      ret = request_irq(TB_HEADPHONE_IRQ, touchbook_headphone_event, IRQF_TRIGGER_RISING |
-+                        IRQF_TRIGGER_FALLING, "touchbook_headphone", omap3beagle_snd_device);
-+      if (ret < 0)
-+              goto err1;
-+
-       ret = platform_device_add(omap3beagle_snd_device);
-       if (ret)
-               goto err1;
-+      /* Detect headphone status */
-+      touchbook_headphone_event(0, omap3beagle_snd_device);
-+
-       return 0;
- err1:
@@ -1,7 +1,7 @@
-From b41b53e9a9dc56a75b548e1fa73570569fe12d7e Mon Sep 17 00:00:00 2001
+From 1ced7194276074ebc9a009c9b41df27d5fdb5df9 Mon Sep 17 00:00:00 2001
 From: Gregoire Gentil <gregoire@gentil.com>
 Date: Fri, 12 Mar 2010 14:39:07 +0100
-Subject: [PATCH 12/14] add touchbook hid driver
+Subject: [PATCH 11/16] add touchbook hid driver
 
 ---
  drivers/hid/Kconfig    |    7 ++
@@ -1,7 +1,7 @@
-From c109db2ee2bca2bdc3af243afda91a96bbd1726f Mon Sep 17 00:00:00 2001
+From 06e169d76148f90f500e76e646a0e595ba0048a9 Mon Sep 17 00:00:00 2001
 From: Gregoire Gentil <gregroire@gentil.com>
 Date: Fri, 12 Mar 2010 14:41:05 +0100
-Subject: [PATCH 13/14] Make backlight controls accessible to users
+Subject: [PATCH 12/16] Make backlight controls accessible to users
 
 ---
  drivers/video/backlight/backlight.c |    2 +-
@@ -1,7 +1,7 @@
-From 6506ac2dc19a3b010078fb6a36522aba0b82f28c Mon Sep 17 00:00:00 2001
+From e5ae09d0d2c8f2bd1da7662dd551b103292a5748 Mon Sep 17 00:00:00 2001
 From: Gregoire Gentil <gregoire@gentil.com>
 Date: Fri, 12 Mar 2010 15:04:58 +0100
-Subject: [PATCH 14/14] ads7846: don't error out when there's no pendown gpio
+Subject: [PATCH 13/16] ads7846: don't error out when there's no pendown gpio
 
 ---
  drivers/input/touchscreen/ads7846.c |    7 -------
diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0014-ASoC-add-driver-for-omap3-touchbook.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0014-ASoC-add-driver-for-omap3-touchbook.patch
new file mode 100644 (file)
index 0000000..3581fa7
--- /dev/null
@@ -0,0 +1,344 @@
+From b8c9d2b0cec0f8e6a25749f1ab50f59ad7480e8d Mon Sep 17 00:00:00 2001
+From: Gregoire Gentil <gregoire@gentil.com>
+Date: Wed, 31 Mar 2010 11:14:04 +0200
+Subject: [PATCH 14/16] ASoC: add driver for omap3-touchbook
+
+---
+ sound/soc/omap/Kconfig          |    8 +
+ sound/soc/omap/Makefile         |    2 +
+ sound/soc/omap/omap3touchbook.c |  285 +++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 295 insertions(+), 0 deletions(-)
+ create mode 100644 sound/soc/omap/omap3touchbook.c
+
+diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
+index 61952aa..a7c06ab 100644
+--- a/sound/soc/omap/Kconfig
++++ b/sound/soc/omap/Kconfig
+@@ -101,6 +101,14 @@ config SND_OMAP_SOC_OMAP3_BEAGLE
+       help
+         Say Y if you want to add support for SoC audio on the Beagleboard.
++config SND_OMAP_SOC_OMAP3_TOUCHBOOK
++      tristate "SoC Audio support for OMAP3 Touch Book"
++      depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP3_TOUCHBOOK
++      select SND_OMAP_SOC_MCBSP
++      select SND_SOC_TWL4030
++      help
++        Say Y if you want to add support for SoC audio on the Touch Book.
++
+ config SND_OMAP_SOC_ZOOM2
+       tristate "SoC Audio support for Zoom2"
+       depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP_ZOOM2
+diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
+index 19283e5..e3f172f 100644
+--- a/sound/soc/omap/Makefile
++++ b/sound/soc/omap/Makefile
+@@ -16,6 +16,7 @@ snd-soc-am3517evm-objs := am3517evm.o
+ snd-soc-sdp3430-objs := sdp3430.o
+ snd-soc-omap3pandora-objs := omap3pandora.o
+ snd-soc-omap3beagle-objs := omap3beagle.o
++snd-soc-omap3touchbook-objs := omap3touchbook.o
+ snd-soc-zoom2-objs := zoom2.o
+ snd-soc-igep0020-objs := igep0020.o
+@@ -29,5 +30,6 @@ obj-$(CONFIG_SND_OMAP_SOC_AM3517EVM) += snd-soc-am3517evm.o
+ obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o
+ obj-$(CONFIG_SND_OMAP_SOC_OMAP3_PANDORA) += snd-soc-omap3pandora.o
+ obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o
++obj-$(CONFIG_SND_OMAP_SOC_OMAP3_TOUCHBOOK) += snd-soc-omap3touchbook.o
+ obj-$(CONFIG_SND_OMAP_SOC_ZOOM2) += snd-soc-zoom2.o
+ obj-$(CONFIG_SND_OMAP_SOC_IGEP0020) += snd-soc-igep0020.o
+diff --git a/sound/soc/omap/omap3touchbook.c b/sound/soc/omap/omap3touchbook.c
+new file mode 100644
+index 0000000..4e81f3e
+--- /dev/null
++++ b/sound/soc/omap/omap3touchbook.c
+@@ -0,0 +1,285 @@
++/*
++ * omap3touchbook.c  --  SoC audio for Touch Book
++ *
++ * Copyright (C) 2009-2010 Always Innovating
++ *
++ * Author: Gregoire Gentil <gregoire@gentil.com>
++ *
++ * Based on:
++ * Author: Steve Sakoman <steve@sakoman.com>
++ * Author: Misael Lopez Cruz <x0052729@ti.com>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
++ * 02110-1301 USA
++ *
++ */
++
++#include <linux/clk.h>
++#include <linux/platform_device.h>
++#include <linux/i2c/twl.h>
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/soc.h>
++#include <sound/soc-dapm.h>
++#include <sound/jack.h>
++
++#include <asm/mach-types.h>
++#include <mach/hardware.h>
++#include <mach/gpio.h>
++#include <plat/mcbsp.h>
++
++#include "omap-mcbsp.h"
++#include "omap-pcm.h"
++#include "../codecs/twl4030.h"
++
++static struct snd_soc_card snd_soc_omap3touchbook;
++
++static int omap3touchbook_hw_params(struct snd_pcm_substream *substream,
++      struct snd_pcm_hw_params *params)
++{
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
++      struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
++      unsigned int fmt;
++      int ret;
++
++      switch (params_channels(params)) {
++      case 2: /* Stereo I2S mode */
++              fmt =   SND_SOC_DAIFMT_I2S |
++                      SND_SOC_DAIFMT_NB_NF |
++                      SND_SOC_DAIFMT_CBM_CFM;
++              break;
++      case 4: /* Four channel TDM mode */
++              fmt =   SND_SOC_DAIFMT_DSP_A |
++                      SND_SOC_DAIFMT_IB_NF |
++                      SND_SOC_DAIFMT_CBM_CFM;
++              break;
++      default:
++              return -EINVAL;
++      }
++
++      /* Set codec DAI configuration */
++      ret = snd_soc_dai_set_fmt(codec_dai, fmt);
++      if (ret < 0) {
++              printk(KERN_ERR "can't set codec DAI configuration\n");
++              return ret;
++      }
++
++      /* Set cpu DAI configuration */
++      ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
++      if (ret < 0) {
++              printk(KERN_ERR "can't set cpu DAI configuration\n");
++              return ret;
++      }
++
++      /* Set the codec system clock for DAC and ADC */
++      ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000,
++                                   SND_SOC_CLOCK_IN);
++      if (ret < 0) {
++              printk(KERN_ERR "can't set codec system clock\n");
++              return ret;
++      }
++
++      return 0;
++}
++
++static struct snd_soc_ops omap3touchbook_ops = {
++      .hw_params = omap3touchbook_hw_params,
++};
++
++/* Headset jack */
++static struct snd_soc_jack hs_jack;
++
++/* Headset jack detection DAPM pins */
++static struct snd_soc_jack_pin hs_jack_pins[] = {
++      {
++              .pin = "Headset Mic",
++              .mask = SND_JACK_MICROPHONE,
++      },
++      {
++              .pin = "Headset Stereophone",
++              .mask = SND_JACK_HEADPHONE,
++      },
++};
++
++/* Headset jack detection gpios */
++static struct snd_soc_jack_gpio hs_jack_gpios[] = {
++      {
++              .gpio = 56,
++              .name = "hsdet-gpio",
++              .report = SND_JACK_HEADSET,
++              .debounce_time = 200,
++      },
++};
++
++/* omap3touchbook machine DAPM */
++static const struct snd_soc_dapm_widget omap3touchbook_twl4030_dapm_widgets[] = {
++      SND_SOC_DAPM_MIC("Ext Mic", NULL),
++      SND_SOC_DAPM_SPK("Ext Spk", NULL),
++      SND_SOC_DAPM_MIC("Headset Mic", NULL),
++      SND_SOC_DAPM_HP("Headset Stereophone", NULL),
++};
++
++static const struct snd_soc_dapm_route audio_map[] = {
++      /* External Mics: MAINMIC, SUBMIC with bias*/
++      {"MAINMIC", NULL, "Mic Bias 1"},
++      {"SUBMIC", NULL, "Mic Bias 2"},
++      {"Mic Bias 1", NULL, "Ext Mic"},
++      {"Mic Bias 2", NULL, "Ext Mic"},
++
++      /* External Speakers: HFL, HFR */
++      {"Ext Spk", NULL, "HFL"},
++      {"Ext Spk", NULL, "HFR"},
++
++      /* Headset Mic: HSMIC with bias */
++      {"HSMIC", NULL, "Headset Mic Bias"},
++      {"Headset Mic Bias", NULL, "Headset Mic"},
++
++      /* Headset Stereophone (Headphone): HSOL, HSOR */
++      {"Headset Stereophone", NULL, "HSOL"},
++      {"Headset Stereophone", NULL, "HSOR"},
++};
++
++static int omap3touchbook_twl4030_init(struct snd_soc_codec *codec)
++{
++      int ret;
++
++      /* Add omap3touchbook specific widgets */
++      ret = snd_soc_dapm_new_controls(codec, omap3touchbook_twl4030_dapm_widgets,
++                              ARRAY_SIZE(omap3touchbook_twl4030_dapm_widgets));
++      if (ret)
++              return ret;
++
++      /* Set up omap3touchbook specific audio path audio_map */
++      snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
++
++      /* omap3touchbook connected pins */
++      snd_soc_dapm_enable_pin(codec, "Ext Mic");
++      snd_soc_dapm_enable_pin(codec, "Ext Spk");
++      snd_soc_dapm_disable_pin(codec, "Headset Mic");
++      snd_soc_dapm_disable_pin(codec, "Headset Stereophone");
++
++      /* TWL4030 not connected pins */
++      snd_soc_dapm_nc_pin(codec, "CARKITMIC");
++      snd_soc_dapm_nc_pin(codec, "DIGIMIC0");
++      snd_soc_dapm_nc_pin(codec, "DIGIMIC1");
++      snd_soc_dapm_nc_pin(codec, "OUTL");
++      snd_soc_dapm_nc_pin(codec, "OUTR");
++      snd_soc_dapm_nc_pin(codec, "EARPIECE");
++      snd_soc_dapm_nc_pin(codec, "PREDRIVEL");
++      snd_soc_dapm_nc_pin(codec, "PREDRIVER");
++      snd_soc_dapm_nc_pin(codec, "CARKITL");
++      snd_soc_dapm_nc_pin(codec, "CARKITR");
++
++      ret = snd_soc_dapm_sync(codec);
++      if (ret)
++              return ret;
++
++      /* Headset jack detection */
++      ret = snd_soc_jack_new(&snd_soc_omap3touchbook, "Headset Jack",
++                              SND_JACK_HEADSET, &hs_jack);
++      if (ret)
++              return ret;
++
++      ret = snd_soc_jack_add_pins(&hs_jack, ARRAY_SIZE(hs_jack_pins),
++                              hs_jack_pins);
++      if (ret)
++              return ret;
++
++      ret = snd_soc_jack_add_gpios(&hs_jack, ARRAY_SIZE(hs_jack_gpios),
++                              hs_jack_gpios);
++
++      return ret;
++}
++
++/* Digital audio interface glue - connects codec <--> CPU */
++static struct snd_soc_dai_link omap3touchbook_dai = {
++              .name = "TWL4030 I2S",
++              .stream_name = "TWL4030 Audio",
++              .cpu_dai = &omap_mcbsp_dai[0],
++              .codec_dai = &twl4030_dai[TWL4030_DAI_HIFI],
++              .init = omap3touchbook_twl4030_init,
++              .ops = &omap3touchbook_ops,
++};
++
++/* Audio machine driver */
++static struct snd_soc_card snd_soc_omap3touchbook = {
++      .name = "omap3touchbook",
++      .platform = &omap_soc_platform,
++      .dai_link = &omap3touchbook_dai,
++      .num_links = 1,
++};
++
++/* twl4030 setup */
++static struct twl4030_setup_data twl4030_setup = {
++      .ramp_delay_value = 3,
++      .sysclk = 26000,
++      .hs_extmute = 1,
++};
++
++/* Audio subsystem */
++static struct snd_soc_device omap3touchbook_snd_devdata = {
++      .card = &snd_soc_omap3touchbook,
++      .codec_dev = &soc_codec_dev_twl4030,
++      .codec_data = &twl4030_setup,
++};
++
++static struct platform_device *omap3touchbook_snd_device;
++
++static int __init omap3touchbook_soc_init(void)
++{
++      int ret;
++      u8 pin_mux;
++
++      if (!machine_is_touchbook()) {
++              pr_debug("Not Touch Book!\n");
++              //return -ENODEV;
++      }
++      printk(KERN_INFO "Touch Book SoC init\n");
++
++      omap3touchbook_snd_device = platform_device_alloc("soc-audio", -1);
++      if (!omap3touchbook_snd_device) {
++              printk(KERN_ERR "Platform device allocation failed\n");
++              return -ENOMEM;
++      }
++
++      platform_set_drvdata(omap3touchbook_snd_device, &omap3touchbook_snd_devdata);
++      omap3touchbook_snd_devdata.dev = &omap3touchbook_snd_device->dev;
++      *(unsigned int *)omap3touchbook_dai.cpu_dai->private_data = 1; /* McBSP2 */
++
++      ret = platform_device_add(omap3touchbook_snd_device);
++      if (ret)
++              goto err1;
++
++      return 0;
++
++err1:
++      printk(KERN_ERR "Unable to add platform device\n");
++      platform_device_put(omap3touchbook_snd_device);
++
++      return ret;
++}
++module_init(omap3touchbook_soc_init);
++
++static void __exit omap3touchbook_soc_exit(void)
++{
++      snd_soc_jack_free_gpios(&hs_jack, ARRAY_SIZE(hs_jack_gpios),
++                              hs_jack_gpios);
++
++      platform_device_unregister(omap3touchbook_snd_device);
++}
++module_exit(omap3touchbook_soc_exit);
++
++MODULE_AUTHOR("Gregoire Gentil <gregoire@gentil.com>");
++MODULE_LICENSE("GPL");
+-- 
+1.6.6.1
+
diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0015-backlight-add-PWM-support.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0015-backlight-add-PWM-support.patch
new file mode 100644 (file)
index 0000000..b39e9c3
--- /dev/null
@@ -0,0 +1,126 @@
+From 3fee6c0a358921e87c9c3807148bc306641592bb Mon Sep 17 00:00:00 2001
+From: Gregoire Gentil <gregoire@gentil.com>
+Date: Wed, 31 Mar 2010 11:14:04 +0200
+Subject: [PATCH 15/16] backlight: add PWM support
+
+---
+ drivers/video/backlight/backlight.c |   81 +++++++++++++++++++++++++++++++++++
+ include/linux/backlight.h           |    3 +
+ 2 files changed, 84 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
+index 7898707..615f40f 100644
+--- a/drivers/video/backlight/backlight.c
++++ b/drivers/video/backlight/backlight.c
+@@ -226,6 +226,84 @@ static void bl_device_release(struct device *dev)
+       kfree(bd);
+ }
++static ssize_t backlight_show_boost(struct device *dev, struct device_attribute *attr, char *buf)
++{
++      struct backlight_device *bd = to_backlight_device(dev);
++      return sprintf(buf, "%u\n", bd->props.boost);
++}
++
++static ssize_t backlight_store_boost(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
++{
++      unsigned long i;
++      struct backlight_device *bd = to_backlight_device(dev);
++
++        if (strict_strtoul(buf, 10, &i))
++              return -EINVAL;
++
++      mutex_lock(&bd->ops_lock);
++      if (bd->ops)
++      {
++              if (i)
++                      bd->props.boost = 1;
++              else
++                      bd->props.boost = 0;
++              backlight_update_status(bd);
++      }
++      mutex_unlock(&bd->ops_lock);
++
++      return count;
++}
++
++static ssize_t backlight_show_pwm_fq(struct device *dev, struct device_attribute *attr, char *buf)
++{
++      struct backlight_device *bd = to_backlight_device(dev);
++      return sprintf(buf, "%u\n", bd->props.pwm_fq);
++}
++
++static ssize_t backlight_store_pwm_fq(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
++{
++      unsigned long i;
++      struct backlight_device *bd = to_backlight_device(dev);
++
++        if (strict_strtoul(buf, 10, &i))
++              return -EINVAL;
++
++      mutex_lock(&bd->ops_lock);
++      if (bd->ops)
++      {
++              bd->props.pwm_fq = i;
++              backlight_update_status(bd);
++      }
++      mutex_unlock(&bd->ops_lock);
++
++      return count;
++}
++
++static ssize_t backlight_show_min_duty(struct device *dev, struct device_attribute *attr, char *buf)
++{
++      struct backlight_device *bd = to_backlight_device(dev);
++      return sprintf(buf, "%u\n", bd->props.min_duty);
++}
++
++static ssize_t backlight_store_min_duty(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
++{
++      unsigned long i;
++      struct backlight_device *bd = to_backlight_device(dev);
++
++        if (strict_strtoul(buf, 10, &i))
++              return -EINVAL;
++
++      mutex_lock(&bd->ops_lock);
++      if (bd->ops)
++      {
++              bd->props.min_duty = i;
++              backlight_update_status(bd);
++      }
++      mutex_unlock(&bd->ops_lock);
++
++      return count;
++}
++
+ static struct device_attribute bl_device_attributes[] = {
+       __ATTR(bl_power, 0644, backlight_show_power, backlight_store_power),
+       __ATTR(brightness, 0666, backlight_show_brightness,
+@@ -233,6 +311,9 @@ static struct device_attribute bl_device_attributes[] = {
+       __ATTR(actual_brightness, 0444, backlight_show_actual_brightness,
+                    NULL),
+       __ATTR(max_brightness, 0444, backlight_show_max_brightness, NULL),
++      __ATTR(boost, 0666, backlight_show_boost, backlight_store_boost),
++      __ATTR(pwm_fq, 0666, backlight_show_pwm_fq, backlight_store_pwm_fq),
++      __ATTR(min_duty, 0666, backlight_show_min_duty, backlight_store_min_duty),
+       __ATTR_NULL,
+ };
+diff --git a/include/linux/backlight.h b/include/linux/backlight.h
+index 0f5f578..f3a9b9f 100644
+--- a/include/linux/backlight.h
++++ b/include/linux/backlight.h
+@@ -64,6 +64,9 @@ struct backlight_properties {
+       int fb_blank;
+       /* Flags used to signal drivers of state changes */
+       /* Upper 4 bits are reserved for driver internal use */
++      int boost;
++      int pwm_fq;
++      int min_duty;
+       unsigned int state;
+ #define BL_CORE_SUSPENDED     (1 << 0)        /* backlight is suspended */
+-- 
+1.6.6.1
+
@@ -1,14 +1,14 @@
-From d732dfd967b870ea5effa599d501996b620a1f60 Mon Sep 17 00:00:00 2001
+From bd54c9c7527199156f6cd16bf3e02ebf9d663feb Mon Sep 17 00:00:00 2001
 From: Gregoire Gentil <gregoire@gentil.com>
 Date: Fri, 12 Mar 2010 11:49:16 +0100
-Subject: [PATCH 06/14] ARM: OMAP: omap3-touchbook: update boardfile
+Subject: [PATCH 16/16] ARM: OMAP: omap3-touchbook: update boardfile
 
 ---
- arch/arm/mach-omap2/board-omap3touchbook.c |  390 +++++++++++++++++++++-------
- 1 files changed, 301 insertions(+), 89 deletions(-)
+ arch/arm/mach-omap2/board-omap3touchbook.c |  394 +++++++++++++++++++++-------
+ 1 files changed, 305 insertions(+), 89 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
-index fc3e03c..4f89cf3 100644
+index fc3e03c..3628362 100644
 --- a/arch/arm/mach-omap2/board-omap3touchbook.c
 +++ b/arch/arm/mach-omap2/board-omap3touchbook.c
 @@ -33,6 +33,7 @@
@@ -343,7 +343,7 @@ index fc3e03c..4f89cf3 100644
  };
  
  static void __init omap3touchbook_flash_init(void)
-@@ -512,6 +559,166 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
+@@ -512,6 +559,170 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
        .reset_gpio_port[2]  = -EINVAL
  };
  
@@ -455,16 +455,17 @@ index fc3e03c..4f89cf3 100644
 +      */
 +
 +      /* Halve input brightness */
-+      value /= 2;
++      if (!bd->props.boost)
++                      value /= 2;
 +
 +      /* For maximum brightness, just stop the timer... */
 +      if(value != bd->props.max_brightness)
 +      {
 +              /* Load the appropriate value for 200Hz PWM */
-+              u32 period = clk_get_rate(omap_dm_timer_get_fclk(touchbook_backlight_pwm)) / 200;
++              u32 period = clk_get_rate(omap_dm_timer_get_fclk(touchbook_backlight_pwm)) / bd->props.pwm_fq;
 +
 +              /* Minimum duty cycle is 15% */
-+              u32 minimum = (period * 3) / 20;
++              u32 minimum = (period * bd->props.min_duty) / 100;
 +              u32 maximum = (period * 17) / 20;
 +
 +              /* Work out match value */
@@ -502,6 +503,9 @@ index fc3e03c..4f89cf3 100644
 +
 +              bd->props.max_brightness = 100;
 +              bd->props.brightness = touchbook_backlight_brightness;
++              bd->props.boost = 0;
++              bd->props.min_duty = 15;
++              bd->props.pwm_fq = 200;
 +      }
 +
 +      touchbook_backlight_update(bd);
@@ -510,7 +514,7 @@ index fc3e03c..4f89cf3 100644
  static void omap3_touchbook_poweroff(void)
  {
        int r;
-@@ -525,33 +732,27 @@ static void omap3_touchbook_poweroff(void)
+@@ -525,33 +736,27 @@ static void omap3_touchbook_poweroff(void)
        gpio_direction_output(TB_KILL_POWER_GPIO, 0);
  }
  
@@ -548,7 +552,7 @@ index fc3e03c..4f89cf3 100644
        usb_musb_init();
        usb_ehci_init(&ehci_pdata);
        omap3touchbook_flash_init();
-@@ -559,6 +760,17 @@ static void __init omap3_touchbook_init(void)
+@@ -559,6 +764,17 @@ static void __init omap3_touchbook_init(void)
        /* Ensure SDRC pins are mux'd for self-refresh */
        omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
        omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
index cfb89da..991279b 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.32
-# Tue Mar 23 10:33:49 2010
+# Wed Mar 31 11:43:52 2010
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -105,7 +105,7 @@ CONFIG_SLAB=y
 # CONFIG_SLOB is not set
 CONFIG_PROFILING=y
 CONFIG_TRACEPOINTS=y
-CONFIG_OPROFILE=y
+CONFIG_OPROFILE=m
 CONFIG_HAVE_OPROFILE=y
 # CONFIG_KPROBES is not set
 CONFIG_HAVE_KPROBES=y
@@ -258,7 +258,6 @@ CONFIG_OMAP_LL_DEBUG_UART3=y
 CONFIG_OMAP_PM_SRF=y
 CONFIG_ARCH_OMAP34XX=y
 CONFIG_ARCH_OMAP3430=y
-CONFIG_OMAP_PACKAGE_CBB=y
 
 #
 # OMAP Board Type
@@ -838,28 +837,28 @@ CONFIG_KS959_DONGLE=m
 CONFIG_USB_IRDA=m
 CONFIG_SIGMATEL_FIR=m
 CONFIG_MCS_FIR=m
-CONFIG_BT=y
-CONFIG_BT_L2CAP=y
-CONFIG_BT_SCO=y
-CONFIG_BT_RFCOMM=y
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
 CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=y
+CONFIG_BT_BNEP=m
 CONFIG_BT_BNEP_MC_FILTER=y
 CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_HIDP=y
+CONFIG_BT_HIDP=m
 
 #
 # Bluetooth device drivers
 #
-CONFIG_BT_HCIBTUSB=y
-CONFIG_BT_HCIBTSDIO=y
-CONFIG_BT_HCIUART=y
+CONFIG_BT_HCIBTUSB=m
+CONFIG_BT_HCIBTSDIO=m
+CONFIG_BT_HCIUART=m
 CONFIG_BT_HCIUART_H4=y
 CONFIG_BT_HCIUART_BCSP=y
 CONFIG_BT_HCIUART_LL=y
-CONFIG_BT_HCIBCM203X=y
-CONFIG_BT_HCIBPA10X=y
-CONFIG_BT_HCIBFUSB=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
 # CONFIG_BT_HCIVHCI is not set
 # CONFIG_BT_MRVL is not set
 CONFIG_AF_RXRPC=m
@@ -872,7 +871,7 @@ CONFIG_WEXT_CORE=y
 CONFIG_WEXT_PROC=y
 CONFIG_WEXT_SPY=y
 CONFIG_WEXT_PRIV=y
-CONFIG_CFG80211=y
+CONFIG_CFG80211=m
 # CONFIG_NL80211_TESTMODE is not set
 # CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
 # CONFIG_CFG80211_REG_DEBUG is not set
@@ -882,11 +881,11 @@ CONFIG_WIRELESS_OLD_REGULATORY=y
 CONFIG_CFG80211_WEXT=y
 CONFIG_WIRELESS_EXT_SYSFS=y
 CONFIG_LIB80211=y
-CONFIG_LIB80211_CRYPT_WEP=y
-CONFIG_LIB80211_CRYPT_CCMP=y
-CONFIG_LIB80211_CRYPT_TKIP=y
+CONFIG_LIB80211_CRYPT_WEP=m
+CONFIG_LIB80211_CRYPT_CCMP=m
+CONFIG_LIB80211_CRYPT_TKIP=m
 # CONFIG_LIB80211_DEBUG is not set
-CONFIG_MAC80211=y
+CONFIG_MAC80211=m
 CONFIG_MAC80211_RC_PID=y
 CONFIG_MAC80211_RC_MINSTREL=y
 CONFIG_MAC80211_RC_DEFAULT_PID=y
@@ -898,7 +897,7 @@ CONFIG_MAC80211_LEDS=y
 # CONFIG_MAC80211_DEBUG_MENU is not set
 CONFIG_WIMAX=m
 CONFIG_WIMAX_DEBUG_LEVEL=8
-CONFIG_RFKILL=y
+CONFIG_RFKILL=m
 CONFIG_RFKILL_LEDS=y
 CONFIG_RFKILL_INPUT=y
 CONFIG_NET_9P=m
@@ -1136,52 +1135,52 @@ CONFIG_EQUALIZER=m
 CONFIG_TUN=m
 CONFIG_VETH=m
 # CONFIG_NET_ETHERNET is not set
-CONFIG_MII=y
+CONFIG_MII=m
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
 CONFIG_WLAN=y
 # CONFIG_LIBERTAS_THINFIRM is not set
 # CONFIG_AT76C50X_USB is not set
-CONFIG_USB_ZD1201=y
-CONFIG_USB_NET_RNDIS_WLAN=y
-CONFIG_RTL8187=y
+CONFIG_USB_ZD1201=m
+CONFIG_USB_NET_RNDIS_WLAN=m
+CONFIG_RTL8187=m
 CONFIG_RTL8187_LEDS=y
 # CONFIG_MAC80211_HWSIM is not set
 # CONFIG_ATH_COMMON is not set
-CONFIG_B43=y
+CONFIG_B43=m
 # CONFIG_B43_SDIO is not set
 CONFIG_B43_PHY_LP=y
 CONFIG_B43_LEDS=y
 CONFIG_B43_HWRNG=y
 # CONFIG_B43_DEBUG is not set
 # CONFIG_B43LEGACY is not set
-CONFIG_HOSTAP=y
+CONFIG_HOSTAP=m
 CONFIG_HOSTAP_FIRMWARE=y
 CONFIG_HOSTAP_FIRMWARE_NVRAM=y
 # CONFIG_IWM is not set
-CONFIG_LIBERTAS=y
-CONFIG_LIBERTAS_USB=y
+CONFIG_LIBERTAS=m
+CONFIG_LIBERTAS_USB=m
 # CONFIG_LIBERTAS_SDIO is not set
 # CONFIG_LIBERTAS_SPI is not set
 # CONFIG_LIBERTAS_DEBUG is not set
-CONFIG_P54_COMMON=y
-CONFIG_P54_USB=y
+CONFIG_P54_COMMON=m
+CONFIG_P54_USB=m
 # CONFIG_P54_SPI is not set
 CONFIG_P54_LEDS=y
-CONFIG_RT2X00=y
-CONFIG_RT2500USB=y
-CONFIG_RT73USB=y
-CONFIG_RT2800USB=y
-CONFIG_RT2800_LIB=y
-CONFIG_RT2X00_LIB_USB=y
-CONFIG_RT2X00_LIB=y
+CONFIG_RT2X00=m
+CONFIG_RT2500USB=m
+CONFIG_RT73USB=m
+CONFIG_RT2800USB=m
+CONFIG_RT2800_LIB=m
+CONFIG_RT2X00_LIB_USB=m
+CONFIG_RT2X00_LIB=m
 CONFIG_RT2X00_LIB_HT=y
 CONFIG_RT2X00_LIB_FIRMWARE=y
 CONFIG_RT2X00_LIB_CRYPTO=y
 CONFIG_RT2X00_LIB_LEDS=y
 # CONFIG_RT2X00_DEBUG is not set
 # CONFIG_WL12XX is not set
-CONFIG_ZD1211RW=y
+CONFIG_ZD1211RW=m
 # CONFIG_ZD1211RW_DEBUG is not set
 
 #
@@ -1193,29 +1192,29 @@ CONFIG_ZD1211RW=y
 #
 # USB Network Adapters
 #
-CONFIG_USB_CATC=y
-CONFIG_USB_KAWETH=y
-CONFIG_USB_PEGASUS=y
-CONFIG_USB_RTL8150=y
-CONFIG_USB_USBNET=y
-CONFIG_USB_NET_AX8817X=y
-CONFIG_USB_NET_CDCETHER=y
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
 # CONFIG_USB_NET_CDC_EEM is not set
-CONFIG_USB_NET_DM9601=y
-CONFIG_USB_NET_SMSC95XX=y
-CONFIG_USB_NET_GL620A=y
-CONFIG_USB_NET_NET1080=y
-CONFIG_USB_NET_PLUSB=y
-CONFIG_USB_NET_MCS7830=y
-CONFIG_USB_NET_RNDIS_HOST=y
-CONFIG_USB_NET_CDC_SUBSET=y
+CONFIG_USB_NET_DM9601=m
+CONFIG_USB_NET_SMSC95XX=m
+CONFIG_USB_NET_GL620A=m
+CONFIG_USB_NET_NET1080=m
+CONFIG_USB_NET_PLUSB=m
+CONFIG_USB_NET_MCS7830=m
+CONFIG_USB_NET_RNDIS_HOST=m
+CONFIG_USB_NET_CDC_SUBSET=m
 CONFIG_USB_ALI_M5632=y
 CONFIG_USB_AN2720=y
 CONFIG_USB_BELKIN=y
 CONFIG_USB_ARMLINUX=y
 CONFIG_USB_EPSON2888=y
 CONFIG_USB_KC2190=y
-CONFIG_USB_NET_ZAURUS=y
+CONFIG_USB_NET_ZAURUS=m
 # CONFIG_USB_HSO is not set
 # CONFIG_USB_NET_INT51X1 is not set
 # CONFIG_WAN is not set
@@ -2040,8 +2039,8 @@ CONFIG_SOUND_OSS_CORE_PRECLAIM=y
 CONFIG_SND=y
 CONFIG_SND_TIMER=y
 CONFIG_SND_PCM=y
-CONFIG_SND_HWDEP=y
-CONFIG_SND_RAWMIDI=y
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
 CONFIG_SND_JACK=y
 CONFIG_SND_SEQUENCER=m
 # CONFIG_SND_SEQ_DUMMY is not set
@@ -2070,7 +2069,7 @@ CONFIG_SND_VIRMIDI=m
 # CONFIG_SND_ARM is not set
 CONFIG_SND_SPI=y
 CONFIG_SND_USB=y
-CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_USB_AUDIO=m
 CONFIG_SND_USB_CAIAQ=m
 CONFIG_SND_USB_CAIAQ_INPUT=y
 CONFIG_SND_SOC=y
index 27e40e0..dbd33de 100644 (file)
@@ -56,16 +56,18 @@ SRC_URI_append_omap3-touchbook = " \
                                   file://0002-MMA7455L-accelerometer-driver.patch;patch=1 \
                                   file://0003-bq27x00_battery-remove-error-message-output.patch;patch=1 \
                                   file://0004-bq27x00_battery-add-charged-gpio.patch;patch=1 \
-                                  file://0005-ARM-OMAP-Hack-beagle-asoc-driver-to-support-touchboo.patch;patch=1 \
-                                  file://0006-ARM-OMAP-omap3-touchbook-update-boardfile.patch;patch=1 \
-                                  file://0007-adf7846-add-more-debugging.patch;patch=1 \
-                                  file://0008-ads7846-read-max-mix-x-y-from-pdata.patch;patch=1 \
-                                  file://0009-ads7846-add-settling-delay-to-pdata.patch;patch=1 \
-                                  file://0010-Touch-Book-turn-on-off-the-class-D-amplifier-dependi.patch;patch=1 \
-                                  file://0011-DSS2-Fix-scaling-checks-when-rotation-is-90-or-270-d.patch;patch=1 \
-                                  file://0012-add-touchbook-hid-driver.patch;patch=1 \
-                                  file://0013-Make-backlight-controls-accessible-to-users.patch;patch=1 \
-                                  file://0014-ads7846-don-t-error-out-when-there-s-no-pendown-gpio.patch;patch=1 \
+                                  file://0005-adf7846-add-more-debugging.patch;patch=1 \
+                                  file://0006-ads7846-read-max-mix-x-y-from-pdata.patch;patch=1 \
+                                  file://0007-ads7846-add-settling-delay-to-pdata.patch;patch=1 \
+                                  file://0008-DSS2-OMAPFB-Translate-X-Y-coordinates-for-the-video-.patch;patch=1 \
+                                  file://0009-DSS2-fix-rotation-offsets.patch;patch=1 \
+                                  file://0010-DSS2-Fix-scaling-checks-when-rotation-is-90-or-270-d.patch;patch=1 \
+                                  file://0011-add-touchbook-hid-driver.patch;patch=1 \
+                                  file://0012-Make-backlight-controls-accessible-to-users.patch;patch=1 \
+                                  file://0013-ads7846-don-t-error-out-when-there-s-no-pendown-gpio.patch;patch=1 \
+                                  file://0014-ASoC-add-driver-for-omap3-touchbook.patch;patch=1 \
+                                  file://0015-backlight-add-PWM-support.patch;patch=1 \
+                                  file://0016-ARM-OMAP-omap3-touchbook-update-boardfile.patch;patch=1 \
 "
 
 addtask quiltfixup before do_patch after do_unpack