Re: [PATCH 2/2] TVP514x V4L int device driver support

2008-11-24 Thread Hans Verkuil
On Monday 24 November 2008 07:16:12 Trilok Soni wrote:
 Hi Hans,

 On Mon, Nov 24, 2008 at 3:30 AM, Hans Verkuil [EMAIL PROTECTED] 
wrote:
  Hi Vaibhav,
 
  Here is my review as promised (although a day late). It's a mix of
  smaller and larger issues:
 
  1) CONFIG_VIDEO_ADV_DEBUG is meant to enable the ability to set/get
  registers through the VIDIOC_DBG_G/S_REGISTER ioctls. For general
  debugging you should use a debug module option (see e.g.
  saa7115.c).

 Local dprintk with log levels is fine, as far as it not misused.

  2) Please use the media/v4l2-i2c-drv.h or
  media/v4l2-i2c-drv-legacy.h header to hide some of the i2c
  complexity (again, see e.g. saa7115.c). The i2c API tends to change
  a lot (and some changes are upcoming) so using this header will
  mean that i2c driver changes will be minimal in the future. In
  addition it will ensure that this driver can be compiled with older
  kernels as well once it is part of the v4l-dvb repository.

 I don't agree with having support to compile with older kernels. Even
 though I2C APIs change as lot it is for good, and creating
 abstractions doesn't help as saa7xxx is family of chips where I don't
 see the case here. Once this driver is mainlined if someone does i2c
 subsystem change which breaks this driver from building then he/she
 has to make changes to all the code affecting it.

 I am not in favour of adding support to compile with older kernels.

  3) Remember that the use of v4l2-int-device.h must be temporary
  only. It will make it impossible to use this driver with any other
  platform but omap. I had hoped to release my generic v4l2 subdevice
  support today which should replace v4l2-int-device.h in time, but I
  hit a bug that needs to be resolved first. I hope to fix it during
  the next week so that I can finally make it available for use asap.

 Better step would be to have single camera-sensor framework or merge
 with soc-camera framework. Two frameworks doesn't help anyone, but
 creates more confusion for new developers.

The v4l2-int-device.h stuff should never have been added. Ditto for 
parts of the soc-camera framework that duplicates v4l2-int-device.h. My 
new v4l2_subdev support will replace the three methods of using i2c 
devices (or similar) that are currently in use. It's exactly to reduce 
the confusion that I'm working on this.

It's been discussed before on the v4l mailinglist and the relevant 
developers are aware of this. It's almost finished, just need to track 
down a single remaining oops.

Regards,

Hans
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] TVP514x V4L int device driver support

2008-11-24 Thread Trilok Soni
Hi Hans,


 The v4l2-int-device.h stuff should never have been added. Ditto for
 parts of the soc-camera framework that duplicates v4l2-int-device.h. My
 new v4l2_subdev support will replace the three methods of using i2c
 devices (or similar) that are currently in use. It's exactly to reduce
 the confusion that I'm working on this.

 It's been discussed before on the v4l mailinglist and the relevant
 developers are aware of this. It's almost finished, just need to track
 down a single remaining oops.

Right, I will wait for your updates.

I am planning to send omap24xxcam and ov9640 drivers (now deleted)
available from linux-omap tree after syncing them with latest
linux-2.6.x tree, and the whole driver and the sensor is written using
v4l2-int-device framework. I am going to send it anyway, so that it
can have some review comments.

-- 
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 2/2] TVP514x V4L int device driver support

2008-11-24 Thread Hiremath, Vaibhav
Hans,

Thanks,
Vaibhav Hiremath

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:linux-omap-
 [EMAIL PROTECTED] On Behalf Of Trilok Soni
 Sent: Monday, November 24, 2008 2:13 PM
 To: Hans Verkuil
 Cc: [EMAIL PROTECTED]; linux-omap@vger.kernel.org;
 [EMAIL PROTECTED]
 Subject: Re: [PATCH 2/2] TVP514x V4L int device driver support
 
 Hi Hans,
 
 
  The v4l2-int-device.h stuff should never have been added. Ditto
 for
  parts of the soc-camera framework that duplicates v4l2-int-
 device.h. My
  new v4l2_subdev support will replace the three methods of using
 i2c
  devices (or similar) that are currently in use. It's exactly to
 reduce
  the confusion that I'm working on this.
 
  It's been discussed before on the v4l mailinglist and the relevant
  developers are aware of this. It's almost finished, just need to
 track
  down a single remaining oops.
 
 Right, I will wait for your updates.
 
 I am planning to send omap24xxcam and ov9640 drivers (now deleted)
 available from linux-omap tree after syncing them with latest
 linux-2.6.x tree, and the whole driver and the sensor is written
 using
 v4l2-int-device framework. I am going to send it anyway, so that it
 can have some review comments.
 
[Hiremath, Vaibhav] Is your current development accessible through linuxtv.org? 
Can you share it with us, so that we can have a look into it? Which driver you 
are migrating to new interface (which I can refer to as a sample)?
Again I would like to know, how are we handling current drivers (soc-camera and 
v4l2-int)?

 --
 ---Trilok Soni
 http://triloksoni.wordpress.com
 http://www.linkedin.com/in/triloksoni
 --
 To unsubscribe from this list: send the line unsubscribe linux-
 omap in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 2/2] TVP514x V4L int device driver support

2008-11-24 Thread Hans Verkuil


 Thanks,
 Vaibhav Hiremath

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:video4linux-list-
 [EMAIL PROTECTED] On Behalf Of Hans Verkuil
 Sent: Monday, November 24, 2008 1:24 PM
 To: David Brownell
 Cc: [EMAIL PROTECTED]; linux-omap@vger.kernel.org;
 [EMAIL PROTECTED]
 Subject: Re: [PATCH 2/2] TVP514x V4L int device driver support

 On Monday 24 November 2008 07:32:31 David Brownell wrote:
  On Sunday 23 November 2008, Trilok Soni wrote:
2) Please use the media/v4l2-i2c-drv.h or
media/v4l2-i2c-drv-legacy.h header to hide some of the i2c
complexity (again, see e.g. saa7115.c). The i2c API tends to
change a lot (and some changes are upcoming) so
 
  What changes do you mean?  Since this is not a legacy-style
  driver (yay!), the upcoming changes won't affect it at all.

 Oops, sorry. I thought it was a legacy driver, but it isn't. There
 are
 changes upcoming for legacy drivers, but not for new-style drivers.

using this header will mean that i2c driver changes will be
minimal in the future. In addition it will ensure that this
driver can be compiled with older kernels as well once it is
 part
of the v4l-dvb repository.
  
   I don't agree with having support to compile with older kernels.
 
  Right.  Folk wanting legacy tvp5146 and tvp5140 support could
  try to use the legacy drivers from the DaVinci tree.

 The v4l-dvb mercurial tree at www.linuxtv.org/hg which is the main
 v4l-dvb repository can support kernels = 2.6.16. Before new stuff
 is
 merged with the git kernel all the compatibility stuff for old
 kernels
 is stripped out, so you don't see it in the actual kernel code.
 Using
 the media/v4l2-i2c-drv.h header makes it much easier to support
 these
 older kernels and it actually reduces the code size as well. Most
 v4l
 i2c drivers are already converted or will be converted soon. It's a
 v4l
 thing.

   Even though I2C APIs change as lot it is for good, and creating
   abstractions doesn't help as saa7xxx is family of chips where I
   don't see the case here. Once this driver is mainlined if
 someone
   does i2c subsystem change which breaks this driver from building
   then he/she has to make changes to all the code affecting it.
 
  And AFAIK no such change is anticipated.  The conversion from
  legacy style I2C drivers to new style driver-model friendly
  drivers is progressing fairly well, so that legacy support can
  be completely removed.
 
   I am not in favour of adding support to compile with older
 kernels.
 
  My two cents:  I'm not in favor either.  In fact that's the
  general policy for mainline drivers, and I'm surprised to hear
  any maintainer suggest it be added.

 Again, it's specific to v4l drivers. You don't have to do it, but it
 makes it consistent with the other v4l i2c drivers and when the
 driver
 is in the v4l-dvb repository you get support for older kernels for
 free.

 [Hiremath, Vaibhav] Again only to maintain consistency, supporting legacy
 wrapper is not good practice (In my opinion). Why can't we have new driver
 coming with new interface and old drivers still can have legacy wrappers?

It's no big deal for me, it was just a suggestion. We have noticed that a
lot of people actually use the v4l-dvb repository to be able to get the
latest v4l-dvb drivers for older kernels. Using these wrappers makes it
trivial to provide that service, that's all. Just concentrate on points 1
(trivial to fix) and 4 (the only really important and 'must fix' issue).

Regards,

Hans

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] TVP514x V4L int device driver support

2008-11-24 Thread David Brownell
On Friday 21 November 2008, [EMAIL PROTECTED] wrote:
 +static const struct i2c_device_id tvp514x_id[] = {
 +   {MODULE_NAME, 0},
 +   {},
 +};

Don't do that.  Instead:

{ tvp5146, 0 },
{ tvp5147, 0 },

and so on.  Maybe pass a flag there to help determine which
chip reset/init message sequence to use.  (Which, hmm, I did
not see in this code, although the data sheets are clear
that the '46 needs 12 writes and the '47 needs 18 ...)  Or
tell if the extra '46 registers are available, etc.


 +late_initcall(tvp514x_init);

Why is this late instead of normal module_init()?
It's unusual for I2C...

- Dave
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 2/2] TVP514x V4L int device driver support

2008-11-24 Thread Hans Verkuil
 Hans,

 Thanks,
 Vaibhav Hiremath

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:linux-omap-
 [EMAIL PROTECTED] On Behalf Of Trilok Soni
 Sent: Monday, November 24, 2008 2:13 PM
 To: Hans Verkuil
 Cc: [EMAIL PROTECTED]; linux-omap@vger.kernel.org;
 [EMAIL PROTECTED]
 Subject: Re: [PATCH 2/2] TVP514x V4L int device driver support

 Hi Hans,

 
  The v4l2-int-device.h stuff should never have been added. Ditto
 for
  parts of the soc-camera framework that duplicates v4l2-int-
 device.h. My
  new v4l2_subdev support will replace the three methods of using
 i2c
  devices (or similar) that are currently in use. It's exactly to
 reduce
  the confusion that I'm working on this.
 
  It's been discussed before on the v4l mailinglist and the relevant
  developers are aware of this. It's almost finished, just need to
 track
  down a single remaining oops.

 Right, I will wait for your updates.

 I am planning to send omap24xxcam and ov9640 drivers (now deleted)
 available from linux-omap tree after syncing them with latest
 linux-2.6.x tree, and the whole driver and the sensor is written
 using
 v4l2-int-device framework. I am going to send it anyway, so that it
 can have some review comments.

 [Hiremath, Vaibhav] Is your current development accessible through
 linuxtv.org? Can you share it with us, so that we can have a look into it?
 Which driver you are migrating to new interface (which I can refer to as a
 sample)?

Yes, it is. Look at these two trees:

http://linuxtv.org/hg/~hverkuil/v4l-dvb-media2
http://linuxtv.org/hg/~hverkuil/v4l-dvb-ng

The second tree is meant to be merged into the v4l-dvb master, but is
missing the converted ivtv driver: there is still a kernel oops there in a
corner case when loading the ivtv driver that I need to fix first.

The first tree has slightly older (but almost identical) code and a
converted ivtv driver that you can look at. Most important are the files
Documentation/video4linux/v4l2-framework.txt that explains the new structs
and the v4l2-device.h and v4l2-subdev.h headers.

Note that there are currently no sensor support ops in v4l2-subdev.h. This
will have to be added (should be trivial).

 Again I would like to know, how are we handling current drivers
 (soc-camera and v4l2-int)?

soc-camera and v4l2-int are the exceptions. All other drivers use the i2c
command function to communicate with i2c drivers (ioctl-like API).

Just a note on soc-camera: it's only the soc_camera_ops struct that I want
to see replaced (eventually) by v4l2_subdev. What I want is that subdevice
drivers like tvp514x, but also sensor drivers like mt9 should be
independent of the host (bridge) driver. That way they can be reused
properly. For example, having the mt9m001.c driver use soc_camera makes it
much harder to use with e.g. a USB webcam driver which is not based on the
soc_camera framework.

Regards,

   Hans

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Please fix or remove OMAP2 onenand driver

2008-11-24 Thread Adrian Hunter

Russell King - ARM Linux wrote:

Clearly this driver has been put into mainline prematurely - it takes
no account of the relocation of headers.

It's causing a regression - omap_2430sdp_defconfig used to build in
mainline, and it no longer does.

Please fix, or remove this broken driver from mainline.


From: Adrian Hunter [EMAIL PROTECTED]
Date: Mon, 24 Nov 2008 13:34:53 +0200
Subject: [PATCH] MTD: OMAP: OneNAND: header file relocation

Signed-off-by: Adrian Hunter [EMAIL PROTECTED]
---
drivers/mtd/onenand/omap2.c |   12 ++--
1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index e39b21d..28034ef 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -35,16 +35,16 @@

#include asm/io.h
#include asm/mach/flash.h
-#include asm/arch/gpmc.h
-#include asm/arch/onenand.h
-#include asm/arch/gpio.h
-#include asm/arch/pm.h
+#include mach/gpmc.h
+#include mach/onenand.h
+#include mach/gpio.h
+#include mach/pm.h

#include linux/dma-mapping.h
#include asm/dma-mapping.h
-#include asm/arch/dma.h
+#include mach/dma.h

-#include asm/arch/board.h
+#include mach/board.h

#define DRIVER_NAME omap2-onenand

--
1.5.4.3
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Please fix or remove OMAP2 onenand driver

2008-11-24 Thread Russell King - ARM Linux
On Mon, Nov 24, 2008 at 01:37:05PM +0200, Adrian Hunter wrote:
 From: Adrian Hunter [EMAIL PROTECTED]
 Date: Mon, 24 Nov 2008 13:34:53 +0200
 Subject: [PATCH] MTD: OMAP: OneNAND: header file relocation
 
 Signed-off-by: Adrian Hunter [EMAIL PROTECTED]

Thanks.  Only two comments (see below).

 ---
 drivers/mtd/onenand/omap2.c |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
 index e39b21d..28034ef 100644
 --- a/drivers/mtd/onenand/omap2.c
 +++ b/drivers/mtd/onenand/omap2.c
 @@ -35,16 +35,16 @@
 
 #include asm/io.h

Should be linux/io.h and should be with the other linux/ includes.

 #include asm/mach/flash.h
 -#include asm/arch/gpmc.h
 -#include asm/arch/onenand.h
 -#include asm/arch/gpio.h
 -#include asm/arch/pm.h
 +#include mach/gpmc.h
 +#include mach/onenand.h
 +#include mach/gpio.h
 +#include mach/pm.h
 
 #include linux/dma-mapping.h
 #include asm/dma-mapping.h

asm/dma-mapping.h should not be included - only linux/dma-mapping.h, and
that should be up with the other linux/ includes.

 -#include asm/arch/dma.h
 +#include mach/dma.h
 
 -#include asm/arch/board.h
 +#include mach/board.h
 
 #define DRIVER_NAME omap2-onenand
 
 -- 
 1.5.4.3
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: Parse ATAG_VIDEOLFB to screen_info

2008-11-24 Thread Russell King - ARM Linux
On Fri, Nov 21, 2008 at 12:25:36PM +0200, Tomi Valkeinen wrote:
 Parse ATAG_VIDEOLFB received from bootloader to screen_info struct,
 so that video drivers can use the information.

Boot loaders tend to be absolutely diabolical about passing correct
information to the kernel, so I really don't want to see such platform
specific stuff being passed.  Please put it in the board specific file
instead, just like everyone else does.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Please fix or remove OMAP2 onenand driver

2008-11-24 Thread Adrian Hunter

ext Russell King - ARM Linux wrote:

On Mon, Nov 24, 2008 at 01:37:05PM +0200, Adrian Hunter wrote:

From: Adrian Hunter [EMAIL PROTECTED]
Date: Mon, 24 Nov 2008 13:34:53 +0200
Subject: [PATCH] MTD: OMAP: OneNAND: header file relocation

Signed-off-by: Adrian Hunter [EMAIL PROTECTED]


Thanks.  Only two comments (see below).


---
drivers/mtd/onenand/omap2.c |   12 ++--
1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index e39b21d..28034ef 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -35,16 +35,16 @@

#include asm/io.h


Should be linux/io.h and should be with the other linux/ includes.


#include asm/mach/flash.h
-#include asm/arch/gpmc.h
-#include asm/arch/onenand.h
-#include asm/arch/gpio.h
-#include asm/arch/pm.h
+#include mach/gpmc.h
+#include mach/onenand.h
+#include mach/gpio.h
+#include mach/pm.h

#include linux/dma-mapping.h
#include asm/dma-mapping.h


asm/dma-mapping.h should not be included - only linux/dma-mapping.h, and
that should be up with the other linux/ includes.


-#include asm/arch/dma.h
+#include mach/dma.h

-#include asm/arch/board.h
+#include mach/board.h

#define DRIVER_NAME omap2-onenand

--
1.5.4.3




From: Adrian Hunter [EMAIL PROTECTED]
Date: Mon, 24 Nov 2008 13:34:53 +0200
Subject: [PATCH] MTD: OMAP: OneNAND: header file relocation

Signed-off-by: Adrian Hunter [EMAIL PROTECTED]
---
drivers/mtd/onenand/omap2.c |   17 -
1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index e39b21d..a7e4d98 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -32,19 +32,18 @@
#include linux/platform_device.h
#include linux/interrupt.h
#include linux/delay.h
+#include linux/dma-mapping.h
+#include linux/io.h

-#include asm/io.h
#include asm/mach/flash.h
-#include asm/arch/gpmc.h
-#include asm/arch/onenand.h
-#include asm/arch/gpio.h
-#include asm/arch/pm.h
+#include mach/gpmc.h
+#include mach/onenand.h
+#include mach/gpio.h
+#include mach/pm.h

-#include linux/dma-mapping.h
-#include asm/dma-mapping.h
-#include asm/arch/dma.h
+#include mach/dma.h

-#include asm/arch/board.h
+#include mach/board.h

#define DRIVER_NAME omap2-onenand

--
1.5.4.3
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [OMAP and mainline][RFC 2.6.28-rc2-omap 3/3] USB: OHCI-OMAP: Switch to gpio_request/free calls

2008-11-24 Thread Jarkko Nikula
On Fri, 21 Nov 2008 16:08:37 -0800
ext David Brownell [EMAIL PROTECTED] wrote:

 On Friday 21 November 2008, Tony Lindgren wrote:
  
  But I guess Jarkko will still change some names in his patch series?
  
 
 Minor stuff, as I recall.  I'll let him respond...
 
Yeah, I hope to get finally this set refreshed this week...


Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/1] Debobs control macro fix

2008-11-24 Thread Peter 'p2' De Schrijver

Signed-off-by: Peter 'p2' De Schrijver [EMAIL PROTECTED]
---
 arch/arm/plat-omap/include/mach/control.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/include/mach/control.h 
b/arch/arm/plat-omap/include/mach/control.h
index 9b06365..759fb71 100644
--- a/arch/arm/plat-omap/include/mach/control.h
+++ b/arch/arm/plat-omap/include/mach/control.h
@@ -152,7 +152,7 @@
 #define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190)
 #define OMAP343X_CONTROL_IVA2_BOOTMOD  (OMAP2_CONTROL_GENERAL + 0x0194)
 #define OMAP343X_CONTROL_DEBOBS(i) (OMAP2_CONTROL_GENERAL + 0x01B0 \
-   + ((i)  1) * 4 + (!(i)  1) * 2)
+   + ((i)  1) * 4 + (!(i  1)) * 2)
 #define OMAP343X_CONTROL_PROG_IO0  (OMAP2_CONTROL_GENERAL + 0x01D4)
 #define OMAP343X_CONTROL_PROG_IO1  (OMAP2_CONTROL_GENERAL + 0x01D8)
 #define OMAP343X_CONTROL_DSS_DPLL_SPREADING(OMAP2_CONTROL_GENERAL + 0x01E0)
-- 
1.5.6.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gpio_expander_omap removal?

2008-11-24 Thread Tony Lindgren
* Trilok Soni [EMAIL PROTECTED] [081124 09:18]:
 Any plans to remove gpio expander APIs from drivers/i2c/chips?
 
 I hope gpio_xxx APIs from gpiolib will work directly over pcf857x.

Yes, let's get rid of that.

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gpio_expander_omap removal?

2008-11-24 Thread Trilok Soni
Hi Tony,


 Yes, let's get rid of that.


Attached the patch, just check.


-- 
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni
From 88ce88a30a3c141657786869d87afc3600def0d8 Mon Sep 17 00:00:00 2001
From: Trilok Soni [EMAIL PROTECTED]
Date: Mon, 24 Nov 2008 23:14:48 +0530
Subject: [PATCH] OMAP: I2C: Remove gpio_expander_omap APIs

- Remove gpio_expander_omap APIs as it is replaced by
  gpio/pcf857x.

Signed-off-by: Trilok Soni [EMAIL PROTECTED]
---
 drivers/i2c/chips/Kconfig  |7 ---
 drivers/i2c/chips/Makefile |1 -
 drivers/i2c/chips/gpio_expander_omap.c |   71 
 3 files changed, 0 insertions(+), 79 deletions(-)
 delete mode 100644 drivers/i2c/chips/gpio_expander_omap.c

diff --git a/drivers/i2c/chips/Kconfig b/drivers/i2c/chips/Kconfig
index 4c73bb5..d61589b 100644
--- a/drivers/i2c/chips/Kconfig
+++ b/drivers/i2c/chips/Kconfig
@@ -146,13 +146,6 @@ config SENSORS_TLV320AIC23
 	  If you say yes here you get support for the I2C control
 	  interface for Texas Instruments TLV320AIC23 audio codec.
 
-config GPIOEXPANDER_OMAP
-	bool GPIO Expander PCF8574PWR for OMAP
-	depends on I2C  MACH_OMAP_H3
-	help
-	  If you say yes here you get support for I/O expander calls
-	  to configure IrDA, Camera and audio devices.
-
 config TWL4030_MADC
 	tristate TWL4030 MADC Driver
 	depends on TWL4030_CORE
diff --git a/drivers/i2c/chips/Makefile b/drivers/i2c/chips/Makefile
index cb9f2bb..d82019c 100644
--- a/drivers/i2c/chips/Makefile
+++ b/drivers/i2c/chips/Makefile
@@ -21,7 +21,6 @@ obj-$(CONFIG_SENSORS_PCF8591)	+= pcf8591.o
 obj-$(CONFIG_ISP1301_OMAP)	+= isp1301_omap.o
 obj-$(CONFIG_TPS65010)		+= tps65010.o
 obj-$(CONFIG_SENSORS_TLV320AIC23) += tlv320aic23.o
-obj-$(CONFIG_GPIOEXPANDER_OMAP)	+= gpio_expander_omap.o
 obj-$(CONFIG_MENELAUS)		+= menelaus.o
 obj-$(CONFIG_SENSORS_TSL2550)	+= tsl2550.o
 obj-$(CONFIG_MCU_MPC8349EMITX)	+= mcu_mpc8349emitx.o
diff --git a/drivers/i2c/chips/gpio_expander_omap.c b/drivers/i2c/chips/gpio_expander_omap.c
deleted file mode 100644
index dfe7f04..000
--- a/drivers/i2c/chips/gpio_expander_omap.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * drivers/i2c/chips/gpio_expander_omap.c
- *
- * Copyright (C) 2004 Texas Instruments Inc
- * Author:
- *
- * gpio expander is used to configure IrDA, camera and audio devices on omap 1710 processor.
- *
- * 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.
- *
- */
-
-#include linux/types.h
-#include linux/i2c.h
-#include linux/errno.h
-
-int read_gpio_expa(u8 * val, int addr);
-int write_gpio_expa(u8 val, int addr);
-
-int write_gpio_expa(u8 val, int addr)
-{
-	struct i2c_adapter *adap;
-	int err;
-	struct i2c_msg msg[1];
-	unsigned char data[1];
-
-	adap = i2c_get_adapter(1);
-	if (!adap)
-		return -ENODEV;
-	msg-addr = addr;	/* I2C address of GPIO EXPA */
-	msg-flags = 0;
-	msg-len = 1;
-	msg-buf = data;
-	data[0] = val;
-	err = i2c_transfer(adap, msg, 1);
-	if (err = 0)
-		return 0;
-	return err;
-}
-
-/* Read from I/O EXPANDER on the H3 board.
- * The IO expanders need an independent I2C client driver.
- */
-
-int read_gpio_expa(u8 * val, int addr)
-{
-	struct i2c_adapter *adap;
-	int err;
-	struct i2c_msg msg[1];
-	unsigned char data[1];
-
-	adap = i2c_get_adapter(1);
-	if (!adap)
-		return -ENODEV;
-	msg-addr = addr;	/* I2C address of GPIO EXPA */
-	msg-flags = I2C_M_RD;
-	msg-len = 2;
-	msg-buf = data;
-	err = i2c_transfer(adap, msg, 1);
-	*val = data[0];
-
-	if (err = 0)
-		return 0;
-	return err;
-}
-
-EXPORT_SYMBOL(read_gpio_expa);
-EXPORT_SYMBOL(write_gpio_expa);
-
-- 
1.6.0.3



[PATCH] [OMAPZOOM] OMAP: DISPLAY: Code Clean up Trailing Whitespace

2008-11-24 Thread Ogeid Alavaz
From 59dd3abeec8498c59ec27408467b7ebaf82d74cf Mon Sep 17 00:00:00 2001
From: Diego Zavala Trujillo [EMAIL PROTECTED]
Date: Mon, 24 Nov 2008 12:16:01 -0600
Subject: [PATCH] OMAP: DISPLAY: Code Clean up Trailing Whitespace

Clean Whitespaces from drivers/media/video/omap/files
---
 drivers/media/video/omap/Makefile  |2 +-
 drivers/media/video/omap/omap24xxlib.c |   64 +++---
 drivers/media/video/omap/omap24xxlib.h |4 +-
 drivers/media/video/omap/omap24xxvout.c|  294 ++--
 drivers/media/video/omap/omap24xxvout.h|6 +-
 drivers/media/video/omap/omap24xxvoutdef.h |   32 ++--
 6 files changed, 201 insertions(+), 201 deletions(-)

diff --git a/drivers/media/video/omap/Makefile
b/drivers/media/video/omap/Makefile
index d4b0149..cc1c51a 100644
--- a/drivers/media/video/omap/Makefile
+++ b/drivers/media/video/omap/Makefile
@@ -4,7 +4,7 @@ obj-$(CONFIG_VIDEO_OMAP_CAMERA) += omapcamera.o

 objs-y$(CONFIG_ARCH_OMAP16XX) += omap16xxcam.o camera_core.o

-obj-$(CONFIG_VIDEO_OMAP24XX_VIDEOLIB) += omap24xxlib.o
+obj-$(CONFIG_VIDEO_OMAP24XX_VIDEOLIB) += omap24xxlib.o
 obj-$(CONFIG_VIDEO_OMAP24XX_VIDEOOUT) += omap24xxvout.o
 omapcamera-objs := $(objs-yy)

diff --git a/drivers/media/video/omap/omap24xxlib.c
b/drivers/media/video/omap/omap24xxlib.c
index 337123e..0d48584 100644
--- a/drivers/media/video/omap/omap24xxlib.c
+++ b/drivers/media/video/omap/omap24xxlib.c
@@ -3,12 +3,12 @@
  *
  * Copyright (C) 2005 Texas Instruments.
  *
- * This file is licensed under the terms of the GNU General Public License
- * version 2. This program is licensed as is without any warranty of any
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed as is without any warranty of any
  * kind, whether express or implied.
  *
  * Based on the OMAP2 camera driver
- * Video-for-Linux (Version 2) camera capture driver for
+ * Video-for-Linux (Version 2) camera capture driver for
  * the OMAP24xx camera controller.
  *
  * Author: Andy Lowe ([EMAIL PROTECTED])
@@ -38,9 +38,9 @@
 #include linux/semaphore.h

 /* Return the default overlay cropping rectangle in crop given the image
- * size in pix and the video display size in fbuf.  The default
- * cropping rectangle is the largest rectangle no larger than the capture size
- * that will fit on the display.  The default cropping rectangle is
centered in
+ * size in pix and the video display size in fbuf.  The default
+ * cropping rectangle is the largest rectangle no larger than the capture size
+ * that will fit on the display.  The default cropping rectangle is centered in
  * the image.  All dimensions and offsets are rounded down to even numbers.
  */
 void
@@ -57,10 +57,10 @@ omap24xxvout_default_crop(struct v4l2_pix_format *pix,
crop-top = ((pix-height - crop-height)  1)  ~1;
 }

-/* Given a new render window in new_win, adjust the window to the
- * nearest supported configuration.  The adjusted window parameters are
+/* Given a new render window in new_win, adjust the window to the
+ * nearest supported configuration.  The adjusted window parameters are
  * returned in new_win.
- * Returns zero if succesful, or -EINVAL if the requested window is
+ * Returns zero if succesful, or -EINVAL if the requested window is
  * impossible and cannot reasonably be adjusted.
  */
 int
@@ -72,7 +72,7 @@ omap24xxvout_try_window(struct v4l2_framebuffer *fbuf,
/* make a working copy of the new_win rectangle */
try_win = new_win-w;

-   /* adjust the preview window so it fits on the display by clipping any
+   /* adjust the preview window so it fits on the display by clipping any
 * offscreen areas
 */
if (try_win.left  0) {
@@ -103,12 +103,12 @@ omap24xxvout_try_window(struct v4l2_framebuffer *fbuf,
return 0;
 }

-/* Given a new render window in new_win, adjust the window to the
- * nearest supported configuration.  The image cropping window in crop
- * will also be adjusted if necessary.  Preference is given to keeping the
- * the window as close to the requested configuration as possible.  If
+/* Given a new render window in new_win, adjust the window to the
+ * nearest supported configuration.  The image cropping window in crop
+ * will also be adjusted if necessary.  Preference is given to keeping the
+ * the window as close to the requested configuration as possible.  If
  * successful, new_win, vout-win, and crop are updated.
- * Returns zero if succesful, or -EINVAL if the requested preview window is
+ * Returns zero if succesful, or -EINVAL if the requested preview window is
  * impossible and cannot reasonably be adjusted.
  */
 int
@@ -141,14 +141,14 @@ omap24xxvout_new_window(struct v4l2_rect *crop,
return 0;
 }

-/* Given a new cropping rectangle in new_crop, adjust the cropping
rectangle to
- * the nearest supported configuration.  The image render window in win will
- * also be adjusted if necessary.  The 

Re: gpio_expander_omap removal?

2008-11-24 Thread David Brownell
On Monday 24 November 2008, Trilok Soni wrote:
  Yes, let's get rid of that.
 
 
 Attached the patch, just check.

I suggest the two patches I'll send in a moment, instead.
The reason it was still around was because the H3 board
support still used it...

- Dave
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 2.6.28-rc6-omap 1/2] H3 stops using mach/gpioexpander.h

2008-11-24 Thread David Brownell
From: David Brownell [EMAIL PROTECTED]

Update board-h3.c to use standard GPIO calls to set up the
IRDA transceiver, not legacy OMAP-only gpioexpander code.

Also, move the #include .../ov9640.h; the header is gone,
there's currently no driver for that camera sensor.

Signed-off-by: David Brownell [EMAIL PROTECTED]
---
COMPILE TESTED ONLY ... but obviously, nobody's built this
board in a while, or the ov9640 header would have been seen.

 arch/arm/mach-omap1/board-h3.c |  112 ---
 1 file changed, 69 insertions(+), 43 deletions(-)

--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -26,8 +26,11 @@
 #include linux/mtd/nand.h
 #include linux/mtd/partitions.h
 #include linux/input.h
-#include linux/i2c/tps65010.h
 #include linux/clk.h
+
+#include linux/i2c/tps65010.h
+#include linux/i2c/pcf857x.h
+
 #include linux/spi/spi.h
 #include linux/spi/tsc210x.h
 
@@ -45,7 +48,6 @@
 
 #include mach/gpio.h
 #include mach/gpio-switch.h
-#include mach/gpioexpander.h
 #include mach/irqs.h
 #include mach/mux.h
 #include mach/tc.h
@@ -58,8 +60,6 @@
 #include mach/mcbsp.h
 #include mach/omap-alsa.h
 
-#include ../drivers/media/video/ov9640.h
-
 #define H3_TS_GPIO 48
 
 static int h3_keymap[] = {
@@ -284,29 +284,15 @@ static struct platform_device h3_kp_devi
 
 /* Select between the IrDA and aGPS module
  */
-static int h3_select_irda(struct device *dev, int state)
-{
-   unsigned char expa;
-   int err = 0;
 
-   if ((err = read_gpio_expa(expa, 0x26))) {
-   printk(KERN_ERR Error reading from I/O EXPANDER \n);
-   return err;
-   }
+static int gpio_irda_enable;
+static int gpio_irda_x;
+static int gpio_irda_fir;
 
-   /* 'P6' enable/disable IRDA_TX and IRDA_RX */
-   if (state  IR_SEL) { /* IrDA */
-   if ((err = write_gpio_expa(expa | 0x40, 0x26))) {
-   printk(KERN_ERR Error writing to I/O EXPANDER \n);
-   return err;
-   }
-   } else {
-   if ((err = write_gpio_expa(expa  ~0x40, 0x26))) {
-   printk(KERN_ERR Error writing to I/O EXPANDER \n);
-   return err;
-   }
-   }
-   return err;
+static int h3_select_irda(struct device *dev, int state)
+{
+   gpio_set_value_cansleep(gpio_irda_enable, state  IR_SEL);
+   return 0;
 }
 
 static void set_trans_mode(struct work_struct *work)
@@ -314,24 +300,9 @@ static void set_trans_mode(struct work_s
struct omap_irda_config *irda_config =
container_of(work, struct omap_irda_config, gpio_expa.work);
int mode = irda_config-mode;
-   unsigned char expa;
-   int err = 0;
-
-   if ((err = read_gpio_expa(expa, 0x27)) != 0) {
-   printk(KERN_ERR Error reading from I/O expander\n);
-   }
 
-   expa = ~0x03;
-
-   if (mode  IR_SIRMODE) {
-   expa |= 0x01;
-   } else { /* MIR/FIR */
-   expa |= 0x03;
-   }
-
-   if ((err = write_gpio_expa(expa, 0x27)) != 0) {
-   printk(KERN_ERR Error writing to I/O expander\n);
-   }
+   gpio_set_value_cansleep(gpio_irda_x, 1);
+   gpio_set_value_cansleep(gpio_irda_fir, !(mode  IR_SIRMODE));
 }
 
 static int h3_transceiver_mode(struct device *dev, int mode)
@@ -441,7 +412,6 @@ static struct platform_device *devices[]
nand_device,
 smc91x_device,
intlat_device,
-   h3_irda_device,
h3_kp_device,
h3_lcd_device,
h3_mcbsp1_device,
@@ -483,6 +453,9 @@ static int nand_dev_ready(struct omap_na
 }
 
 #if defined(CONFIG_VIDEO_OV9640) || defined(CONFIG_VIDEO_OV9640_MODULE)
+
+#include ../drivers/media/video/ov9640.h
+
 /*
  * Common OV9640 register initialization for all image sizes, pixel formats,
  * and frame rates
@@ -576,8 +549,61 @@ static struct ov9640_platform_data h3_ov
 };
 #endif
 
+static int h3_pcf_setup(struct i2c_client *client, int gpio,
+   unsigned ngpio, void *context)
+{
+   int status;
+
+   /* REVISIT someone with schematics should look up the rest
+* of these signals, and configure them appropriately ...
+* camera and audio seem to be involved, too.
+*/
+
+   /* P0 - ? */
+   gpio_irda_x = gpio + 0;
+   status = gpio_request(gpio_irda_x, irda_x);
+   if (status  0)
+   goto done;
+   status = gpio_direction_output(gpio_irda_x, 0);
+   if (status  0)
+   goto done;
+
+   /* P1 - set if MIR/FIR */
+   gpio_irda_fir = gpio + 1;
+   status = gpio_request(gpio_irda_fir, irda_fir);
+   if (status  0)
+   goto done;
+   status = gpio_direction_output(gpio_irda_fir, 0);
+   if (status  0)
+   goto done;
+
+   /* 'P6' enable/disable IRDA_TX and IRDA_RX ... default, off */
+   gpio_irda_enable = gpio + 6;
+   status = gpio_request(gpio_irda_enable, irda_enable);
+   

[patch 2.6.28-rc6-omap 2/2] remove gpio_expander_omap

2008-11-24 Thread David Brownell
From: David Brownell [EMAIL PROTECTED]

Now that H3 is converted to use GPIO calls, get rid of the
legacy gpio_expander_omap code ... it has no more users.

One more needless divergence from mainline gone!

Signed-off-by: David Brownell [EMAIL PROTECTED]
---
 arch/arm/mach-omap1/Kconfig|1 
 arch/arm/plat-omap/include/mach/gpioexpander.h |   35 ---
 drivers/i2c/chips/Kconfig  |7 --
 drivers/i2c/chips/Makefile |1 
 drivers/i2c/chips/gpio_expander_omap.c |   71 ---
 5 files changed, 115 deletions(-)

--- a/arch/arm/mach-omap1/Kconfig
+++ b/arch/arm/mach-omap1/Kconfig
@@ -38,7 +38,6 @@ config MACH_OMAP_H2
 config MACH_OMAP_H3
bool TI H3 Support
depends on ARCH_OMAP1  ARCH_OMAP16XX
-#  select GPIOEXPANDER_OMAP
help
  TI OMAP 1710 H3 board support. Say Y here if you have such
  a board.
--- a/arch/arm/plat-omap/include/mach/gpioexpander.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * arch/arm/plat-omap/include/mach/gpioexpander.h
- *
- *
- * Copyright (C) 2004 Texas Instruments, Inc.
- *
- * This package 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 PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef __ASM_ARCH_OMAP_GPIOEXPANDER_H
-#define __ASM_ARCH_OMAP_GPIOEXPANDER_H
-
-/* Function Prototypes for GPIO Expander functions */
-
-#ifdef CONFIG_GPIOEXPANDER_OMAP
-int read_gpio_expa(u8 *, int);
-int write_gpio_expa(u8 , int);
-#else
-static inline int read_gpio_expa(u8 *val, int addr)
-{
-   return 0;
-}
-static inline int write_gpio_expa(u8 val, int addr)
-{
-   return 0;
-}
-#endif
-
-#endif /* __ASM_ARCH_OMAP_GPIOEXPANDER_H */
--- a/drivers/i2c/chips/Kconfig
+++ b/drivers/i2c/chips/Kconfig
@@ -134,13 +134,6 @@ config SENSORS_TLV320AIC23
  If you say yes here you get support for the I2C control
  interface for Texas Instruments TLV320AIC23 audio codec.
 
-config GPIOEXPANDER_OMAP
-   bool GPIO Expander PCF8574PWR for OMAP
-   depends on I2C  MACH_OMAP_H3
-   help
- If you say yes here you get support for I/O expander calls
- to configure IrDA, Camera and audio devices.
-
 config TWL4030_MADC
tristate TWL4030 MADC Driver
depends on TWL4030_CORE
--- a/drivers/i2c/chips/Makefile
+++ b/drivers/i2c/chips/Makefile
@@ -20,7 +20,6 @@ obj-$(CONFIG_PCF8575) += pcf8575.o
 obj-$(CONFIG_SENSORS_PCF8591)  += pcf8591.o
 obj-$(CONFIG_TPS65010) += tps65010.o
 obj-$(CONFIG_SENSORS_TLV320AIC23) += tlv320aic23.o
-obj-$(CONFIG_GPIOEXPANDER_OMAP)+= gpio_expander_omap.o
 obj-$(CONFIG_MENELAUS) += menelaus.o
 obj-$(CONFIG_SENSORS_TSL2550)  += tsl2550.o
 obj-$(CONFIG_MCU_MPC8349EMITX) += mcu_mpc8349emitx.o
--- a/drivers/i2c/chips/gpio_expander_omap.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * drivers/i2c/chips/gpio_expander_omap.c
- *
- * Copyright (C) 2004 Texas Instruments Inc
- * Author:
- *
- * gpio expander is used to configure IrDA, camera and audio devices on omap 
1710 processor.
- *
- * 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.
- *
- */
-
-#include linux/types.h
-#include linux/i2c.h
-#include linux/errno.h
-
-int read_gpio_expa(u8 * val, int addr);
-int write_gpio_expa(u8 val, int addr);
-
-int write_gpio_expa(u8 val, int addr)
-{
-   struct i2c_adapter *adap;
-   int err;
-   struct i2c_msg msg[1];
-   unsigned char data[1];
-
-   adap = i2c_get_adapter(1);
-   if (!adap)
-   return -ENODEV;
-   msg-addr = addr;   /* I2C address of GPIO EXPA */
-   msg-flags = 0;
-   msg-len = 1;
-   msg-buf = data;
-   data[0] = val;
-   err = i2c_transfer(adap, msg, 1);
-   if (err = 0)
-   return 0;
-   return err;
-}
-
-/* Read from I/O EXPANDER on the H3 board.
- * The IO expanders need an independent I2C client driver.
- */
-
-int read_gpio_expa(u8 * val, int addr)
-{
-   struct i2c_adapter *adap;
-   int err;
-   struct i2c_msg msg[1];
-   unsigned char data[1];
-
-   adap = i2c_get_adapter(1);
-   if (!adap)
-   return -ENODEV;
-   msg-addr = addr;   /* I2C address of GPIO EXPA */
-   msg-flags = I2C_M_RD;
-   msg-len = 2;
-   msg-buf = data;
-   err = i2c_transfer(adap, msg, 1);
-   *val = data[0];
-
-   if (err = 0)
-   return 0;
-   return err;
-}
-
-EXPORT_SYMBOL(read_gpio_expa);
-EXPORT_SYMBOL(write_gpio_expa);
-
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the 

[patch 2.6.28-rc6-omap] sync isp1301_omap with mainlne

2008-11-24 Thread David Brownell
From: David Brownell [EMAIL PROTECTED]

Sync OMAP git with mainline ... build tested.

Signed-off-by: David Brownell [EMAIL PROTECTED]
---
This will help with an upcoming patch to move this to drivers/usb/otg.

 drivers/i2c/chips/isp1301_omap.c |1 -
 1 file changed, 1 deletion(-)

--- a/drivers/i2c/chips/isp1301_omap.c
+++ b/drivers/i2c/chips/isp1301_omap.c
@@ -32,7 +32,6 @@
 #include linux/usb/otg.h
 #include linux/i2c.h
 #include linux/workqueue.h
-#include linux/io.h
 
 #include asm/irq.h
 #include asm/mach-types.h
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ALSA: SoC: Add support for TI SDP3430

2008-11-24 Thread mesak82
From: Misael Lopez Cruz [EMAIL PROTECTED]

This patch add ASoC support for TI SDP3430. It's based on Gumstix
Overo SoC code by Steve Sakoman.

Signed-off-by: Misael Lopez Cruz [EMAIL PROTECTED]
---
 sound/soc/omap/Kconfig   |7 ++
 sound/soc/omap/Makefile  |2 +
 sound/soc/omap/sdp3430.c |  152 ++
 3 files changed, 161 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/omap/sdp3430.c

diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index 0daeee4..e816fa4 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -38,4 +38,11 @@ config SND_OMAP_SOC_OVERO
help
  Say Y if you want to add support for SoC audio on the Gumstix Overo.
 
+config SND_OMAP_SOC_SDP3430
+   tristate SoC Audio support for Texas Instruments SDP3430
+   depends on TWL4030_CORE  SND_OMAP_SOC  MACH_OMAP_3430SDP
+   select SND_OMAP_SOC_MCBSP
+   select SND_SOC_TWL4030
+   help
+ Say Y if you want to add support for SoC audio on Texas Instruments 
SDP3430.
 
diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
index 4bae404..64e560b 100644
--- a/sound/soc/omap/Makefile
+++ b/sound/soc/omap/Makefile
@@ -10,9 +10,11 @@ snd-soc-n810-objs := n810.o
 snd-soc-omap3beagle-objs := omap3beagle.o
 snd-soc-osk5912-objs := osk5912.o
 snd-soc-overo-objs := overo.o
+snd-soc-sdp3430-objs := sdp3430.o
 
 obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
 obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o
 obj-$(CONFIG_SND_OMAP_SOC_OSK5912) += snd-soc-osk5912.o
 obj-$(CONFIG_SND_OMAP_SOC_OVERO) += snd-soc-overo.o
+obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o
 
diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c
new file mode 100644
index 000..85fd160
--- /dev/null
+++ b/sound/soc/omap/sdp3430.c
@@ -0,0 +1,152 @@
+/*
+ * sdp3430.c  --  SoC audio for TI OMAP3430 SDP
+ *
+ * Author: Misael Lopez Cruz [EMAIL PROTECTED]
+ *
+ * Based on:
+ * Author: Steve Sakoman [EMAIL PROTECTED]
+ *
+ * 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 sound/core.h
+#include sound/pcm.h
+#include sound/soc.h
+#include sound/soc-dapm.h
+
+#include asm/mach-types.h
+#include mach/hardware.h
+#include mach/gpio.h
+#include mach/mcbsp.h
+
+#include omap-mcbsp.h
+#include omap-pcm.h
+#include ../codecs/twl4030.h
+
+static int sdp3430_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;
+   int ret;
+
+   /* Set codec DAI configuration */
+   ret = snd_soc_dai_set_fmt(codec_dai,
+ SND_SOC_DAIFMT_I2S |
+ SND_SOC_DAIFMT_NB_NF |
+ SND_SOC_DAIFMT_CBM_CFM);
+   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,
+ SND_SOC_DAIFMT_I2S |
+ SND_SOC_DAIFMT_NB_NF |
+ SND_SOC_DAIFMT_CBM_CFM);
+   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, 2600,
+   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 sdp3430_ops = {
+   .hw_params = sdp3430_hw_params,
+};
+
+/* Digital audio interface glue - connects codec -- CPU */
+static struct snd_soc_dai_link sdp3430_dai = {
+   .name = TWL4030,
+   .stream_name = TWL4030,
+   .cpu_dai = omap_mcbsp_dai[0],
+   .codec_dai = twl4030_dai,
+   .ops = sdp3430_ops,
+};
+
+/* Audio machine driver */
+static struct snd_soc_machine snd_soc_machine_sdp3430 = {
+   .name = SDP3430,
+   .dai_link = sdp3430_dai,
+   .num_links = 1,
+};
+
+/* 

Re: [PATCH] ALSA: SoC: Add support for TI SDP3430

2008-11-24 Thread Misael Lopez
2008/11/24  [EMAIL PROTECTED]:
 From: Misael Lopez Cruz [EMAIL PROTECTED]

 This patch add ASoC support for TI SDP3430. It's based on Gumstix
 Overo SoC code by Steve Sakoman.

 Signed-off-by: Misael Lopez Cruz [EMAIL PROTECTED]
 ---

This patch version includes David's comment...
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ALSA: SoC: Add support for TI SDP3430

2008-11-24 Thread David Brownell
On Monday 24 November 2008, Misael Lopez wrote:
 2008/11/24  [EMAIL PROTECTED]:
  From: Misael Lopez Cruz [EMAIL PROTECTED]
 
  This patch add ASoC support for TI SDP3430. It's based on Gumstix
  Overo SoC code by Steve Sakoman.
 
  Signed-off-by: Misael Lopez Cruz [EMAIL PROTECTED]
  ---
 
 This patch version includes David's comment...

Good ... but, surely it should go to the ALSA list?


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Please fix lcd_sx1.c

2008-11-24 Thread Tony Lindgren
* Russell King - ARM Linux [EMAIL PROTECTED] [081123 08:58]:
 On Sun, Nov 23, 2008 at 04:46:18PM +, Russell King - ARM Linux wrote:
  To me, it looks like this driver was tossed over into mainline without
  any thought - it has never been in a buildable state.  Please fix or
  remove this driver from mainline.
 
 Actually, it was buildable, until this commit:
 
 commit b4b58f5834a023dab67201db9a626bef07bb200c
 Author: Chandra Shekhar [EMAIL PROTECTED]
 Date:   Wed Oct 8 10:01:39 2008 +0300
 
 ARM: OMAP: Allocate McBSP devices dynamically
 
 Based on Chandra's earlier patches in linux-omap tree.
 
 Note that omap1_mcbsp_check and omap2_mcbsp_check are no longer
 needed as there's now omap_mcbsp_check_valid_id() defined.
 
 Also some functions can now be marked __init.
 
 Signed-off-by: Chandra Shekhar [EMAIL PROTECTED]
 Signed-off-by: Tony Lindgren [EMAIL PROTECTED]
 
 which means it's a regression and therefore needs fixing before 2.6.28.

Will send you a patch for this today.

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH][OMAPZOOM] OMAP3: Initialize XCCR and RCCR registers for McBSP DAI driver

2008-11-24 Thread x0052729
From: Misael Lopez Cruz [EMAIL PROTECTED]

This patch initializes XCCR and RCCR registers for OMAP McBSP DAI driver for
OMAP 2430/34xx platforms. Those registers were being set to 0 as they were
not properly initialized.

Signed-off-by: Misael Lopez Cruz [EMAIL PROTECTED]
---
 arch/arm/plat-omap/include/mach/mcbsp.h |5 +
 arch/arm/plat-omap/mcbsp.c  |1 +
 sound/soc/omap/omap-mcbsp.c |4 
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/include/mach/mcbsp.h 
b/arch/arm/plat-omap/include/mach/mcbsp.h
index 3e38575..faa9164 100644
--- a/arch/arm/plat-omap/include/mach/mcbsp.h
+++ b/arch/arm/plat-omap/include/mach/mcbsp.h
@@ -245,11 +245,16 @@
 #define XPBBLK(value)  ((value)7)/* Bits 7:8 */
 
 /*** McBSP XCCR bit definitions */
+#define EXTCLKGATE 0x8000
+#define PPCONNECT  0x4000
+#define DXENDLY(value) ((value)12)   /* Bits 12:13 */
+#define XFULL_CYCLE0x0800
 #define DILB   0x0020
 #define XDMAEN 0x0008
 #define XDISABLE   0x0001
 
 /** McBSP RCCR bit definitions */
+#define RFULL_CYCLE0x0800
 #define RDMAEN 0x0008
 #define RDISABLE   0x0001
 
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index 906e8e3..2b29033 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -174,6 +174,7 @@ void omap_mcbsp_config(unsigned int id, const struct 
omap_mcbsp_reg_cfg *config)
OMAP_MCBSP_WRITE(io_base, MCR2, config-mcr2);
OMAP_MCBSP_WRITE(io_base, MCR1, config-mcr1);
OMAP_MCBSP_WRITE(io_base, PCR0, config-pcr0);
+   /* Write to xccr and rccr only for omap2430/34xx */
if (cpu_is_omap2430() || cpu_is_omap34xx()) {
if (mcbsp-pdata-ops-config)
mcbsp-pdata-ops-config(id, config);
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 3a4cc4b..51a9313 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -285,6 +285,10 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai 
*cpu_dai,
regs-spcr1 |= RINTM(3);
regs-rcr2  |= RFIG;
regs-xcr2  |= XFIG;
+   if (cpu_is_omap2430() || cpu_is_omap34xx()) {
+   regs-xccr = DXENDLY(1) | XDMAEN;
+   regs-rccr = RFULL_CYCLE | RDMAEN;
+   }
 
switch (fmt  SND_SOC_DAIFMT_FORMAT_MASK) {
case SND_SOC_DAIFMT_I2S:
-- 
1.5.6.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH][OMAPZOOM] OMAP3: Initialize XCCR and RCCR registers for McBSP DAI driver

2008-11-24 Thread Lopez Cruz, Misael
 This patch initializes XCCR and RCCR registers for OMAP McBSP DAI driver
 for
 OMAP 2430/34xx platforms. Those registers were being set to 0 as they were
 not properly initialized.
 
 Signed-off-by: Misael Lopez Cruz [EMAIL PROTECTED]
This version includes Anand and Chandra's comments.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


how to force IVA2 powerdomain OFF on boot

2008-11-24 Thread Kevin Hilman
Hello,

For some strange reason, some bootloaders (like u-boot on Beagle) seem
to power up the DSP/IVA2 during boot.  This of course will prevent
full-chip retention until the IVA is put into retention.

On several boards I've tested the PM branch, after kernel boot the
unused domains (like SGX, DSS, CAM, IVA2) are all in RET since the
init code sets next states to retention.  This is working except if
the bootloader has powered up the IVA2.

I'm trying to figure out why the IVA2 isn't going into RET, even when
iva2_fck is disabled during boot as part of the 'reset unused clocks'
feature.

I'm now trying to force the IVA2 into RET/OFF during boot by following
'Figure 14-46: IVA2 Power Down' in the TRM (see patch[1] below), but
that is not working.  IVA2 still stays ON.

Any ideas?

Kevin


[1] This is an attempt to implement Figure 14-46, and then
the 'reset unused clocks' will disable iva2_fck an finish the procedure.

[EMAIL PROTECTED]:~/work/kernel/omap/dev$ git diff
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 804b3ac..5ef7cf8 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -591,6 +591,24 @@ int __init omap3_pm_init(void)
 
(void) clkdm_for_each(clkdms_setup, NULL);
 
+   {
+   struct powerdomain *iva2_pwrdm;
+   struct clockdomain *iva2_clkdm;
+
+   iva2_pwrdm = pwrdm_lookup(iva2_pwrdm);
+   iva2_clkdm = clkdm_lookup(iva2_clkdm);
+
+   if (iva2_pwrdm  iva2_clkdm) {
+   u32 pwrst;
+
+   pwrdm_set_next_pwrst(iva2_pwrdm, PWRDM_POWER_OFF);
+   cm_write_mod_reg(0x1, OMAP3430_IVA2_MOD, CM_CLKSTCTRL);
+   prm_write_mod_reg(0, OMAP3430_IVA2_MOD, PM_WKDEP);
+   omap2_clkdm_sleep(iva2_clkdm);
+   } else 
+   printk(KERN_ERR KJH: Cannot reset IVA2\n);
+   }
+
mpu_pwrdm = pwrdm_lookup(mpu_pwrdm);
if (mpu_pwrdm == NULL) {
printk(KERN_ERR Failed to get mpu_pwrdm\n);






--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ALSA: SoC: Add support for TI SDP3430

2008-11-24 Thread Misael Lopez Cruz
This patch add ASoC support for TI SDP3430. It's based on Gumstix
Overo SoC code by Steve Sakoman.

Signed-off-by: Misael Lopez Cruz [EMAIL PROTECTED]
---
 sound/soc/omap/Kconfig   |7 ++
 sound/soc/omap/Makefile  |2 +
 sound/soc/omap/sdp3430.c |  152 ++
 3 files changed, 161 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/omap/sdp3430.c

diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index 0daeee4..e816fa4 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -38,4 +38,11 @@ config SND_OMAP_SOC_OVERO
help
  Say Y if you want to add support for SoC audio on the Gumstix Overo.
 
+config SND_OMAP_SOC_SDP3430
+   tristate SoC Audio support for Texas Instruments SDP3430
+   depends on TWL4030_CORE  SND_OMAP_SOC  MACH_OMAP_3430SDP
+   select SND_OMAP_SOC_MCBSP
+   select SND_SOC_TWL4030
+   help
+ Say Y if you want to add support for SoC audio on Texas Instruments 
SDP3430.
 
diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
index 4bae404..64e560b 100644
--- a/sound/soc/omap/Makefile
+++ b/sound/soc/omap/Makefile
@@ -10,9 +10,11 @@ snd-soc-n810-objs := n810.o
 snd-soc-omap3beagle-objs := omap3beagle.o
 snd-soc-osk5912-objs := osk5912.o
 snd-soc-overo-objs := overo.o
+snd-soc-sdp3430-objs := sdp3430.o
 
 obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
 obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o
 obj-$(CONFIG_SND_OMAP_SOC_OSK5912) += snd-soc-osk5912.o
 obj-$(CONFIG_SND_OMAP_SOC_OVERO) += snd-soc-overo.o
+obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o
 
diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c
new file mode 100644
index 000..85fd160
--- /dev/null
+++ b/sound/soc/omap/sdp3430.c
@@ -0,0 +1,152 @@
+/*
+ * sdp3430.c  --  SoC audio for TI OMAP3430 SDP
+ *
+ * Author: Misael Lopez Cruz [EMAIL PROTECTED]
+ *
+ * Based on:
+ * Author: Steve Sakoman [EMAIL PROTECTED]
+ *
+ * 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 sound/core.h
+#include sound/pcm.h
+#include sound/soc.h
+#include sound/soc-dapm.h
+
+#include asm/mach-types.h
+#include mach/hardware.h
+#include mach/gpio.h
+#include mach/mcbsp.h
+
+#include omap-mcbsp.h
+#include omap-pcm.h
+#include ../codecs/twl4030.h
+
+static int sdp3430_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;
+   int ret;
+
+   /* Set codec DAI configuration */
+   ret = snd_soc_dai_set_fmt(codec_dai,
+ SND_SOC_DAIFMT_I2S |
+ SND_SOC_DAIFMT_NB_NF |
+ SND_SOC_DAIFMT_CBM_CFM);
+   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,
+ SND_SOC_DAIFMT_I2S |
+ SND_SOC_DAIFMT_NB_NF |
+ SND_SOC_DAIFMT_CBM_CFM);
+   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, 2600,
+   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 sdp3430_ops = {
+   .hw_params = sdp3430_hw_params,
+};
+
+/* Digital audio interface glue - connects codec -- CPU */
+static struct snd_soc_dai_link sdp3430_dai = {
+   .name = TWL4030,
+   .stream_name = TWL4030,
+   .cpu_dai = omap_mcbsp_dai[0],
+   .codec_dai = twl4030_dai,
+   .ops = sdp3430_ops,
+};
+
+/* Audio machine driver */
+static struct snd_soc_machine snd_soc_machine_sdp3430 = {
+   .name = SDP3430,
+   .dai_link = sdp3430_dai,
+   .num_links = 1,
+};
+
+/* Audio subsystem */
+static struct 

[PATCH] ASoC: Fix TW4030 Kconfig dependency

2008-11-24 Thread arunks
From: Arun KS [EMAIL PROTECTED]

Fixes Kconfig dependency of TWL4030 audio codec driver
with TWL4030 core driver on both overo and omap2evm
boards

Signed-off-by: Arun KS [EMAIL PROTECTED]
---
 sound/soc/omap/Kconfig |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index 6c56277..0900437 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -24,7 +24,7 @@ config SND_OMAP_SOC_OSK5912
 
 config SND_OMAP_SOC_OVERO
tristate SoC Audio support for Gumstix Overo
-   depends on SND_OMAP_SOC  MACH_OVERO
+   depends on TWL4030_CORE  SND_OMAP_SOC  MACH_OVERO
select SND_OMAP_SOC_MCBSP
select SND_SOC_TWL4030
help
@@ -32,7 +32,7 @@ config SND_OMAP_SOC_OVERO
 
 config SND_OMAP_SOC_OMAP2EVM
tristate SoC Audio support for OMAP2EVM board
-   depends on SND_OMAP_SOC  MACH_OMAP2EVM
+   depends on TWL4030_CORE  SND_OMAP_SOC  MACH_OMAP2EVM
select SND_OMAP_SOC_MCBSP
select SND_SOC_TWL4030
help
-- 
1.5.6.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ASoC: Fix TW4030 Kconfig dependency

2008-11-24 Thread David Brownell
On Monday 24 November 2008, [EMAIL PROTECTED] wrote:
 From: Arun KS [EMAIL PROTECTED]
 
 Fixes Kconfig dependency of TWL4030 audio codec driver
 with TWL4030 core driver on both overo and omap2evm
 boards
 
 Signed-off-by: Arun KS [EMAIL PROTECTED]

Good idea.  :)

Acked-by: David Brownell [EMAIL PROTECTED]


 ---
  sound/soc/omap/Kconfig |4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
 index 6c56277..0900437 100644
 --- a/sound/soc/omap/Kconfig
 +++ b/sound/soc/omap/Kconfig
 @@ -24,7 +24,7 @@ config SND_OMAP_SOC_OSK5912
  
  config SND_OMAP_SOC_OVERO
   tristate SoC Audio support for Gumstix Overo
 - depends on SND_OMAP_SOC  MACH_OVERO
 + depends on TWL4030_CORE  SND_OMAP_SOC  MACH_OVERO
   select SND_OMAP_SOC_MCBSP
   select SND_SOC_TWL4030
   help
 @@ -32,7 +32,7 @@ config SND_OMAP_SOC_OVERO
  
  config SND_OMAP_SOC_OMAP2EVM
   tristate SoC Audio support for OMAP2EVM board
 - depends on SND_OMAP_SOC  MACH_OMAP2EVM
 + depends on TWL4030_CORE  SND_OMAP_SOC  MACH_OMAP2EVM
   select SND_OMAP_SOC_MCBSP
   select SND_SOC_TWL4030
   help
 -- 
 1.5.6.3
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
 


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAPZOOM] OMAP: DISPLAY: Code Clean up Trailing Whitespace

2008-11-24 Thread Trilok Soni
Hi,

 ---
  drivers/media/video/omap/Makefile  |2 +-
  drivers/media/video/omap/omap24xxlib.c |   64 +++---
  drivers/media/video/omap/omap24xxlib.h |4 +-
  drivers/media/video/omap/omap24xxvout.c|  294 
 ++--
  drivers/media/video/omap/omap24xxvout.h|6 +-
  drivers/media/video/omap/omap24xxvoutdef.h |   32 ++--
  6 files changed, 201 insertions(+), 201 deletions(-)

Where did you get video/omap directory in linux-omap master? From
which branch you have based this patch?

-- 
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAPZOOM] OMAP: DISPLAY: Code Clean up Trailing Whitespace

2008-11-24 Thread Ogeid Alavaz
Hi Soni,

the video/omap directory is at omapzoom.org kernel, from master branch,
it has been removed from linux-omap kernel and pass it to v4l2 kernel,
thats what I had understand.

On Tue, Nov 25, 2008 at 12:09 AM, Trilok Soni [EMAIL PROTECTED] wrote:
 Hi,

 ---
  drivers/media/video/omap/Makefile  |2 +-
  drivers/media/video/omap/omap24xxlib.c |   64 +++---
  drivers/media/video/omap/omap24xxlib.h |4 +-
  drivers/media/video/omap/omap24xxvout.c|  294 
 ++--
  drivers/media/video/omap/omap24xxvout.h|6 +-
  drivers/media/video/omap/omap24xxvoutdef.h |   32 ++--
  6 files changed, 201 insertions(+), 201 deletions(-)

 Where did you get video/omap directory in linux-omap master? From
 which branch you have based this patch?

 --
 ---Trilok Soni
 http://triloksoni.wordpress.com
 http://www.linkedin.com/in/triloksoni




-- 
Diego
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAPZOOM] OMAP: DISPLAY: Code Clean up Trailing Whitespace

2008-11-24 Thread Trilok Soni
Hi Ogeid,

On Tue, Nov 25, 2008 at 12:11 PM, Ogeid Alavaz [EMAIL PROTECTED] wrote:
 Hi Soni,

 the video/omap directory is at omapzoom.org kernel, from master branch,
 it has been removed from linux-omap kernel and pass it to v4l2 kernel,
 thats what I had understand.


  drivers/media/video/omap/Makefile  |2 +-
  drivers/media/video/omap/omap24xxlib.c |   64 +++---
  drivers/media/video/omap/omap24xxlib.h |4 +-
  drivers/media/video/omap/omap24xxvout.c|  294 
 ++--
  drivers/media/video/omap/omap24xxvout.h|6 +-
  drivers/media/video/omap/omap24xxvoutdef.h |   32 ++--
  6 files changed, 201 insertions(+), 201 deletions(-)

Not really. Some one need to submit omap24xxcam and omap16xxcam driver
to v4l2-list, not one has done this yet. Also I don't remember when
this omap24xxlib.[ch] and vout.[ch] was accepted in the linux-omap?

I am taking liberty to CC linux-omap list.

-- 
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] [OMAPZOOM] OMAP: DISPLAY: Code Clean up Trailing Whitespace

2008-11-24 Thread Hiremath, Vaibhav


Thanks,
Vaibhav Hiremath

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:linux-omap-
 [EMAIL PROTECTED] On Behalf Of Trilok Soni
 Sent: Tuesday, November 25, 2008 12:14 PM
 To: Ogeid Alavaz
 Cc: linux-omap@vger.kernel.org
 Subject: Re: [PATCH] [OMAPZOOM] OMAP: DISPLAY: Code Clean up
 Trailing Whitespace
 
 Hi Ogeid,
 
 On Tue, Nov 25, 2008 at 12:11 PM, Ogeid Alavaz [EMAIL PROTECTED]
 wrote:
  Hi Soni,
 
  the video/omap directory is at omapzoom.org kernel, from master
 branch,
  it has been removed from linux-omap kernel and pass it to v4l2
 kernel,
  thats what I had understand.
 
 
   drivers/media/video/omap/Makefile  |2 +-
   drivers/media/video/omap/omap24xxlib.c |   64 +++---
   drivers/media/video/omap/omap24xxlib.h |4 +-
   drivers/media/video/omap/omap24xxvout.c|  294
 ++--
   drivers/media/video/omap/omap24xxvout.h|6 +-
   drivers/media/video/omap/omap24xxvoutdef.h |   32 ++--
   6 files changed, 201 insertions(+), 201 deletions(-)
 
 Not really. Some one need to submit omap24xxcam and omap16xxcam
 driver
 to v4l2-list, not one has done this yet. Also I don't remember when
 this omap24xxlib.[ch] and vout.[ch] was accepted in the linux-omap?
 
[Hiremath, Vaibhav] under omap-linux, there is no support for DSS driver, the 
files you are referring to are part of omapzoom. Don't get confused between two 
trees, both the trees are different and has different set of features/code-base 
supported.

 I am taking liberty to CC linux-omap list.
 
 --
 ---Trilok Soni
 http://triloksoni.wordpress.com
 http://www.linkedin.com/in/triloksoni
 --
 To unsubscribe from this list: send the line unsubscribe linux-
 omap in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAPZOOM] OMAP: DISPLAY: Code Clean up Trailing Whitespace

2008-11-24 Thread Ogeid Alavaz
a ok, does files are at omapzoom.org project, and you are correct,
there are not at linux-ompa kernel.

I think is a confusion.


On Tue, Nov 25, 2008 at 12:44 AM, Trilok Soni [EMAIL PROTECTED] wrote:
 Hi Ogeid,

 On Tue, Nov 25, 2008 at 12:11 PM, Ogeid Alavaz [EMAIL PROTECTED] wrote:
 Hi Soni,

 the video/omap directory is at omapzoom.org kernel, from master branch,
 it has been removed from linux-omap kernel and pass it to v4l2 kernel,
 thats what I had understand.


  drivers/media/video/omap/Makefile  |2 +-
  drivers/media/video/omap/omap24xxlib.c |   64 +++---
  drivers/media/video/omap/omap24xxlib.h |4 +-
  drivers/media/video/omap/omap24xxvout.c|  294 
 ++--
  drivers/media/video/omap/omap24xxvout.h|6 +-
  drivers/media/video/omap/omap24xxvoutdef.h |   32 ++--
  6 files changed, 201 insertions(+), 201 deletions(-)

 Not really. Some one need to submit omap24xxcam and omap16xxcam driver
 to v4l2-list, not one has done this yet. Also I don't remember when
 this omap24xxlib.[ch] and vout.[ch] was accepted in the linux-omap?

 I am taking liberty to CC linux-omap list.

 --
 ---Trilok Soni
 http://triloksoni.wordpress.com
 http://www.linkedin.com/in/triloksoni




-- 
Diego
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: v4l2_device/v4l2_subdev: please review

2008-11-24 Thread Trilok Soni
Hi Hans,

On Tue, Nov 25, 2008 at 3:39 AM, Hans Verkuil [EMAIL PROTECTED] wrote:
 Hi all,

 I've finally tracked down the last oops so I could make a new tree with
 all the latest changes.


Please send these patches to mailing list (git-send-email?) for easy
review. Also CCing LKML for wider view is also good, as we are doing
some core changes right?

-- 
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] i2c: i2c-omap: Fix BUFSTAT_REG reading

2008-11-24 Thread ext-eero . nurkkala
From: Eero Nurkkala [EMAIL PROTECTED]

The amount of bytes to receive is read from wrong
place with omap 2430 and omap 3430. It is the 6 bits
starting from the bit 8 from BUFSTAT_REG that indicate
this amount. Not the 8 LSB:s. Only 6 LSB:s are used
for the TX buffer. Moreover, only the 6 LSB:s are
relevant for XDR.

Signed-off-by: Eero Nurkkala [EMAIL PROTECTED]
---
 drivers/i2c/busses/i2c-omap.c |   25 +++--
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 96f3bed..630702c 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -672,11 +672,19 @@ omap_i2c_isr(int this_irq, void *dev_id)
if (stat  (OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR)) {
u8 num_bytes = 1;
if (dev-fifo_size) {
-   if (stat  OMAP_I2C_STAT_RRDY)
+   if (stat  OMAP_I2C_STAT_RRDY) {
num_bytes = dev-fifo_size;
-   else
-   num_bytes = omap_i2c_read_reg(dev,
+   } else {
+   if (dev-rev = OMAP_I2C_REV_ON_2430)
+   num_bytes =
+   (omap_i2c_read_reg(dev,
+OMAP_I2C_BUFSTAT_REG)
+ 8)  0x3F;
+   else
+   num_bytes =
+   omap_i2c_read_reg(dev,
OMAP_I2C_BUFSTAT_REG);
+   }
}
while (num_bytes) {
num_bytes--;
@@ -711,11 +719,16 @@ omap_i2c_isr(int this_irq, void *dev_id)
if (stat  (OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR)) {
u8 num_bytes = 1;
if (dev-fifo_size) {
-   if (stat  OMAP_I2C_STAT_XRDY)
+   if (stat  OMAP_I2C_STAT_XRDY) {
num_bytes = dev-fifo_size;
-   else
-   num_bytes = omap_i2c_read_reg(dev,
+   } else {
+   num_bytes =
+   omap_i2c_read_reg(dev,
OMAP_I2C_BUFSTAT_REG);
+
+   if (dev-rev = OMAP_I2C_REV_ON_2430)
+   num_bytes = 0x3F;
+   }
}
while (num_bytes) {
num_bytes--;
-- 
1.6.0

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] i2c: i2c-omap: Fix standard and fast mode prescalers

2008-11-24 Thread ext-eero . nurkkala
From: Eero Nurkkala [EMAIL PROTECTED]

The prescalers for 100 kHz and 400 kHz mode
are wrong for omap 3430 and omap 2430. The
internal clock is the fclock divided by the
prescaler. The PSC is an 8 bit field in
omap3430 and omap2430. Moreover, the scll and
sclh values should be adjusted properly.
Having the correct prescaler is important in
the process of getting a finite i2c clock. In
addition, the prescaler is used in the process
of activating the correct noise filter and thus,
lets more error resilient i2c communications.

Signed-off-by: Eero Nurkkala [EMAIL PROTECTED]
---
 drivers/i2c/busses/i2c-omap.c |   12 +---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 630702c..c21af3f 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -337,7 +337,13 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
if (cpu_is_omap2430() || cpu_is_omap34xx()) {
 
/* HSI2C controller internal clk rate should be 19.2 Mhz */
-   internal_clk = 19200;
+   if (dev-speed  400)
+   internal_clk = 19200;
+   else if (dev-speed  100)
+   internal_clk = 9600;
+   else
+   internal_clk = 4000;
+
fclk_rate = clk_get_rate(dev-fclk) / 1000;
 
/* Compute prescaler divisor */
@@ -355,8 +361,8 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
hssclh = fclk_rate / (dev-speed * 2) - 6;
} else {
/* To handle F/S modes */
-   fsscll = internal_clk / (dev-speed * 2) - 6;
-   fssclh = internal_clk / (dev-speed * 2) - 6;
+   fsscll = internal_clk / (dev-speed * 2) - 7;
+   fssclh = internal_clk / (dev-speed * 2) - 5;
}
scll = (hsscll  OMAP_I2C_SCLL_HSSCLL) | fsscll;
sclh = (hssclh  OMAP_I2C_SCLH_HSSCLH) | fssclh;
-- 
1.6.0

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: how to force IVA2 powerdomain OFF on boot

2008-11-24 Thread Hiroshi DOYU
Hi Kevin,

From: ext Kevin Hilman [EMAIL PROTECTED]
Subject: how to force IVA2 powerdomain OFF on boot
Date: Mon, 24 Nov 2008 18:05:59 -0800

 Hello,
 
 For some strange reason, some bootloaders (like u-boot on Beagle) seem
 to power up the DSP/IVA2 during boot.  This of course will prevent
 full-chip retention until the IVA is put into retention.
 
 On several boards I've tested the PM branch, after kernel boot the
 unused domains (like SGX, DSS, CAM, IVA2) are all in RET since the
 init code sets next states to retention.  This is working except if
 the bootloader has powered up the IVA2.
 
 I'm trying to figure out why the IVA2 isn't going into RET, even when
 iva2_fck is disabled during boot as part of the 'reset unused clocks'
 feature.
 
 I'm now trying to force the IVA2 into RET/OFF during boot by following
 'Figure 14-46: IVA2 Power Down' in the TRM (see patch[1] below), but
 that is not working.  IVA2 still stays ON.
 
 Any ideas?

I think that, this is because there's no 'Figure 14-45' steps, which
goes into 'IVA2 ready to go to off mode', before the following code?

The explanation in 'Figure 14-45' says:

 The user must also ensure that no other instruction is executed
 parallel to the IDLE instruction. When IVA2 is ready to go to off
 mode, there are two ways to completely shut down IVA2 subsystem (see
 Figure 14-46):

So I guess that 'Figure 14-45' should be done in DSP side for 'Figure
14-46' in advance?

Hiroshi DOYU

 
 Kevin
 
 
 [1] This is an attempt to implement Figure 14-46, and then
 the 'reset unused clocks' will disable iva2_fck an finish the procedure.
 
 [EMAIL PROTECTED]:~/work/kernel/omap/dev$ git diff
 diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
 index 804b3ac..5ef7cf8 100644
 --- a/arch/arm/mach-omap2/pm34xx.c
 +++ b/arch/arm/mach-omap2/pm34xx.c
 @@ -591,6 +591,24 @@ int __init omap3_pm_init(void)
  
   (void) clkdm_for_each(clkdms_setup, NULL);
  
 + {
 + struct powerdomain *iva2_pwrdm;
 + struct clockdomain *iva2_clkdm;
 +
 + iva2_pwrdm = pwrdm_lookup(iva2_pwrdm);
 + iva2_clkdm = clkdm_lookup(iva2_clkdm);
 +
 + if (iva2_pwrdm  iva2_clkdm) {
 + u32 pwrst;
 +
 + pwrdm_set_next_pwrst(iva2_pwrdm, PWRDM_POWER_OFF);
 + cm_write_mod_reg(0x1, OMAP3430_IVA2_MOD, CM_CLKSTCTRL);
 + prm_write_mod_reg(0, OMAP3430_IVA2_MOD, PM_WKDEP);
 + omap2_clkdm_sleep(iva2_clkdm);
 + } else 
 + printk(KERN_ERR KJH: Cannot reset IVA2\n);
 + }
 +
   mpu_pwrdm = pwrdm_lookup(mpu_pwrdm);
   if (mpu_pwrdm == NULL) {
   printk(KERN_ERR Failed to get mpu_pwrdm\n);
 
 
 
 
 
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: v4l2_device/v4l2_subdev: please review

2008-11-24 Thread Trilok Soni
Hi Hans,


 I'm not going to spam the list with these quite big patches. Just go to
 http://linuxtv.org/hg/~hverkuil/v4l-dvb-ng/ and click on the 'raw' link
 after each change to see the patch. Most of these changes are just
 boring i2c driver conversions.

It is hard to review these patches from this link, as if you submit
the patch to ML then someone can just give inline comments to your
patch, otherwise reviewer has to copy that code which he/she wants to
comment while replying and not easy to track too. I don't know size
limit of this v4l2 ML, but linux-kernel ML can receive somewhat big
patches I believe.


 We are adding to the v4l core, but the changes do not affect existing
 v4l drivers let alone other subsystems. Although I should probably have
 added the omap list.

OMAP + soc-camera + v4l2-int-* community would be more interested to
see these patches as they need to change their sensor/controller
drivers to adapt your changes.

-- 
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html