Re: [RFC,v3] Add a driver for the Somagic smi2021 chip

2013-09-02 Thread Jon Arne Jørgensen
On Mon, Sep 02, 2013 at 03:50:14AM +0800, Wang Shilong wrote: Hi, > Hello, Using checkpatch.pl, i get the following warnings(errors): > WARNING: Avoid CamelCase: descriptor.idProduct> > #1766: FILE: drivers/media/usb/smi2021/smi2021_main.c:790: > + if (udev->descriptor.idProduct == BOOTLOADER_I

[RFC v3] Add a driver for the somagic smi2021 chip

2013-09-01 Thread Jon Arne Jørgensen
_BUFS/QUERYBUF: OK Total: 36, Succeeded: 36, Failed: 0, Warnings: 0 Jon Arne Jørgensen (1): media: Add a driver for the Somagic smi2021 chip drivers/media/usb/Kconfig | 1 + drivers/media/usb/Makefile | 1 + drivers/media/usb/smi2021/Kc

[RFC v4 3/3] saa7115: Implement i2c_board_info.platform_data

2013-08-03 Thread Jon Arne Jørgensen
This patch implements i2c_board_info.platform_data, and some options to override the default initialization table for the GM7113C and SAA7113 chips. Signed-off-by: Jon Arne Jørgensen --- drivers/media/i2c/saa7115.c | 128 --- drivers/media/i2c

[RFC v4 2/3] saa7115: Do not load saa7115_init_misc for gm7113c

2013-08-03 Thread Jon Arne Jørgensen
Most of the registers changed in saa7115_init_misc table are out of range for the gm7113c chip. The only register that's within range, don't need to be changed here. Signed-off-by: Jon Arne Jørgensen --- drivers/media/i2c/saa7115.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[RFC v4 0/3] saa7115: Implement i2c_board_info.platform_data

2013-08-03 Thread Jon Arne Jørgensen
ere: https://lkml.org/lkml/2013/5/29/558 Jon Arne Jørgensen (3): saa7115: Fix saa711x_set_v4lstd for gm7113c saa7115: Do not load saa7115_init_misc for gm7113c saa7115: Implement i2c_board_info.platform_data drivers/media/i2c/saa7115.c | 167 +++ drivers

[RFC v4 1/3] saa7115: Fix saa711x_set_v4lstd for gm7113c

2013-08-03 Thread Jon Arne Jørgensen
saa711x_set_v4lstd would toggle several bits that should not be touched when changing std. This patch fixes this. Signed-off-by: Jon Arne Jørgensen --- drivers/media/i2c/saa7115.c | 37 + drivers/media/i2c/saa711x_regs.h | 4 2 files changed, 17

Re: [RFC v3 3/3] saa7115: Implement i2c_board_info.platform_data

2013-07-30 Thread Jon Arne Jørgensen
Hi Hans, Seems I've had some trouble with my mailserver that caused your message to bounce. I had to download your email from a mailinglist archive. On Wed, Jul 03, 2013 at 10:27:20PM -, hans.verk...@cisco.com wrote: > Hi Jon Arne, > > Patches 1 & 2 look good to me. But I do have a few comm

[RFC v3 2/3] saa7115: Do not load saa7115_init_misc for gm7113c

2013-07-03 Thread Jon Arne Jørgensen
Most of the registers changed in saa7115_init_misc table are out of range for the gm7113c chip. The only register that's within range doesn't need to be changed here. Signed-off-by: Jon Arne Jørgensen --- drivers/media/i2c/saa7115.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[RFC v3 1/3] saa7115: Fix saa711x_set_v4lstd for gm7113c

2013-07-03 Thread Jon Arne Jørgensen
saa711x_set_v4lstd would toggle several bits that should not be touched when changing std. This could potentially override configurations set in platform_data. This patch should fix that problem. Signed-off-by: Jon Arne Jørgensen --- drivers/media/i2c/saa7115.c | 37

[RFC v3 0/3] saa7115: Implement i2c_board_info.platform_data

2013-07-03 Thread Jon Arne Jørgensen
/5/29/558 Jon Arne Jørgensen (3): saa7115: Fix saa711x_set_v4lstd for gm7113c saa7115: Do not load saa7115_init_misc for gm7113c saa7115: Implement i2c_board_info.platform_data drivers/media/i2c/saa7115.c | 183 +++ drivers/media/i2c/saa711x_regs.h

[RFC v3 3/3] saa7115: Implement i2c_board_info.platform_data

2013-07-03 Thread Jon Arne Jørgensen
an option to the platform_data struct to choose the gm7113c_init table even if you are writing a driver for the saa7113 chip. This implementation is only adding overrides for the SAA7113 and GM7113C chips. Signed-off-by: Jon Arne Jørgensen --- drivers/media/i2c/saa7115.c

Re: [RFC v2 1/2] saa7115: Implement i2c_board_info.platform_data

2013-06-09 Thread Jon Arne Jørgensen
On Sun, Jun 09, 2013 at 11:36:55AM +0200, Hans Verkuil wrote: > On Sat June 8 2013 19:29:41 Jon Arne Jørgensen wrote: > > On Fri, Jun 07, 2013 at 11:12:47AM +0200, Hans Verkuil wrote: > > > On Fri May 31 2013 13:40:25 Jon Arne Jørgensen wrote: > > > > Implemen

Re: [RFC v2 1/2] saa7115: Implement i2c_board_info.platform_data

2013-06-08 Thread Jon Arne Jørgensen
On Fri, Jun 07, 2013 at 11:12:47AM +0200, Hans Verkuil wrote: > On Fri May 31 2013 13:40:25 Jon Arne Jørgensen wrote: > > Implement i2c_board_info.platform_data handling in the driver so we can > > make device specific changes to the chips we support. > > > > Signed

Re: [RFC v2 2/2] saa7115: Remove gm7113c video_std register change

2013-06-08 Thread Jon Arne Jørgensen
On Fri, Jun 07, 2013 at 11:01:06AM +0200, Hans Verkuil wrote: > On Fri May 31 2013 13:40:26 Jon Arne Jørgensen wrote: > > On video std change, the driver would disable the automatic field > > detection on the gm7113c chip, and force either 50Hz or 60Hz. > > Don't do this

Re: [RFC 1/3] saa7115: Set saa7113 init to values from datasheet

2013-05-31 Thread Jon Arne Jørgensen
On Fri, May 31, 2013 at 10:08:27AM -0300, Mauro Carvalho Chehab wrote: > Em Thu, 30 May 2013 21:00:01 +0200 > Jon Arne Jørgensen escreveu: > > > On Thu, May 30, 2013 at 08:33:32AM +0300, Timo Teras wrote: > > > On Thu, 30 May 2013 07:21:36 +0200 > > > Jon Arne Jø

[RFC v2 1/2] saa7115: Implement i2c_board_info.platform_data

2013-05-31 Thread Jon Arne Jørgensen
Implement i2c_board_info.platform_data handling in the driver so we can make device specific changes to the chips we support. Signed-off-by: Jon Arne Jørgensen --- drivers/media/i2c/saa7115.c | 101 +-- drivers/media/i2c/saa711x_regs.h | 8

[RFC v2 0/2] saa7115: Implement i2c_board_info.platform_data

2013-05-31 Thread Jon Arne Jørgensen
at set the i2c_board_info.platform data. I've also tried to give the different overrides some less obscure names. Jon Arne Jørgensen (2): saa7115: Implement i2c_board_info.platform_data saa7115: Remove gm7113c video_std register change drivers/media/i2c/saa7115.c | 127 ++---

[RFC v2 2/2] saa7115: Remove gm7113c video_std register change

2013-05-31 Thread Jon Arne Jørgensen
On video std change, the driver would disable the automatic field detection on the gm7113c chip, and force either 50Hz or 60Hz. Don't do this any more. Signed-off-by: Jon Arne Jørgensen --- drivers/media/i2c/saa7115.c | 26 ++ 1 file changed, 2 insertions(+

Re: [RFC 1/3] saa7115: Set saa7113 init to values from datasheet

2013-05-30 Thread Jon Arne Jørgensen
On Thu, May 30, 2013 at 08:33:32AM +0300, Timo Teras wrote: > On Thu, 30 May 2013 07:21:36 +0200 > Jon Arne Jørgensen wrote: > > > On Wed, May 29, 2013 at 10:19:49PM -0400, Andy Walls wrote: > > > Mauro Carvalho Chehab wrote: > > > > > > >Em We

Re: [RFC 1/3] saa7115: Set saa7113 init to values from datasheet

2013-05-29 Thread Jon Arne Jørgensen
On Wed, May 29, 2013 at 10:19:49PM -0400, Andy Walls wrote: > Mauro Carvalho Chehab wrote: > > >Em Wed, 29 May 2013 22:41:16 +0200 > >Jon Arne Jørgensen escreveu: > > > >> Change all default values in the initial setup table to match the > >table > >

Re: [RFC 3/3] saa7115: Implement i2c_board_info.platform data

2013-05-29 Thread Jon Arne Jørgensen
On Wed, May 29, 2013 at 10:41:18PM +0200, Jon Arne Jørgensen wrote: > Implement i2c_board_info.platform_data handling in the driver so we can > make device specific changes to the chips we support. > > Signed-off-by: Jon Arne Jørgensen > --- > drivers/media/i

Re: [RFC 0/3] saa7115: Implement i2c_board_info.platform_data

2013-05-29 Thread Jon Arne Jørgensen
On Wed, May 29, 2013 at 10:41:15PM +0200, Jon Arne Jørgensen wrote: > This patch set adds handling of the i2c_board_info struct to the saa7115 > driver. > The main goal of this patch is to give the different devices with the gm7113c > chip an opportunity to configure the chip to

[RFC 3/3] saa7115: Implement i2c_board_info.platform data

2013-05-29 Thread Jon Arne Jørgensen
Implement i2c_board_info.platform_data handling in the driver so we can make device specific changes to the chips we support. Signed-off-by: Jon Arne Jørgensen --- drivers/media/i2c/saa7115.c | 62 +++-- include/media/saa7115.h | 109

[RFC 2/3] saa7115: Remove unneeded register change for gm7113c

2013-05-29 Thread Jon Arne Jørgensen
On video std change, the driver would disable the automatic field detection on the gm7113c chip, and force either 50Hz or 60Hz. Don't do this any more. Signed-off-by: Jon Arne Jørgensen --- drivers/media/i2c/saa7115.c | 25 ++--- 1 file changed, 2 insertions(+), 23 dele

[RFC 1/3] saa7115: Set saa7113 init to values from datasheet

2013-05-29 Thread Jon Arne Jørgensen
Change all default values in the initial setup table to match the table in the datasheet. Signed-off-by: Jon Arne Jørgensen --- drivers/media/i2c/saa7115.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/i2c/saa7115.c b/drivers/media/i2c/saa7115.c

[RFC 0/3] saa7115: Implement i2c_board_info.platform_data

2013-05-29 Thread Jon Arne Jørgensen
introduce some unneeded code duplication. Jon Arne Jørgensen (3): saa7115: Set saa7113 init to values from datasheet saa7115: [gm7113c] Remove unneeded register change saa7115: Implement i2c_board_info.platform data drivers/media/i2c/saa7115.c | 91 inc

Re: [RFC V2 1/3] [smi2021] Add gm7113c chip to the saa7115 driver

2013-04-25 Thread Jon Arne Jørgensen
On Thu, Apr 25, 2013 at 05:36:29PM -0300, Mauro Carvalho Chehab wrote: > Em Thu, 25 Apr 2013 17:13:28 -0300 > Mauro Carvalho Chehab escreveu: > > > Em Thu, 25 Apr 2013 21:10:18 +0200 > > Jon Arne Jørgensen escreveu: > > > > > The somagic device uses the g

Re: [RFC V2 1/3] [smi2021] Add gm7113c chip to the saa7115 driver

2013-04-25 Thread Jon Arne Jørgensen
On Thu, Apr 25, 2013 at 05:13:28PM -0300, Mauro Carvalho Chehab wrote: > Em Thu, 25 Apr 2013 21:10:18 +0200 > Jon Arne Jørgensen escreveu: > > > The somagic device uses the gm7113c chip to digitize analog video, > > this is a clone of the saa7113 chip. > > > >

[RFC V2 1/3] [smi2021] Add gm7113c chip to the saa7115 driver

2013-04-25 Thread Jon Arne Jørgensen
The somagic device uses the gm7113c chip to digitize analog video, this is a clone of the saa7113 chip. The gm7113c can't be identified over i2c, so I can't rely on saa7115 autodetection. Signed-off-by: Jon Arne Jørgensen --- drivers/media/i2c/saa7115.

[RFC V2 0/3] Add a driver for Somagic smi2021

2013-04-25 Thread Jon Arne Jørgensen
sb/smi2021/smi2021_main.c create mode 100644 drivers/media/usb/smi2021/smi2021_v4l2.c create mode 100644 drivers/media/usb/smi2021/smi2021_video.c Comments are welcome. Best regards, Jon Arne Jørgensen -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

[RFC V2 3/3] [smi2021] Add smi2021 driver to buildsystem

2013-04-25 Thread Jon Arne Jørgensen
Signed-off-by: Jon Arne Jørgensen --- drivers/media/usb/Kconfig | 1 + drivers/media/usb/Makefile | 1 + drivers/media/usb/smi2021/Kconfig | 11 +++ drivers/media/usb/smi2021/Makefile | 10 ++ 4 files changed, 23 insertions(+) create mode 100644 drivers

Re: [RFC V1 4/8] smi2021: Add smi2021_v4l2.c

2013-03-20 Thread Jon Arne Jørgensen
On Wed, Mar 20, 2013 at 11:21:48AM +0100, Hans Verkuil wrote: > On Wed 20 March 2013 11:16:26 Jon Arne Jørgensen wrote: > > On Wed, Mar 20, 2013 at 11:10:57AM +0100, Hans Verkuil wrote: > > > On Wed 20 March 2013 10:48:42 Jon Arne Jørgensen wrote: > > > > On Mon, Ma

Re: [RFC V1 4/8] smi2021: Add smi2021_v4l2.c

2013-03-20 Thread Jon Arne Jørgensen
On Wed, Mar 20, 2013 at 11:10:57AM +0100, Hans Verkuil wrote: > On Wed 20 March 2013 10:48:42 Jon Arne Jørgensen wrote: > > On Mon, Mar 18, 2013 at 09:29:07AM +0100, Hans Verkuil wrote: > > > On Thu March 14 2013 15:07:00 Jon Arne Jørgensen wrote: > > > > This file

Re: [RFC V1 0/8] Add a driver for somagic smi2021

2013-03-20 Thread Jon Arne Jørgensen
On Sun, Mar 17, 2013 at 09:05:08PM -0300, Ezequiel Garcia wrote: > Hi Jon, > > On Sun, Mar 17, 2013 at 09:01:58PM +0100, Jon Arne Jørgensen wrote: > > On Fri, Mar 15, 2013 at 09:08:58AM -0300, Ezequiel Garcia wrote: > > > On Thu, Mar 14, 2013 at 03:06:56PM +0100,

Re: [RFC V1 5/8] smi2021: Add smi2021_video.c

2013-03-20 Thread Jon Arne Jørgensen
On Mon, Mar 18, 2013 at 09:58:32AM +0100, Bjørn Mork wrote: > Hans Verkuil writes: > > >> +/* > >> + * > >> + * The device delivers data in chunks of 0x400 bytes. > >> + * The four first bytes is a magic header to identify the chunks. > >> + *0xaa 0xaa 0x00 0x00 = saa7113 Active Video Dat

Re: [RFC V1 4/8] smi2021: Add smi2021_v4l2.c

2013-03-20 Thread Jon Arne Jørgensen
On Mon, Mar 18, 2013 at 09:29:07AM +0100, Hans Verkuil wrote: > On Thu March 14 2013 15:07:00 Jon Arne Jørgensen wrote: > > This file is responsible for registering the device with the v4l2 subsystem, > > and the communication with v4l2. > > Most of the v4l2 ioctls are just

Re: [RFC V1 4/8] smi2021: Add smi2021_v4l2.c

2013-03-20 Thread Jon Arne Jørgensen
On Mon, Mar 18, 2013 at 09:12:31AM +0100, Hans Verkuil wrote: > On Thu March 14 2013 15:07:00 Jon Arne Jørgensen wrote: > > This file is responsible for registering the device with the v4l2 subsystem, > > and the communication with v4l2. > > Most of the v4l2 ioctls are just

Re: [RFC V1 3/8] smi2021: Add smi2021_i2c.c

2013-03-20 Thread Jon Arne Jørgensen
On Mon, Mar 18, 2013 at 09:04:56AM +0100, Hans Verkuil wrote: > On Thu March 14 2013 15:06:59 Jon Arne Jørgensen wrote: > > This file is responsible for registering the device > > with the kernel i2c subsystem. > > v4l2 talks to the saa7113 chip of the device via i2c. > &

Re: [RFC V1 2/8] smi2021: Add smi2021_main.c

2013-03-20 Thread Jon Arne Jørgensen
On Mon, Mar 18, 2013 at 09:30:38AM +0100, Hans Verkuil wrote: > On Thu March 14 2013 15:06:58 Jon Arne Jørgensen wrote: > > This is the core of the smi2021 module. > > It will register the module with the kernel, and register the > > usb probe function. > > > >

Re: [RFC V1 2/8] smi2021: Add smi2021_main.c

2013-03-20 Thread Jon Arne Jørgensen
On Mon, Mar 18, 2013 at 08:58:47AM +0100, Hans Verkuil wrote: > Hi Jon Arne, > > Here is my review of this driver. > Great, thank you. > Regards, > > Hans > > On Thu March 14 2013 15:06:58 Jon Arne Jørgensen wrote: > > This is the core of the smi2021

Re: [RFC V1 7/8] smi2021: Add smi2021_bl.c

2013-03-20 Thread Jon Arne Jørgensen
On Mon, Mar 18, 2013 at 10:31:14AM +0100, Bjørn Mork wrote: > Jon Arne Jørgensen writes: > > > This is the smi2021-bootloader module. > > This module will upload the firmware for the different somagic devices. > > I really don't understand why you want to make that

Re: [RFC V1 4/8] smi2021: Add smi2021_v4l2.c

2013-03-17 Thread Jon Arne Jørgensen
On Fri, Mar 15, 2013 at 09:33:20AM -0300, Ezequiel Garcia wrote: > On Thu, Mar 14, 2013 at 03:07:00PM +0100, Jon Arne Jørgensen wrote: > > This file is responsible for registering the device with the v4l2 subsystem, > > and the communication with v4l2. > > Most of the v4l2 i

Re: [RFC V1 5/8] smi2021: Add smi2021_video.c

2013-03-17 Thread Jon Arne Jørgensen
On Fri, Mar 15, 2013 at 09:40:35AM -0300, Ezequiel Garcia wrote: > On Thu, Mar 14, 2013 at 03:07:01PM +0100, Jon Arne Jørgensen wrote: > > This file is responsible for all communication with the video hardware > > and also starting and stopping the capture. > > > > It

Re: [RFC V1 1/8] smi2021: Add the header file

2013-03-17 Thread Jon Arne Jørgensen
On Fri, Mar 15, 2013 at 09:13:10AM -0300, Ezequiel Garcia wrote: > On Thu, Mar 14, 2013 at 03:06:57PM +0100, Jon Arne Jørgensen wrote: > > This is the header file for the smi2021 module. > > > > Signed-off-by: Jon Arne Jørgensen > > --- > > drivers/

Re: [RFC V1 2/8] smi2021: Add smi2021_main.c

2013-03-17 Thread Jon Arne Jørgensen
On Fri, Mar 15, 2013 at 09:20:58AM -0300, Ezequiel Garcia wrote: > On Thu, Mar 14, 2013 at 03:06:58PM +0100, Jon Arne Jørgensen wrote: > > This is the core of the smi2021 module. > > It will register the module with the kernel, and register the > > usb probe function. > &

Re: [RFC V1 0/8] Add a driver for somagic smi2021

2013-03-17 Thread Jon Arne Jørgensen
On Fri, Mar 15, 2013 at 09:08:58AM -0300, Ezequiel Garcia wrote: > On Thu, Mar 14, 2013 at 03:06:56PM +0100, Jon Arne Jørgensen wrote: > > This patch-set will add a driver for the Somagic SMI2021 chip. > > > > This chip is found inside different usb video-capture devices.

Re: [RFC V1 3/8] smi2021: Add smi2021_i2c.c

2013-03-17 Thread Jon Arne Jørgensen
On Fri, Mar 15, 2013 at 09:27:54AM -0300, Ezequiel Garcia wrote: > On Thu, Mar 14, 2013 at 03:06:59PM +0100, Jon Arne Jørgensen wrote: > > This file is responsible for registering the device > > with the kernel i2c subsystem. > > v4l2 talks to the saa7113 chip

[RFC V1 1/8] smi2021: Add the header file

2013-03-14 Thread Jon Arne Jørgensen
This is the header file for the smi2021 module. Signed-off-by: Jon Arne Jørgensen --- drivers/media/usb/smi2021/smi2021.h | 228 1 file changed, 228 insertions(+) create mode 100644 drivers/media/usb/smi2021/smi2021.h diff --git a/drivers/media/usb/smi2021

[RFC V1 3/8] smi2021: Add smi2021_i2c.c

2013-03-14 Thread Jon Arne Jørgensen
This file is responsible for registering the device with the kernel i2c subsystem. v4l2 talks to the saa7113 chip of the device via i2c. Signed-off-by: Jon Arne Jørgensen --- drivers/media/usb/smi2021/smi2021_i2c.c | 160 1 file changed, 160 insertions

[RFC V1 4/8] smi2021: Add smi2021_v4l2.c

2013-03-14 Thread Jon Arne Jørgensen
This file is responsible for registering the device with the v4l2 subsystem, and the communication with v4l2. Most of the v4l2 ioctls are just passed on to vidbuf2. Signed-off-by: Jon Arne Jørgensen --- drivers/media/usb/smi2021/smi2021_v4l2.c | 566 +++ 1 file

[RFC V1 5/8] smi2021: Add smi2021_video.c

2013-03-14 Thread Jon Arne Jørgensen
This file is responsible for all communication with the video hardware and also starting and stopping the capture. It also contains the setup and handling of the usb ISOCHRONOUS transfers. Signed-off-by: Jon Arne Jørgensen --- drivers/media/usb/smi2021/smi2021_video.c | 543

[RFC V1 6/8] smi2021: Add smi2021_audio.c

2013-03-14 Thread Jon Arne Jørgensen
This file handles all setup of a new snd_card instance with one pcm_substream. It's also responsible for parsing the raw pcm data received in the isoc transfers, and passing it to the alsa buffers. Signed-off-by: Jon Arne Jørgensen --- drivers/media/usb/smi2021/smi2021_audio.c

[RFC V1 0/8] Add a driver for somagic smi2021

2013-03-14 Thread Jon Arne Jørgensen
This patch-set will add a driver for the Somagic SMI2021 chip. This chip is found inside different usb video-capture devices. Most of them are branded as EasyCap, but there also seems to be some other brands selling devices with this chip. This driver is split into two modules, where one is calle

[RFC V1 2/8] smi2021: Add smi2021_main.c

2013-03-14 Thread Jon Arne Jørgensen
This is the core of the smi2021 module. It will register the module with the kernel, and register the usb probe function. Signed-off-by: Jon Arne Jørgensen --- drivers/media/usb/smi2021/smi2021_main.c | 339 +++ 1 file changed, 339 insertions(+) create mode 100644

[RFC V1 7/8] smi2021: Add smi2021_bl.c

2013-03-14 Thread Jon Arne Jørgensen
This is the smi2021-bootloader module. This module will upload the firmware for the different somagic devices. Signed-off-by: Jon Arne Jørgensen --- drivers/media/usb/smi2021/smi2021_bl.c | 254 + 1 file changed, 254 insertions(+) create mode 100644 drivers

[RFC V1 8/8] smi2021: Add Kconfig and Makefiles

2013-03-14 Thread Jon Arne Jørgensen
Signed-off-by: Jon Arne Jørgensen --- drivers/media/usb/Kconfig | 1 + drivers/media/usb/Makefile | 1 + drivers/media/usb/smi2021/Kconfig | 18 ++ drivers/media/usb/smi2021/Makefile | 12 4 files changed, 32 insertions(+) create mode 100644