Skip to contentSkip to conversation

Driver for Toshiba TC358743

RFC New [email protected] 3 participants 4 messages Jul 9, 2015 – Jul 13, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

From: Mats Randgaard <[email protected]>

Improvements based on feedback from Hans Verkuil:
- Use functions in linux/hdmi.h to print AVI info frames
- Replace private format change event with V4L2_EVENT_SOURCE_CHANGE
- Rewrite set_fmt/get_fmt
- Remove V4L2_SUBDEV_FL_HAS_DEVNODE

Other improvements since the previous version:
- Protect CONFCTL with a mutex since it is written in both process context and interrupt context
- Restructure and describe the platform data
- Replace the register that is verified in the probe function with the read-only register CHIPID

Mats Randgaard (1):
Driver for Toshiba TC358743 HDMI to CSI-2 bridge

 MAINTAINERS                        |    7 +
 drivers/media/i2c/Kconfig          |    9 +
 drivers/media/i2c/Makefile         |    1 +
 drivers/media/i2c/tc358743.c       | 1778 ++++++++++++++++++++++++++++++++++++
 drivers/media/i2c/tc358743_regs.h  |  681 ++++++++++++++
 include/media/tc358743.h           |  131 +++
 include/uapi/linux/v4l2-controls.h |    4 +
 7 files changed, 2611 insertions(+)
 create mode 100644 drivers/media/i2c/tc358743.c
 create mode 100644 drivers/media/i2c/tc358743_regs.h
 create mode 100644 include/media/tc358743.h
Signature · 1 line
2.4.3
#1 lore raw

RFC v4 1/1 Driver for Toshiba TC358743 HDMI to CSI-2 bridge

From: Mats Randgaard <[email protected]>

The driver is tested on our hardware and all the implemented features works as expected.

Missing features:
- CEC support
- HDCP repeater support
- IR support

MAINTAINERS +7 -0
index 8133cef..fb98b8d 100644
@@ -10303,6 +10303,13 @@ F:	drivers/char/toshiba.c
 F:	include/linux/toshiba.h
 F:	include/uapi/linux/toshiba.h
 
+TOSHIBA TC358743 DRIVER
+M:	Mats Randgaard <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	drivers/media/i2c/tc358743*
+F:	include/media/tc358743.h
+
 TMIO MMC DRIVER
 M:	Ian Molton <[email protected]>
 L:	[email protected]
drivers/media/i2c/Kconfig +9 -0
index 71ee8f5..3308706 100644
@@ -286,6 +286,15 @@ config VIDEO_SAA711X
 	  To compile this driver as a module, choose M here: the
 	  module will be called saa7115.
 
+config VIDEO_TC358743
+	tristate "Toshiba TC358743 decoder"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Toshiba TC358743 HDMI to MIPI CSI-2 bridge
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called tc358743.
+
 config VIDEO_TVP514X
 	tristate "Texas Instruments TVP514x video decoder"
 	depends on VIDEO_V4L2 && I2C
drivers/media/i2c/Makefile +1 -0
index f165fae..07db257 100644
@@ -78,3 +78,4 @@ obj-$(CONFIG_VIDEO_AK881X)		+= ak881x.o
 obj-$(CONFIG_VIDEO_IR_I2C)  += ir-kbd-i2c.o
 obj-$(CONFIG_VIDEO_ML86V7667)	+= ml86v7667.o
 obj-$(CONFIG_VIDEO_OV2659)	+= ov2659.o
+obj-$(CONFIG_VIDEO_TC358743)	+= tc358743.o
drivers/media/i2c/tc358743.c new file +1778 -0

1,778 lines not on this page · raw message

drivers/media/i2c/tc358743_regs.h new file +681 -0

681 lines not on this page · raw message

include/media/tc358743.h new file +131 -0

131 lines not on this page · raw message

include/uapi/linux/v4l2-controls.h +4 -0
index 9f6e108..d448c53 100644
@@ -174,6 +174,10 @@ enum v4l2_colorfx {
  * We reserve 16 controls for this driver. */
 #define V4L2_CID_USER_ADV7180_BASE		(V4L2_CID_USER_BASE + 0x1070)
 
+/* The base for the tc358743 driver controls.
+ * We reserve 16 controls for this driver. */
+#define V4L2_CID_USER_TC358743_BASE		(V4L2_CID_USER_BASE + 0x1080)
+
 /* MPEG-class control IDs */
 /* The MPEG controls are applicable to all codec controls
  * and the 'MPEG' part of the define is historical */
Signature · 1 line
2.4.3
Tested-by
#2 lore raw
In reply to [email protected]

Hi Mats,

thanks for the update! With a few changes on top

Am Donnerstag, den 09.07.2015, 10:45 +0200 schrieb [email protected]:

Quoted 7 lines

From: Mats Randgaard <[email protected]>

Improvements based on feedback from Hans Verkuil:
- Use functions in linux/hdmi.h to print AVI info frames
- Replace private format change event with V4L2_EVENT_SOURCE_CHANGE
- Rewrite set_fmt/get_fmt
- Remove V4L2_SUBDEV_FL_HAS_DEVNODE

I had to add that back again together with initializing the media entity to make it configurable with media-ctl --set-dv.

regards
Philipp

#3 lore raw
In reply to [email protected]

Hi Mats, Philipp,

I'll merge this driver, but not yet the follow-ups from Philipp since those need some more work.

Regards,

Hans

Quoted 30 lines · On 07/09/2015 10:45 AM, [email protected] wrote:

From: Mats Randgaard <[email protected]>

Improvements based on feedback from Hans Verkuil:
- Use functions in linux/hdmi.h to print AVI info frames
- Replace private format change event with V4L2_EVENT_SOURCE_CHANGE
- Rewrite set_fmt/get_fmt
- Remove V4L2_SUBDEV_FL_HAS_DEVNODE

Other improvements since the previous version:
- Protect CONFCTL with a mutex since it is written in both process context and interrupt context
- Restructure and describe the platform data
- Replace the register that is verified in the probe function with the read-only register CHIPID

Mats Randgaard (1):
Driver for Toshiba TC358743 HDMI to CSI-2 bridge

 MAINTAINERS                        |    7 +
 drivers/media/i2c/Kconfig          |    9 +
 drivers/media/i2c/Makefile         |    1 +
 drivers/media/i2c/tc358743.c       | 1778 ++++++++++++++++++++++++++++++++++++
 drivers/media/i2c/tc358743_regs.h  |  681 ++++++++++++++
 include/media/tc358743.h           |  131 +++
 include/uapi/linux/v4l2-controls.h |    4 +
 7 files changed, 2611 insertions(+)
 create mode 100644 drivers/media/i2c/tc358743.c
 create mode 100644 drivers/media/i2c/tc358743_regs.h
 create mode 100644 include/media/tc358743.h