All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add GS1662 driver (a SPI video serializer)
@ 2016-04-01 16:02 Charles-Antoine Couret
  2016-04-01 16:28 ` Charles-Antoine Couret
  2016-04-01 16:30 ` Fwd: " Charles-Antoine Couret
  0 siblings, 2 replies; 8+ messages in thread
From: Charles-Antoine Couret @ 2016-04-01 16:02 UTC (permalink / raw)
  To: linux-media

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: gs1662.patch --]
[-- Type: text/x-patch, Size: 4974 bytes --]

>From 65b48bf1c77801c210bf93c07bc7f513efdbcbb5 Mon Sep 17 00:00:00 2001
From: Charles-Antoine Couret <charles-antoine.couret@nexvision.fr>
Date: Fri, 1 Apr 2016 17:19:26 +0200
Subject: [PATCH] Add GS1662 driver (a SPI video serializer)

Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@nexvision.fr>
---
 drivers/media/Kconfig      |   1 +
 drivers/media/Makefile     |   2 +-
 drivers/media/spi/Kconfig  |   5 ++
 drivers/media/spi/Makefile |   1 +
 drivers/media/spi/gs1662.c | 128 +++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 136 insertions(+), 1 deletion(-)
 create mode 100644 drivers/media/spi/Kconfig
 create mode 100644 drivers/media/spi/Makefile
 create mode 100644 drivers/media/spi/gs1662.c

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index a8518fb..d2fa6e7 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -215,5 +215,6 @@ config MEDIA_ATTACH
 source "drivers/media/i2c/Kconfig"
 source "drivers/media/tuners/Kconfig"
 source "drivers/media/dvb-frontends/Kconfig"
+source "drivers/media/spi/Kconfig"
 
 endif # MEDIA_SUPPORT
diff --git a/drivers/media/Makefile b/drivers/media/Makefile
index e608bbc..75bc82e 100644
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -28,6 +28,6 @@ obj-y += rc/
 # Finally, merge the drivers that require the core
 #
 
-obj-y += common/ platform/ pci/ usb/ mmc/ firewire/
+obj-y += common/ platform/ pci/ usb/ mmc/ firewire/ spi/
 obj-$(CONFIG_VIDEO_DEV) += radio/
 
diff --git a/drivers/media/spi/Kconfig b/drivers/media/spi/Kconfig
new file mode 100644
index 0000000..d5e7b98
--- /dev/null
+++ b/drivers/media/spi/Kconfig
@@ -0,0 +1,5 @@
+config VIDEO_GS1662
+	tristate "Gennum Serializer 1662 video"
+	depends on SPI
+	---help---
+	  Enable the GS1662 driver which serializes video streams.
diff --git a/drivers/media/spi/Makefile b/drivers/media/spi/Makefile
new file mode 100644
index 0000000..ea64013
--- /dev/null
+++ b/drivers/media/spi/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_VIDEO_GS1662) += gs1662.o
diff --git a/drivers/media/spi/gs1662.c b/drivers/media/spi/gs1662.c
new file mode 100644
index 0000000..6698fbf
--- /dev/null
+++ b/drivers/media/spi/gs1662.c
@@ -0,0 +1,128 @@
+/*
+ * GS1662 device registration
+ *
+ * Copyright (C) 2015-2016 Nexvision
+ * Author: Charles-Antoine Couret <charles-antoine.couret@nexvision.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/spi/spi.h>
+#include <linux/platform_device.h>
+#include <linux/ctype.h>
+#include <linux/err.h>
+#include <linux/device.h>
+
+#define READ_FLAG		0x8000
+#define WRITE_FLAG		0x0000
+#define BURST_FLAG		0x1000
+
+#define ADDRESS_MASK	0x0FFF
+
+static int gs1662_read_register(struct spi_device *spi, u16 addr, u16 *value)
+{
+	int ret;
+	u16 buf_addr =  (READ_FLAG | (ADDRESS_MASK & addr));
+	u16 buf_value = 0;
+	struct spi_message msg;
+	struct spi_transfer tx[] = {
+		{
+			.tx_buf = &buf_addr,
+			.len = 2,
+			.delay_usecs = 1,
+		}, {
+			.rx_buf = &buf_value,
+			.len = 2,
+			.delay_usecs = 1,
+		},
+	};
+
+	spi_message_init(&msg);
+	spi_message_add_tail(&tx[0], &msg);
+	spi_message_add_tail(&tx[1], &msg);
+	ret = spi_sync(spi, &msg);
+
+	*value = buf_value;
+
+	return ret;
+}
+
+static int gs1662_write_register(struct spi_device *spi, u16 addr, u16 value)
+{
+	int ret;
+	u16 buf_addr = (WRITE_FLAG | (ADDRESS_MASK & addr));
+	u16 buf_value = value;
+	struct spi_message msg;
+	struct spi_transfer tx[] = {
+		{
+			.tx_buf = &buf_addr,
+			.len = 2,
+			.delay_usecs = 1,
+		}, {
+			.tx_buf = &buf_value,
+			.len = 2,
+			.delay_usecs = 1,
+		},
+	};
+
+	spi_message_init(&msg);
+	spi_message_add_tail(&tx[0], &msg);
+	spi_message_add_tail(&tx[1], &msg);
+	ret = spi_sync(spi, &msg);
+
+	return ret;
+}
+
+static int gs1662_probe(struct spi_device *spi)
+{
+	int ret;
+
+	spi->mode = SPI_MODE_0;
+	spi->irq = -1;
+	spi->max_speed_hz = 10000000;
+	spi->bits_per_word = 16;
+	ret = spi_setup(spi);
+
+	/* Set H_CONFIG to SMPTE timings */
+	gs1662_write_register(spi, 0x0, 0x100);
+
+	return ret;
+}
+
+static int gs1662_remove(struct spi_device *spi)
+{
+	return 0;
+}
+
+static struct spi_driver gs1662_driver = {
+	.driver = {
+		.name		= "gs1662",
+		.owner		= THIS_MODULE,
+	},
+
+	.probe		= gs1662_probe,
+	.remove		= gs1662_remove,
+};
+
+static int __init gs1662_init(void)
+{
+	spi_register_driver(&gs1662_driver);
+	return 0;
+}
+
+static void __exit gs1662_exit(void)
+{
+	spi_unregister_driver(&gs1662_driver);
+}
+
+module_init(gs1662_init);
+module_exit(gs1662_exit);
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Charles-Antoine Couret <charles-antoine.couret@nexvision.fr>");
+MODULE_DESCRIPTION("GS1662 SPI driver");
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] Add GS1662 driver (a SPI video serializer)
  2016-04-01 16:02 [PATCH] Add GS1662 driver (a SPI video serializer) Charles-Antoine Couret
@ 2016-04-01 16:28 ` Charles-Antoine Couret
  2016-04-01 19:11   ` Jean-Michel Hautbois
  2016-04-01 16:30 ` Fwd: " Charles-Antoine Couret
  1 sibling, 1 reply; 8+ messages in thread
From: Charles-Antoine Couret @ 2016-04-01 16:28 UTC (permalink / raw)
  To: linux-media

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: gs1662.patch --]
[-- Type: text/x-patch, Size: 4974 bytes --]

>From 65b48bf1c77801c210bf93c07bc7f513efdbcbb5 Mon Sep 17 00:00:00 2001
From: Charles-Antoine Couret <charles-antoine.couret@nexvision.fr>
Date: Fri, 1 Apr 2016 17:19:26 +0200
Subject: [PATCH] Add GS1662 driver (a SPI video serializer)

Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@nexvision.fr>
---
 drivers/media/Kconfig      |   1 +
 drivers/media/Makefile     |   2 +-
 drivers/media/spi/Kconfig  |   5 ++
 drivers/media/spi/Makefile |   1 +
 drivers/media/spi/gs1662.c | 128 +++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 136 insertions(+), 1 deletion(-)
 create mode 100644 drivers/media/spi/Kconfig
 create mode 100644 drivers/media/spi/Makefile
 create mode 100644 drivers/media/spi/gs1662.c

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index a8518fb..d2fa6e7 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -215,5 +215,6 @@ config MEDIA_ATTACH
 source "drivers/media/i2c/Kconfig"
 source "drivers/media/tuners/Kconfig"
 source "drivers/media/dvb-frontends/Kconfig"
+source "drivers/media/spi/Kconfig"
 
 endif # MEDIA_SUPPORT
diff --git a/drivers/media/Makefile b/drivers/media/Makefile
index e608bbc..75bc82e 100644
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -28,6 +28,6 @@ obj-y += rc/
 # Finally, merge the drivers that require the core
 #
 
-obj-y += common/ platform/ pci/ usb/ mmc/ firewire/
+obj-y += common/ platform/ pci/ usb/ mmc/ firewire/ spi/
 obj-$(CONFIG_VIDEO_DEV) += radio/
 
diff --git a/drivers/media/spi/Kconfig b/drivers/media/spi/Kconfig
new file mode 100644
index 0000000..d5e7b98
--- /dev/null
+++ b/drivers/media/spi/Kconfig
@@ -0,0 +1,5 @@
+config VIDEO_GS1662
+	tristate "Gennum Serializer 1662 video"
+	depends on SPI
+	---help---
+	  Enable the GS1662 driver which serializes video streams.
diff --git a/drivers/media/spi/Makefile b/drivers/media/spi/Makefile
new file mode 100644
index 0000000..ea64013
--- /dev/null
+++ b/drivers/media/spi/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_VIDEO_GS1662) += gs1662.o
diff --git a/drivers/media/spi/gs1662.c b/drivers/media/spi/gs1662.c
new file mode 100644
index 0000000..6698fbf
--- /dev/null
+++ b/drivers/media/spi/gs1662.c
@@ -0,0 +1,128 @@
+/*
+ * GS1662 device registration
+ *
+ * Copyright (C) 2015-2016 Nexvision
+ * Author: Charles-Antoine Couret <charles-antoine.couret@nexvision.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/spi/spi.h>
+#include <linux/platform_device.h>
+#include <linux/ctype.h>
+#include <linux/err.h>
+#include <linux/device.h>
+
+#define READ_FLAG		0x8000
+#define WRITE_FLAG		0x0000
+#define BURST_FLAG		0x1000
+
+#define ADDRESS_MASK	0x0FFF
+
+static int gs1662_read_register(struct spi_device *spi, u16 addr, u16 *value)
+{
+	int ret;
+	u16 buf_addr =  (READ_FLAG | (ADDRESS_MASK & addr));
+	u16 buf_value = 0;
+	struct spi_message msg;
+	struct spi_transfer tx[] = {
+		{
+			.tx_buf = &buf_addr,
+			.len = 2,
+			.delay_usecs = 1,
+		}, {
+			.rx_buf = &buf_value,
+			.len = 2,
+			.delay_usecs = 1,
+		},
+	};
+
+	spi_message_init(&msg);
+	spi_message_add_tail(&tx[0], &msg);
+	spi_message_add_tail(&tx[1], &msg);
+	ret = spi_sync(spi, &msg);
+
+	*value = buf_value;
+
+	return ret;
+}
+
+static int gs1662_write_register(struct spi_device *spi, u16 addr, u16 value)
+{
+	int ret;
+	u16 buf_addr = (WRITE_FLAG | (ADDRESS_MASK & addr));
+	u16 buf_value = value;
+	struct spi_message msg;
+	struct spi_transfer tx[] = {
+		{
+			.tx_buf = &buf_addr,
+			.len = 2,
+			.delay_usecs = 1,
+		}, {
+			.tx_buf = &buf_value,
+			.len = 2,
+			.delay_usecs = 1,
+		},
+	};
+
+	spi_message_init(&msg);
+	spi_message_add_tail(&tx[0], &msg);
+	spi_message_add_tail(&tx[1], &msg);
+	ret = spi_sync(spi, &msg);
+
+	return ret;
+}
+
+static int gs1662_probe(struct spi_device *spi)
+{
+	int ret;
+
+	spi->mode = SPI_MODE_0;
+	spi->irq = -1;
+	spi->max_speed_hz = 10000000;
+	spi->bits_per_word = 16;
+	ret = spi_setup(spi);
+
+	/* Set H_CONFIG to SMPTE timings */
+	gs1662_write_register(spi, 0x0, 0x100);
+
+	return ret;
+}
+
+static int gs1662_remove(struct spi_device *spi)
+{
+	return 0;
+}
+
+static struct spi_driver gs1662_driver = {
+	.driver = {
+		.name		= "gs1662",
+		.owner		= THIS_MODULE,
+	},
+
+	.probe		= gs1662_probe,
+	.remove		= gs1662_remove,
+};
+
+static int __init gs1662_init(void)
+{
+	spi_register_driver(&gs1662_driver);
+	return 0;
+}
+
+static void __exit gs1662_exit(void)
+{
+	spi_unregister_driver(&gs1662_driver);
+}
+
+module_init(gs1662_init);
+module_exit(gs1662_exit);
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Charles-Antoine Couret <charles-antoine.couret@nexvision.fr>");
+MODULE_DESCRIPTION("GS1662 SPI driver");
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Fwd: [PATCH] Add GS1662 driver (a SPI video serializer)
  2016-04-01 16:02 [PATCH] Add GS1662 driver (a SPI video serializer) Charles-Antoine Couret
  2016-04-01 16:28 ` Charles-Antoine Couret
@ 2016-04-01 16:30 ` Charles-Antoine Couret
  1 sibling, 0 replies; 8+ messages in thread
From: Charles-Antoine Couret @ 2016-04-01 16:30 UTC (permalink / raw)
  To: linux-media

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: gs1662.patch --]
[-- Type: text/x-patch, Size: 4975 bytes --]

>From 65b48bf1c77801c210bf93c07bc7f513efdbcbb5 Mon Sep 17 00:00:00 2001
From: Charles-Antoine Couret <charles-antoine.couret@nexvision.fr>
Date: Fri, 1 Apr 2016 17:19:26 +0200
Subject: [PATCH] Add GS1662 driver (a SPI video serializer)

Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@nexvision.fr>
---
 drivers/media/Kconfig      |   1 +
 drivers/media/Makefile     |   2 +-
 drivers/media/spi/Kconfig  |   5 ++
 drivers/media/spi/Makefile |   1 +
 drivers/media/spi/gs1662.c | 128 +++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 136 insertions(+), 1 deletion(-)
 create mode 100644 drivers/media/spi/Kconfig
 create mode 100644 drivers/media/spi/Makefile
 create mode 100644 drivers/media/spi/gs1662.c

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index a8518fb..d2fa6e7 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -215,5 +215,6 @@ config MEDIA_ATTACH
 source "drivers/media/i2c/Kconfig"
 source "drivers/media/tuners/Kconfig"
 source "drivers/media/dvb-frontends/Kconfig"
+source "drivers/media/spi/Kconfig"
 
 endif # MEDIA_SUPPORT
diff --git a/drivers/media/Makefile b/drivers/media/Makefile
index e608bbc..75bc82e 100644
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -28,6 +28,6 @@ obj-y += rc/
 # Finally, merge the drivers that require the core
 #
 
-obj-y += common/ platform/ pci/ usb/ mmc/ firewire/
+obj-y += common/ platform/ pci/ usb/ mmc/ firewire/ spi/
 obj-$(CONFIG_VIDEO_DEV) += radio/
 
diff --git a/drivers/media/spi/Kconfig b/drivers/media/spi/Kconfig
new file mode 100644
index 0000000..d5e7b98
--- /dev/null
+++ b/drivers/media/spi/Kconfig
@@ -0,0 +1,5 @@
+config VIDEO_GS1662
+	tristate "Gennum Serializer 1662 video"
+	depends on SPI
+	---help---
+	  Enable the GS1662 driver which serializes video streams.
diff --git a/drivers/media/spi/Makefile b/drivers/media/spi/Makefile
new file mode 100644
index 0000000..ea64013
--- /dev/null
+++ b/drivers/media/spi/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_VIDEO_GS1662) += gs1662.o
diff --git a/drivers/media/spi/gs1662.c b/drivers/media/spi/gs1662.c
new file mode 100644
index 0000000..6698fbf
--- /dev/null
+++ b/drivers/media/spi/gs1662.c
@@ -0,0 +1,128 @@
+/*
+ * GS1662 device registration
+ *
+ * Copyright (C) 2015-2016 Nexvision
+ * Author: Charles-Antoine Couret <charles-antoine.couret@nexvision.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/spi/spi.h>
+#include <linux/platform_device.h>
+#include <linux/ctype.h>
+#include <linux/err.h>
+#include <linux/device.h>
+
+#define READ_FLAG		0x8000
+#define WRITE_FLAG		0x0000
+#define BURST_FLAG		0x1000
+
+#define ADDRESS_MASK	0x0FFF
+
+static int gs1662_read_register(struct spi_device *spi, u16 addr, u16 *value)
+{
+	int ret;
+	u16 buf_addr =  (READ_FLAG | (ADDRESS_MASK & addr));
+	u16 buf_value = 0;
+	struct spi_message msg;
+	struct spi_transfer tx[] = {
+		{
+			.tx_buf = &buf_addr,
+			.len = 2,
+			.delay_usecs = 1,
+		}, {
+			.rx_buf = &buf_value,
+			.len = 2,
+			.delay_usecs = 1,
+		},
+	};
+
+	spi_message_init(&msg);
+	spi_message_add_tail(&tx[0], &msg);
+	spi_message_add_tail(&tx[1], &msg);
+	ret = spi_sync(spi, &msg);
+
+	*value = buf_value;
+
+	return ret;
+}
+
+static int gs1662_write_register(struct spi_device *spi, u16 addr, u16 value)
+{
+	int ret;
+	u16 buf_addr = (WRITE_FLAG | (ADDRESS_MASK & addr));
+	u16 buf_value = value;
+	struct spi_message msg;
+	struct spi_transfer tx[] = {
+		{
+			.tx_buf = &buf_addr,
+			.len = 2,
+			.delay_usecs = 1,
+		}, {
+			.tx_buf = &buf_value,
+			.len = 2,
+			.delay_usecs = 1,
+		},
+	};
+
+	spi_message_init(&msg);
+	spi_message_add_tail(&tx[0], &msg);
+	spi_message_add_tail(&tx[1], &msg);
+	ret = spi_sync(spi, &msg);
+
+	return ret;
+}
+
+static int gs1662_probe(struct spi_device *spi)
+{
+	int ret;
+
+	spi->mode = SPI_MODE_0;
+	spi->irq = -1;
+	spi->max_speed_hz = 10000000;
+	spi->bits_per_word = 16;
+	ret = spi_setup(spi);
+
+	/* Set H_CONFIG to SMPTE timings */
+	gs1662_write_register(spi, 0x0, 0x100);
+
+	return ret;
+}
+
+static int gs1662_remove(struct spi_device *spi)
+{
+	return 0;
+}
+
+static struct spi_driver gs1662_driver = {
+	.driver = {
+		.name		= "gs1662",
+		.owner		= THIS_MODULE,
+	},
+
+	.probe		= gs1662_probe,
+	.remove		= gs1662_remove,
+};
+
+static int __init gs1662_init(void)
+{
+	spi_register_driver(&gs1662_driver);
+	return 0;
+}
+
+static void __exit gs1662_exit(void)
+{
+	spi_unregister_driver(&gs1662_driver);
+}
+
+module_init(gs1662_init);
+module_exit(gs1662_exit);
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Charles-Antoine Couret <charles-antoine.couret@nexvision.fr>");
+MODULE_DESCRIPTION("GS1662 SPI driver");
-- 
2.5.5



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add GS1662 driver (a SPI video serializer)
  2016-04-01 16:28 ` Charles-Antoine Couret
@ 2016-04-01 19:11   ` Jean-Michel Hautbois
  2016-04-04  9:01     ` Charles-Antoine Couret
  0 siblings, 1 reply; 8+ messages in thread
From: Jean-Michel Hautbois @ 2016-04-01 19:11 UTC (permalink / raw)
  To: Charles-Antoine Couret; +Cc: Linux Media Mailing List

Hi Charles-Antoine,

Thank you for the patch.
FIrst of all, we, on the ML, do prefer reading patches as sent by git
send-email tool.
It is easier to comment the patch.

Next, you should add a complete description to your commit. Just
having an object and a signed-off-by line is not enough.
You also have to use the scripts/checkpatch.pl script to verify that
everything is ok with it.

Last thing, I can't see anything related to V4L2 in your patch. It is
just used to initialize the chip and the spi bus, that's all.
Adding a subdev is a start, and some operations if it can do something
else than just serializing.

That's it for the moment, when you submit a v2, I (and others) may
have some more comments :).

Thanks,
JM

2016-04-01 18:28 GMT+02:00 Charles-Antoine Couret
<charles-antoine.couret@nexvision.fr>:
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add GS1662 driver (a SPI video serializer)
  2016-04-01 19:11   ` Jean-Michel Hautbois
@ 2016-04-04  9:01     ` Charles-Antoine Couret
  2016-04-04 12:35       ` Jean-Michel Hautbois
  0 siblings, 1 reply; 8+ messages in thread
From: Charles-Antoine Couret @ 2016-04-04  9:01 UTC (permalink / raw)
  To: Jean-Michel Hautbois; +Cc: Linux Media Mailing List

Le 01/04/2016 21:11, Jean-Michel Hautbois a écrit :
> Hi Charles-Antoine,
Hi,

> FIrst of all, we, on the ML, do prefer reading patches as sent by git
> send-email tool.

Ok, I will configure that.

> Next, you should add a complete description to your commit. Just
> having an object and a signed-off-by line is not enough.
Oh, I'm sorry, I don't have any idea to explicit more details. I will
find something for that.

> You also have to use the scripts/checkpatch.pl script to verify that
> everything is ok with it.
I have executed this script before to send it. And it noticed nothing about that.

> Last thing, I can't see anything related to V4L2 in your patch. It is
> just used to initialize the chip and the spi bus, that's all.
> Adding a subdev is a start, and some operations if it can do something
> else than just serializing.

Maybe I'm in the wrong list for that in fact. I didn't know this list was about V4L2 and related topics.
This driver is only to configure the component to manage the video stream in electronic card, it is not to capture video stream via V4L.

I should improve my driver to be configurable by userspace. But maybe I should submit my future patch in another ML. 

Thanks for all.
Regards,
Charles-Antoine

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add GS1662 driver (a SPI video serializer)
  2016-04-04  9:01     ` Charles-Antoine Couret
@ 2016-04-04 12:35       ` Jean-Michel Hautbois
  2016-04-15  8:38         ` Hans Verkuil
  0 siblings, 1 reply; 8+ messages in thread
From: Jean-Michel Hautbois @ 2016-04-04 12:35 UTC (permalink / raw)
  To: Charles-Antoine Couret; +Cc: Linux Media Mailing List, Hans Verkuil

>> Next, you should add a complete description to your commit. Just
>> having an object and a signed-off-by line is not enough.
> Oh, I'm sorry, I don't have any idea to explicit more details. I will
> find something for that.

Just get the description from the datasheet as a start ;-).

>> You also have to use the scripts/checkpatch.pl script to verify that
>> everything is ok with it.
> I have executed this script before to send it. And it noticed nothing about that.
>
>> Last thing, I can't see anything related to V4L2 in your patch. It is
>> just used to initialize the chip and the spi bus, that's all.
>> Adding a subdev is a start, and some operations if it can do something
>> else than just serializing.
>
> Maybe I'm in the wrong list for that in fact. I didn't know this list was about V4L2 and related topics.
> This driver is only to configure the component to manage the video stream in electronic card, it is not to capture video stream via V4L.
>
> I should improve my driver to be configurable by userspace. But maybe I should submit my future patch in another ML.

Well, I am not really sure about that. I added Hans in cc as he may
have a better view.
>From my point of view, it can be a V4L2 subdev, even a simple one, as
you can configure outputs, etc.

JM

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add GS1662 driver (a SPI video serializer)
  2016-04-04 12:35       ` Jean-Michel Hautbois
@ 2016-04-15  8:38         ` Hans Verkuil
  2016-04-15  8:42           ` Charles-Antoine Couret
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Verkuil @ 2016-04-15  8:38 UTC (permalink / raw)
  To: Jean-Michel Hautbois, Charles-Antoine Couret; +Cc: Linux Media Mailing List

On 04/04/2016 02:35 PM, Jean-Michel Hautbois wrote:
>>> Next, you should add a complete description to your commit. Just
>>> having an object and a signed-off-by line is not enough.
>> Oh, I'm sorry, I don't have any idea to explicit more details. I will
>> find something for that.
> 
> Just get the description from the datasheet as a start ;-).
> 
>>> You also have to use the scripts/checkpatch.pl script to verify that
>>> everything is ok with it.
>> I have executed this script before to send it. And it noticed nothing about that.
>>
>>> Last thing, I can't see anything related to V4L2 in your patch. It is
>>> just used to initialize the chip and the spi bus, that's all.
>>> Adding a subdev is a start, and some operations if it can do something
>>> else than just serializing.
>>
>> Maybe I'm in the wrong list for that in fact. I didn't know this list was about V4L2 and related topics.
>> This driver is only to configure the component to manage the video stream in electronic card, it is not to capture video stream via V4L.
>>
>> I should improve my driver to be configurable by userspace. But maybe I should submit my future patch in another ML.
> 
> Well, I am not really sure about that. I added Hans in cc as he may
> have a better view.
> From my point of view, it can be a V4L2 subdev, even a simple one, as
> you can configure outputs, etc.

I think the media subsystem is definitely the right place for this.

I would use the cs3308.c driver as a starting point. This is also a minimal driver
(and you can remove the code under CONFIG_VIDEO_ADV_DEBUG for your driver), but it
uses v4l2_subdev and that makes it ready to be extended in the future, which you
will likely need to do eventually.

Regards,

	Hans

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add GS1662 driver (a SPI video serializer)
  2016-04-15  8:38         ` Hans Verkuil
@ 2016-04-15  8:42           ` Charles-Antoine Couret
  0 siblings, 0 replies; 8+ messages in thread
From: Charles-Antoine Couret @ 2016-04-15  8:42 UTC (permalink / raw)
  To: Hans Verkuil, Jean-Michel Hautbois; +Cc: Linux Media Mailing List

Le 15/04/2016 10:38, Hans Verkuil a écrit :
> I think the media subsystem is definitely the right place for this.
> 
> I would use the cs3308.c driver as a starting point. This is also a minimal driver
> (and you can remove the code under CONFIG_VIDEO_ADV_DEBUG for your driver), but it
> uses v4l2_subdev and that makes it ready to be extended in the future, which you
> will likely need to do eventually.

Yes, I agree with that now. :)
I'm writing a new version of patch to integrate it into media subdev. It's "ready" but I need some tests to validate all behaviours.

Thanks.
Charles-Antoine Couret

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-04-15 12:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-01 16:02 [PATCH] Add GS1662 driver (a SPI video serializer) Charles-Antoine Couret
2016-04-01 16:28 ` Charles-Antoine Couret
2016-04-01 19:11   ` Jean-Michel Hautbois
2016-04-04  9:01     ` Charles-Antoine Couret
2016-04-04 12:35       ` Jean-Michel Hautbois
2016-04-15  8:38         ` Hans Verkuil
2016-04-15  8:42           ` Charles-Antoine Couret
2016-04-01 16:30 ` Fwd: " Charles-Antoine Couret

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.