[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.3-23-g8c11f1a
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2014-01-12 13:10:21
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 8c11f1ae6a6c1ebfd33080793c1d9e7915a84e22 (commit)
via 6745a4016f12eb642b87693dad3fe33a78d717e6 (commit)
from 9822ec4dca10f90ce2486e356f8edcd33028d87f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8c11f1ae6a6c1ebfd33080793c1d9e7915a84e22
Author: Eric Jarrige <eri...@ar...>
Date: Sun Jan 12 14:09:48 2014 +0100
[LINUX] 3.12: apf27dev: rename touchscreen patch
commit 6745a4016f12eb642b87693dad3fe33a78d717e6
Author: Yvan Roch <yva...@gm...>
Date: Thu Jan 9 17:58:21 2014 +0100
[LINUX] 3.12.6: APF27: Touchscreen tsc210x: support with device tree
Hello,
First,I wish you an happy new year!
These days, I have try the mainline kernel 3.12.6 for APF27 with the
device tree.
The framebuffer works well, but the touchscreen doesn't work due to
lack of device tree support in the tsc210x driver.
I attach 2 patches to fix this issue.
The first patch the APF27Dev DTS.
The second patch the tsc210x driver.
To use them, patch the armadeus git repo with git am and make
apf27mainline_defconfig.
Have fun,
Yvan.
From b346df64424efd3994ee3be3e499e087b838f119 Mon Sep 17 00:00:00 2001
From: Yvan Roch <yva...@gm...>
Date: Thu, 9 Jan 2014 17:19:38 +0100
Subject: [PATCH 1/2] Add tsc210x device tree support for apf27dev
Signed-off-by: Yvan Roch <yva...@gm...>
-----------------------------------------------------------------------
Summary of changes:
.../0076-Add-tsc210x-device-tree-support.patch | 117 ++++++++++++++++++++
...-tsc210x-device-tree-support-for-apf27dev.patch | 34 ++++++
2 files changed, 151 insertions(+), 0 deletions(-)
create mode 100644 patches/linux/3.12/0076-Add-tsc210x-device-tree-support.patch
create mode 100644 patches/linux/3.12/0219-Add-tsc210x-device-tree-support-for-apf27dev.patch
diff --git a/patches/linux/3.12/0076-Add-tsc210x-device-tree-support.patch b/patches/linux/3.12/0076-Add-tsc210x-device-tree-support.patch
new file mode 100644
index 0000000..7f1f0c2
--- /dev/null
+++ b/patches/linux/3.12/0076-Add-tsc210x-device-tree-support.patch
@@ -0,0 +1,117 @@
+
+Add tsc210x device tree support for apf27dev
+
+Signed-off-by: Yvan Roch <yva...@gm...>
+---
+ drivers/spi/tsc2102.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 64 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/spi/tsc2102.c b/drivers/spi/tsc2102.c
+index 47e67a3..d19cba2 100644
+--- a/drivers/spi/tsc2102.c
++++ b/drivers/spi/tsc2102.c
+@@ -41,6 +41,10 @@
+ #include <asm/irq.h>
+ #include <asm/io.h>
+
++#ifdef CONFIG_OF
++#include <linux/of_device.h>
++#endif
++
+ #ifdef CONFIG_APM
+ #include <asm/apm.h>
+ #endif
+@@ -83,6 +87,16 @@
+ #define SM_TEMP1 1
+ #define SM_SUSPENDED 2
+
++#ifdef CONFIG_OF
++static struct of_device_id tsc210x_spi_of_match[] = {
++ {
++ .compatible = "tsc210x",
++ },
++ { },
++};
++MODULE_DEVICE_TABLE(of, tsc210x_spi_of_match);
++#endif
++
+ struct tsc210x_spi_req {
+ struct spi_device *dev;
+ uint16_t command;
+@@ -380,7 +394,6 @@ static irqreturn_t tsc2102_handler(int irq, void *dev_id)
+
+ schedule_work(&dev->work);
+ }
+-
+ return IRQ_HANDLED;
+ }
+
+@@ -1075,7 +1088,54 @@ static int tsc210x_probe(struct spi_device *spi)
+ struct spi_transfer *spi_buffer;
+ int err = -EINVAL;
+ u16 rev_id = 0;
++#ifdef CONFIG_OF
++ const struct of_device_id *match;
++ int status;
+
++ pdata = kzalloc(sizeof(struct tsc210x_config), GFP_KERNEL);
++ if (!pdata) {
++ dev_err(&spi->dev, "No memory for tsc210x_config\n");
++ return -ENOMEM;
++ }
++ spi->dev.platform_data = pdata;
++ match = of_match_device(of_match_ptr(tsc210x_spi_of_match), &spi->dev);
++ if (match) {
++ status = of_property_read_u32(spi->dev.of_node,
++ "tsc210x-mclk", &pdata->mclk);
++ if (status) {
++ dev_err(&spi->dev, "DT has no tsc210x-mclk\n");
++ return -ENODEV;
++ }
++ dev_dbg(&spi->dev,"mclk %d\n",pdata->mclk);
++
++ status = of_property_read_u32(spi->dev.of_node,
++ "tsc210x-use_internal", &pdata->use_internal);
++ if (status) {
++ dev_err(&spi->dev, "DT has no tsc210x-use_internal\n");
++ return -ENODEV;
++ }
++ dev_dbg(&spi->dev,"use_internal %d\n",pdata->use_internal);
++
++ status = of_property_read_u32(spi->dev.of_node,
++ "tsc210x-monitor", &pdata->monitor);
++ if (status) {
++ dev_err(&spi->dev, "DT has no tsc210x-monitor\n");
++ return -ENODEV;
++ }
++ dev_dbg(&spi->dev,"monitor %d\n",pdata->monitor);
++
++ status = of_property_read_u32(spi->dev.of_node,
++ "tsc210x-irq", &spi->irq);
++ if (status) {
++ dev_err(&spi->dev, "DT has no tsc210x-irq\n");
++ return -ENODEV;
++ }
++ dev_dbg(&spi->dev,"irq %d\n",spi->irq);
++ } else {
++ dev_err(&spi->dev,"DT has no tsc210x node\n");
++ return -ENODEV;
++ }
++#endif
+ if (!pdata) {
+ printk(KERN_ERR "TSC210x: Platform data not supplied\n");
+ return -ENOENT;
+@@ -1263,7 +1323,9 @@ static int tsc210x_remove(struct spi_device *spi)
+ apm_get_power_status = 0;
+ #endif
+ free_irq(spi->irq, &tsc);
+-
++#ifdef CONFIG_OF
++ kfree(dev->pdata);
++#endif
+ mutex_unlock(&dev->lock_sync);
+
+ return 0;
+--
+1.8.4.2
+
diff --git a/patches/linux/3.12/0219-Add-tsc210x-device-tree-support-for-apf27dev.patch b/patches/linux/3.12/0219-Add-tsc210x-device-tree-support-for-apf27dev.patch
new file mode 100644
index 0000000..08babe4
--- /dev/null
+++ b/patches/linux/3.12/0219-Add-tsc210x-device-tree-support-for-apf27dev.patch
@@ -0,0 +1,34 @@
+
+Add tsc210x device tree support for apf27dev
+
+Signed-off-by: Yvan Roch <yva...@gm...>
+---
+ arch/arm/boot/dts/imx27-apf27dev.dts | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx27-apf27dev.dts b/arch/arm/boot/dts/imx27-apf27dev.dts
+index 39a8cb4..cfa797f 100644
+--- a/arch/arm/boot/dts/imx27-apf27dev.dts
++++ b/arch/arm/boot/dts/imx27-apf27dev.dts
+@@ -72,6 +72,18 @@
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_cspi2_1>;
+ status = "okay";
++ tsc210x@0 {
++ compatible = "tsc210x";
++ reg = <0>;
++ spi-max-frequency = <8000000>;
++ /* SPI mode = 0 */
++ spi-cpol = <0>;
++ spi-cpha = <0>;
++ tsc210x-mclk = <12288000>; /* MCLK value in Master mode */
++ tsc210x-use_internal = <1>; /* Use internal voltage reference */
++ tsc210x-monitor = <21>; /* TSC_BAT1 | TSC_AUX | TSC_TEMP */
++ tsc210x-irq = <257>; /* GPIO port 6 pin 17 (6-1)*32 + 17 + 64 + 16 */
++ };
+ };
+
+ &i2c1 {
+--
+1.8.4.2
+
hooks/post-receive
--
armadeus
|