diff options
| author | Koen Kooi <k-kooi@ti.com> | 2010-03-31 12:01:25 +0200 |
|---|---|---|
| committer | Koen Kooi <koen@openembedded.org> | 2010-04-12 19:43:31 +0200 |
| commit | a13876b305618e4491524d287f47f0c2f7eafa74 (patch) | |
| tree | bcbdc307f931a2bebbe4d0469e565bc911bc5d63 | |
| parent | a4c06e0afce07bca6223eedea39de8d0ab34a94f (diff) | |
linux-omap-psp 2.6.32: update touchbook patches and defconfig
20 files changed, 745 insertions, 277 deletions
diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0001-ARM-OMAP-add-spi-platform-devices.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0001-ARM-OMAP-add-spi-platform-devices.patch index f44abc3077..f1995f5148 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0001-ARM-OMAP-add-spi-platform-devices.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0001-ARM-OMAP-add-spi-platform-devices.patch @@ -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 ++++++++++++++++++++++++++++++++ diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0002-MMA7455L-accelerometer-driver.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0002-MMA7455L-accelerometer-driver.patch index 6a19217541..f8e76065ee 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0002-MMA7455L-accelerometer-driver.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0002-MMA7455L-accelerometer-driver.patch @@ -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 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0003-bq27x00_battery-remove-error-message-output.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0003-bq27x00_battery-remove-error-message-output.patch index 228f2aacbd..ad8017feda 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0003-bq27x00_battery-remove-error-message-output.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0003-bq27x00_battery-remove-error-message-output.patch @@ -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 ----- diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0004-bq27x00_battery-add-charged-gpio.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0004-bq27x00_battery-add-charged-gpio.patch index 670103287c..32b2c35b34 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0004-bq27x00_battery-add-charged-gpio.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0004-bq27x00_battery-add-charged-gpio.patch @@ -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 index 8d0cb2913e..0000000000 --- a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0005-ARM-OMAP-Hack-beagle-asoc-driver-to-support-touchboo.patch +++ /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 - diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0007-adf7846-add-more-debugging.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0005-adf7846-add-more-debugging.patch index d5942c8996..dd039e5aca 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0007-adf7846-add-more-debugging.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0005-adf7846-add-more-debugging.patch @@ -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 +++++++++++++++++++++++++++++++++++ diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0008-ads7846-read-max-mix-x-y-from-pdata.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0006-ads7846-read-max-mix-x-y-from-pdata.patch index 50c56fc1f7..b39e9b1c74 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0008-ads7846-read-max-mix-x-y-from-pdata.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0006-ads7846-read-max-mix-x-y-from-pdata.patch @@ -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 +++-- diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-ads7846-add-settling-delay-to-pdata.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0007-ads7846-add-settling-delay-to-pdata.patch index b60ab833f2..31a7568ef0 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-ads7846-add-settling-delay-to-pdata.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0007-ads7846-add-settling-delay-to-pdata.patch @@ -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 index 0000000000..e4c4361bcf --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0008-DSS2-OMAPFB-Translate-X-Y-coordinates-for-the-video-.patch @@ -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 index 0000000000..3a2f3b268b --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-DSS2-fix-rotation-offsets.patch @@ -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 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0011-DSS2-Fix-scaling-checks-when-rotation-is-90-or-270-d.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0010-DSS2-Fix-scaling-checks-when-rotation-is-90-or-270-d.patch index 5045500656..3a59b59ed6 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0011-DSS2-Fix-scaling-checks-when-rotation-is-90-or-270-d.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0010-DSS2-Fix-scaling-checks-when-rotation-is-90-or-270-d.patch @@ -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 index 1edce7b7c4..0000000000 --- a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0010-Touch-Book-turn-on-off-the-class-D-amplifier-dependi.patch +++ /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: diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0012-add-touchbook-hid-driver.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0011-add-touchbook-hid-driver.patch index d08cb45d3f..66aa43c43a 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0012-add-touchbook-hid-driver.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0011-add-touchbook-hid-driver.patch @@ -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 ++ diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0013-Make-backlight-controls-accessible-to-users.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0012-Make-backlight-controls-accessible-to-users.patch index 138de0b1b4..970a97bfe4 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0013-Make-backlight-controls-accessible-to-users.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0012-Make-backlight-controls-accessible-to-users.patch @@ -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 +- diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0014-ads7846-don-t-error-out-when-there-s-no-pendown-gpio.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0013-ads7846-don-t-error-out-when-there-s-no-pendown-gpio.patch index 84de1b7456..a2fa7d9c64 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0014-ads7846-don-t-error-out-when-there-s-no-pendown-gpio.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0013-ads7846-don-t-error-out-when-there-s-no-pendown-gpio.patch @@ -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 index 0000000000..3581fa7ceb --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0014-ASoC-add-driver-for-omap3-touchbook.patch @@ -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 co |
