[Armadeus-commitlog] armadeus branch, master, updated. release-3.2-372-ga42affd
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2010-05-31 12:30:41
|
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 a42affdc88b3abc4c5cf4d2ca524b590e9a8dd31 (commit)
via 8f6941ec584d6368dfdc7ebc18914a3fb8cbc011 (commit)
via 0e68dc80ae56e701bb39323ba54d53a4055cb3ee (commit)
via 6e93d12c3b95971789a723d2a9e0eade8f7185cd (commit)
from 6ff1c397a651fc663e2ccbe4d63d1679ba98ee75 (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 a42affdc88b3abc4c5cf4d2ca524b590e9a8dd31
Author: Julien Boibessot <jul...@ar...>
Date: Mon May 31 14:29:43 2010 +0200
[LINUX] ov7670: remove compilation warnings
commit 8f6941ec584d6368dfdc7ebc18914a3fb8cbc011
Author: Nicolas Colombain <nic...@ar...>
Date: Mon May 31 14:13:10 2010 +0200
[LINUX] tsc210x: improve suspend/resume
commit 0e68dc80ae56e701bb39323ba54d53a4055cb3ee
Author: Julien Boibessot <jul...@ar...>
Date: Mon May 31 11:00:09 2010 +0200
[LINUX] ov7670: improve suspend/resume.
commit 6e93d12c3b95971789a723d2a9e0eade8f7185cd
Author: Julien Boibessot <jul...@ar...>
Date: Fri May 28 16:03:55 2010 +0200
[BUILDROOT] Cleanup default /etc/profile
-----------------------------------------------------------------------
Summary of changes:
.../2.6.29/073-armadeus-tsc2102.patch | 99 ++++++++++++++++----
...adeus-soc_camera-add_ov7670_sensor_driver.patch | 99 +++++++++++++++++---
.../armadeus/rootfs/target_skeleton/etc/profile | 16 +--
3 files changed, 172 insertions(+), 42 deletions(-)
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch
index 17b2e6c..744af66 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch
@@ -4,7 +4,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
Index: linux-2.6.29.6/include/linux/spi/tsc2102.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/include/linux/spi/tsc2102.h 2010-03-30 15:55:09.000000000 +0200
++++ linux-2.6.29.6/include/linux/spi/tsc2102.h 2010-05-31 11:02:34.000000000 +0200
@@ -0,0 +1,306 @@
+/*
+ * include/linux/spi/tsc2102.h
@@ -315,8 +315,8 @@ Index: linux-2.6.29.6/include/linux/spi/tsc2102.h
Index: linux-2.6.29.6/drivers/spi/tsc2102.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/drivers/spi/tsc2102.c 2010-03-30 15:58:55.000000000 +0200
-@@ -0,0 +1,1250 @@
++++ linux-2.6.29.6/drivers/spi/tsc2102.c 2010-05-31 13:50:30.000000000 +0200
+@@ -0,0 +1,1311 @@
+/*
+ * drivers/spi/tsc2102.c
+ *
@@ -383,6 +383,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+#define TSC2102_RESET 0xbb00
+#define TSC2102_ADC_PSTCM (1 << 15)
+#define TSC2102_ADC_ADST (1 << 14)
++#define TSC2102_PWRDN (1 << 13)
+#define TSC2102_TS_DAV 0x0780
+#define TSC2102_PS_DAV 0x0078
+#define TSC2102_T1_DAV 0x0004
@@ -399,6 +400,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+
+#define SM_BAT_AUX 0
+#define SM_TEMP1 1
++#define SM_SUSPENDED 2
+
+struct tsc210x_spi_req {
+ struct spi_device *dev;
@@ -434,11 +436,11 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ struct spi_device *spi;
+
+ int bat[2], aux[2], temp;
++
+ struct device *hwmondev;
+ struct work_struct work;
+ unsigned long todo;
+#define WORK_CHANGE_MODE 0 /* change mode */
-+
+};
+
+static struct tsc210x_dev tsc;
@@ -547,7 +549,6 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+#define Z2STAT (1<<7)
+#define AXSTAT (3<<3)
+#define T1STAT (1<<2)
-+
+ int status;
+
+ mutex_lock(&tsc.lock_sync);
@@ -679,11 +680,11 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+{
+ struct tsc210x_dev *dev = (struct tsc210x_dev *) data;
+
-+// if(!test_bit( PENDOWN,&dev->todo)){
++ if (dev->state != SM_SUSPENDED) {
+ /* request change of SM state */
+ set_bit(WORK_CHANGE_MODE, &dev->todo);
+ schedule_work(&dev->work);
-+// }
++ }
+}
+
+/* TSC has new data for us available. */
@@ -691,11 +692,13 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+{
+ struct tsc210x_dev *dev = (struct tsc210x_dev *) dev_id;
+
-+ /* restart pen up timer */
-+ mod_timer(&tsc.ts_timer, jiffies +
-+ msecs_to_jiffies(tsc.ts_msecs));
++ if (dev->state != SM_SUSPENDED) {
++ /* restart pen up timer */
++ mod_timer(&tsc.ts_timer, jiffies +
++ msecs_to_jiffies(tsc.ts_msecs));
+
-+ schedule_work(&dev->work);
++ schedule_work(&dev->work);
++ }
+
+ return IRQ_HANDLED;
+}
@@ -704,8 +707,6 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+{
+ struct tsc210x_dev *dev = (struct tsc210x_dev *) data;
+
-+ //printk("pen up\n");
-+ //clear_bit(PENDOWN, &dev->todo);
+ if (dev->touch_cb)
+ dev->touch_cb(0);
+}
@@ -1265,24 +1266,75 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+static int
+tsc210x_suspend(struct spi_device *spi, pm_message_t state)
+{
++ int reg;
++ unsigned long timeout;
+ struct tsc210x_dev *dev = dev_get_drvdata(&spi->dev);
-+
+ if (!dev)
+ return 0;
+
+ mutex_lock(&dev->lock_sync);
+
++ dev->state = SM_SUSPENDED;
+ del_timer(&dev->mode_timer);
+ del_timer(&dev->ts_timer);
+ flush_scheduled_work();
+
++ tsc210x_write_sync(TSC2102_TS_STATUS_CTRL, TSC2102_ADC_PINTDAV);
++
+ if (dev->touch_cb)
+ dev->touch_cb(0);
+
-+ /* Abort current conversion and power down the ADC */
-+ tsc210x_write_sync(TSC2102_TS_ADC_CTRL, TSC2102_ADC_ADST);
++ /* shut down audio parts (start with DACs) */
++ /* mute DACs */
++ reg = tsc210x_read_sync(TSC210X_DAC_GAIN_CTRL);
++ tsc210x_write_sync(TSC210X_DAC_GAIN_CTRL, reg | DGC_DALMU | DGC_DARMU);
++ /* speaker power down */
++ reg = tsc210x_read_sync(TSC210X_CODEC_POWER_CTRL);
++ tsc210x_write_sync(TSC210X_CODEC_POWER_CTRL, reg | CPC_SP1PWDN | CPC_SP2PWDN);
++ /* wait until soft stepping is complete */
++ timeout = jiffies + HZ;
++ while ((tsc210x_read_sync(TSC210X_CODEC_POWER_CTRL) & (CPC_RDAPWDF | CPC_LDAPWDF)) !=
++ (CPC_RDAPWDF | CPC_LDAPWDF)) {
++ if (time_after(jiffies, timeout)) {
++ dev_err(&spi->dev, "unable to shut down speaker's DACs\n");
++ break;
++ }
++ }
++ /* finally power down DAC */
++ reg = tsc210x_read_sync(TSC210X_CODEC_POWER_CTRL);
++ tsc210x_write_sync(TSC210X_CODEC_POWER_CTRL, reg | CPC_DAPWDN);
++
++ /* ADC*/
++ if (tsc.kind == tsc2101) {
++ /* Headset mute */
++ reg = tsc210x_read_sync(TSC2101_HEADSET_AUX_PGA_CTRL);
++ tsc210x_write_sync(TSC2101_HEADSET_AUX_PGA_CTRL, reg | ADMUT_HED);
++ /* Handdset mute */
++ reg = tsc210x_read_sync(TSC2101_HANDSET_PGA_CTRL);
++ tsc210x_write_sync(TSC2101_HANDSET_PGA_CTRL, reg | ADMUT_HND);
++ /* cell mute */
++ reg = tsc210x_read_sync(TSC2101_CELL_BUZZER_PGA_CTRL);
++ tsc210x_write_sync(TSC2101_CELL_BUZZER_PGA_CTRL, reg | CPBGC_MUT_CP |
++ CPBGC_MUT_BU);
++ /* shut down mic bias, sidetone and vgnd */
++ reg = tsc210x_read_sync(TSC210X_CODEC_POWER_CTRL);
++ tsc210x_write_sync(TSC210X_CODEC_POWER_CTRL, reg |
++ CPC_MBIAS_HND | CPC_MBIAS_HED |
++ CPC_ASTPWD | CPC_VGPWDN |
++ CPC_ADPWDN);
++ /* wait until power down is complete */
++ timeout = jiffies + HZ;
++ while ((tsc210x_read_sync(TSC210X_CODEC_POWER_CTRL) & (CPC_ASTPWF|CPC_ADPWDF)) !=
++ (CPC_ASTPWF | CPC_ADPWDF)) {
++ if (time_after(jiffies, timeout)) {
++ dev_err(&spi->dev, "unable to shut down ADC %x\n", tsc210x_read_sync(TSC210X_CODEC_POWER_CTRL));
++ break;
++ }
++ }
++ }
+
+ dev->spi->dev.power.power_state = state;
++
+ mutex_unlock(&dev->lock_sync);
+
+ return 0;
@@ -1294,17 +1346,24 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+static int tsc210x_resume(struct spi_device *spi)
+{
+ struct tsc210x_dev *dev = dev_get_drvdata(&spi->dev);
-+ int err;
+
+ if (!dev)
+ return 0;
+
+ mutex_lock(&dev->lock_sync);
++
+ dev->spi->dev.power.power_state = PMSG_ON;
-+ err = tsc2102_configure(dev);
++ /* Init mode state machine */
++ dev->state = SM_BAT_AUX;
++ tsc210x_write_sync(TSC2102_TS_STATUS_CTRL, TSC2102_ADC_DAV);
++
+ mutex_unlock(&dev->lock_sync);
+
-+ return err;
++ /* Start mode timer */
++ mod_timer(&dev->mode_timer, jiffies +
++ msecs_to_jiffies(dev->mode_msecs));
++
++ return 0;
+}
+#else
+#define tsc210x_suspend NULL
@@ -1481,6 +1540,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ del_timer(&tsc.mode_timer);
+ flush_scheduled_work();
+ dev_set_drvdata(&spi->dev, NULL);
++ free_irq(spi->irq, &tsc);
+err_clk:
+/* clk_disable(tsc.bclk_ck); TODO add clock mechanism to i.MX ???
+ clk_put(tsc.bclk_ck);*/
@@ -1521,6 +1581,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+#ifdef CONFIG_APM
+ apm_get_power_status = 0;
+#endif
++ free_irq(spi->irq, &tsc);
+
+ mutex_unlock(&dev->lock_sync);
+
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/356-armadeus-soc_camera-add_ov7670_sensor_driver.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/356-armadeus-soc_camera-add_ov7670_sensor_driver.patch
index 7ce8588..bc1e9be 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/356-armadeus-soc_camera-add_ov7670_sensor_driver.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/356-armadeus-soc_camera-add_ov7670_sensor_driver.patch
@@ -6,8 +6,8 @@ Signed-off-by: Julien Boibessot <jul...@ar...>
Index: linux-2.6.29.6/drivers/media/video/ov7670_soc.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/drivers/media/video/ov7670_soc.c 2010-05-19 17:54:35.000000000 +0200
-@@ -0,0 +1,1607 @@
++++ linux-2.6.29.6/drivers/media/video/ov7670_soc.c 2010-05-31 14:23:25.000000000 +0200
+@@ -0,0 +1,1682 @@
+/*
+ * A V4L2 driver for OmniVision OV7670 cameras.
+ *
@@ -524,17 +524,41 @@ Index: linux-2.6.29.6/drivers/media/video/ov7670_soc.c
+
+static int ov7670_init(struct soc_camera_device *icd)
+{
-+/* struct ov7670 *ov7670 = container_of(icd, struct ov7670, icd);
-+ struct i2c_client *client = ov7670->i2c_client; */
++ struct ov7670 *ov7670 = container_of(icd, struct ov7670, icd);
++/* struct i2c_client *client = ov7670->i2c_client; */
++ struct soc_camera_link *icl = ov7670->i2c_client->dev.platform_data;
++ int ret;
++
++ printk(KERN_DEBUG "- %s\n", __func__);
++
++ if (icl->power) {
++ ret = icl->power(&ov7670->i2c_client->dev, 1);
++ if (ret < 0) {
++ dev_err(icd->vdev->parent,
++ "Platform failed to power-on the camera.\n");
++ return ret;
++ }
++ } else {
++ /* soft powerup ? */
++ }
+
+ return 0; /*ov7670_initialize(client);*/
+}
+
+static int ov7670_release(struct soc_camera_device *icd)
+{
-+ /* Disable the chip ?? */
-+ /* TBDJB */
++ struct ov7670 *ov7670 = container_of(icd, struct ov7670, icd);
++ struct soc_camera_link *icl = ov7670->i2c_client->dev.platform_data;
++
+ printk(KERN_DEBUG "- %s\n", __func__);
++
++ /* powerdown the chip */
++ if (icl->power) {
++ icl->power(&ov7670->i2c_client->dev, 0);
++ } else {
++ /* soft powerdown ? */
++ }
++
+ return 0;
+}
+
@@ -578,13 +602,12 @@ Index: linux-2.6.29.6/drivers/media/video/ov7670_soc.c
+ unsigned char v;
+ int ret;
+
++ printk(KERN_DEBUG "- %s\n", __func__);
+#if 0
+ ret = ov7670_initialize(client);
+ if (ret < 0)
+ return ret;
+#endif
-+ ov7670_read(client, REG_MIDH, &v); /* first access after a reset
-+ might fail */
+ ret = ov7670_read(client, REG_MIDH, &v);
+ if (ret < 0)
+ return ret;
@@ -1400,6 +1423,7 @@ Index: linux-2.6.29.6/drivers/media/video/ov7670_soc.c
+ return 0;
+}
+
++#ifdef DEBUG
+static int
+ov7670_proc_read_register( __attribute__ ((unused)) struct file *file,
+ const char *buf, unsigned long count,
@@ -1433,18 +1457,26 @@ Index: linux-2.6.29.6/drivers/media/video/ov7670_soc.c
+
+ return len;
+}
++#endif
+
+/* Interface active, can use i2c. If it fails, it can indeed mean, that
+ * this wasn't our capture interface, so, we wait for the right one */
+static int ov7670_video_probe(struct soc_camera_device *icd)
+{
+ struct ov7670 *ov7670 = container_of(icd, struct ov7670, icd);
++ struct soc_camera_link *icl = ov7670->i2c_client->dev.platform_data;
+#ifdef DEBUG
+ struct proc_dir_entry *proc_read/*, *proc_write*/;
+#endif
+ struct i2c_client *client = ov7670->i2c_client;
+ int ret;
+
++ if (icl->reset) {
++ ret = icl->reset(&ov7670->i2c_client->dev);
++ } else {
++ ov7670_reset(client); /* soft reset */
++ }
++
+ ret = ov7670_detect(client);
+ if (ret < 0) {
+ dev_err(&client->dev, "Unable to detect " DRIVER_NAME " sensor\n");
@@ -1491,10 +1523,53 @@ Index: linux-2.6.29.6/drivers/media/video/ov7670_soc.c
+ soc_camera_video_stop(icd);
+}
+
++static int ov7670_suspend(struct soc_camera_device *icd, pm_message_t state)
++{
++ struct ov7670 *ov7670 = container_of(icd, struct ov7670, icd);
++ struct soc_camera_link *icl = ov7670->i2c_client->dev.platform_data;
++ int ret;
++
++ printk("--- %s %d\n", __func__, state.event);
++
++ /* supposing camera link power() is a powerdown: */
++ if (icl->power) {
++ ret = icl->power(&ov7670->i2c_client->dev, 0);
++ if (ret < 0) {
++ dev_err(icd->vdev->parent,
++ "Platform failed to powerdown the camera.\n");
++ return ret;
++ }
++ }
++
++ return 0;
++}
++
++static int ov7670_resume(struct soc_camera_device *icd)
++{
++ struct ov7670 *ov7670 = container_of(icd, struct ov7670, icd);
++ struct soc_camera_link *icl = ov7670->i2c_client->dev.platform_data;
++ int ret;
++
++ printk("--- %s\n", __func__);
++
++ if (icl->power) {
++ ret = icl->power(&ov7670->i2c_client->dev, 1);
++ if (ret < 0) {
++ dev_err(icd->vdev->parent,
++ "Platform failed to resume the camera.\n");
++ return ret;
++ }
++ }
++
++ return 0;
++}
++
+static struct soc_camera_ops ov7670_ops = {
+ .owner = THIS_MODULE,
+ .probe = ov7670_video_probe,
+ .remove = ov7670_video_remove,
++ .suspend = ov7670_suspend,
++ .resume = ov7670_resume,
+ .init = ov7670_init,
+ .release = ov7670_release,
+ .start_capture = ov7670_start_capture,
@@ -1617,8 +1692,8 @@ Index: linux-2.6.29.6/drivers/media/video/ov7670_soc.c
+module_exit(ov7670_mod_exit);
Index: linux-2.6.29.6/drivers/media/video/Kconfig
===================================================================
---- linux-2.6.29.6.orig/drivers/media/video/Kconfig 2010-05-19 17:48:31.000000000 +0200
-+++ linux-2.6.29.6/drivers/media/video/Kconfig 2010-05-19 17:48:46.000000000 +0200
+--- linux-2.6.29.6.orig/drivers/media/video/Kconfig 2010-05-31 13:51:22.000000000 +0200
++++ linux-2.6.29.6/drivers/media/video/Kconfig 2010-05-31 13:51:23.000000000 +0200
@@ -796,6 +796,12 @@
help
This is a ov772x camera driver
@@ -1634,8 +1709,8 @@ Index: linux-2.6.29.6/drivers/media/video/Kconfig
depends on VIDEO_DEV && PXA27x && SOC_CAMERA
Index: linux-2.6.29.6/drivers/media/video/Makefile
===================================================================
---- linux-2.6.29.6.orig/drivers/media/video/Makefile 2010-05-19 17:48:31.000000000 +0200
-+++ linux-2.6.29.6/drivers/media/video/Makefile 2010-05-19 17:48:46.000000000 +0200
+--- linux-2.6.29.6.orig/drivers/media/video/Makefile 2010-05-31 13:51:22.000000000 +0200
++++ linux-2.6.29.6/drivers/media/video/Makefile 2010-05-31 13:51:23.000000000 +0200
@@ -145,6 +145,7 @@
obj-$(CONFIG_SOC_CAMERA_MT9M111) += mt9m111.o
obj-$(CONFIG_SOC_CAMERA_MT9T031) += mt9t031.o
diff --git a/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/profile b/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/profile
index 8577545..417ec26 100644
--- a/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/profile
+++ b/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/profile
@@ -17,11 +17,11 @@ if [ "$PS1" ]; then
alias ls='/bin/ls --color=tty -F'
export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:';
else
- if [ "`id -u`" -eq 0 ]; then
- export PS1='# '
- else
- export PS1='$ '
- fi
+ if [ "`id -u`" -eq 0 ]; then
+ export PS1='# '
+ else
+ export PS1='$ '
+ fi
fi
export USER=`id -un`
@@ -42,12 +42,6 @@ if [ "$PS1" ]; then
### Some aliases
alias ps2='ps facux '
alias ps1='ps faxo "%U %t %p %a" '
- alias af='ps af'
alias cls='clear'
alias df='df -h'
- alias indent='indent -bad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs -npsl -nsc -nsob -nss -ts4 '
- #alias bc='bc -l'
- alias minicom='minicom -c on'
- alias calc='calc -Cd '
- alias bc='calc -Cd '
fi;
hooks/post-receive
--
armadeus
|