DW9807 DT binding and driver patches
Subsystems (3)
v5 cover DW9807 DT binding and driver patches
Hi Sakari and Tomasz,
The two patches are the DT binding and driver for DW9807 VCM controller.
Alan Chiang (2):
media: dw9807: Add dw9807 vcm driver
media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil
.../bindings/media/i2c/dongwoon,dw9807.txt | 9 + MAINTAINERS | 7 + drivers/media/i2c/Kconfig | 10 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/dw9807.c | 320 +++++++++++++++++++++ 5 files changed, 347 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt create mode 100644 drivers/media/i2c/dw9807.c
Signature · 1 line
2.7.4
PATCH v5 1/2 media: dw9807: Add dw9807 vcm driver
From: Alan Chiang <[email protected]>
DW9807 is a 10 bit DAC from Dongwoon, designed for linear control of voice coil motor.
This driver creates a V4L2 subdevice and
provides control to set the desired focus.
---
since v1:
- changed author.
since v2:
- addressed outstanding comments.
- enabled sequential write to update 2 registers in a single transaction. since v3:
- addressed comments for v3.
- Remove redundant codes and declare some variables as constant variable.
- separate DT binding to another patch
sicne v4:
- sent patchset included DT binding with cover page
MAINTAINERS | 7 + drivers/media/i2c/Kconfig | 10 ++ drivers/media/i2c/Makefile | 1 + drivers/media/i2c/dw9807.c | 320 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 338 insertions(+) create mode 100644 drivers/media/i2c/dw9807.c
MAINTAINERS +7 -0
@@ -4385,6 +4385,13 @@ T: git git://linuxtv.org/media_tree.git S: Maintained F: drivers/media/i2c/dw9714.c +DONGWOON DW9807 LENS VOICE COIL DRIVER +M: Sakari Ailus <[email protected]> +L: [email protected] +T: git git://linuxtv.org/media_tree.git +S: Maintained +F: drivers/media/i2c/dw9807.c + DOUBLETALK DRIVER M: "James R. Van Zandt" <[email protected]> L: [email protected]
drivers/media/i2c/Kconfig +10 -0
@@ -325,6 +325,16 @@ config VIDEO_DW9714 capability. This is designed for linear control of voice coil motors, controlled via I2C serial interface. +config VIDEO_DW9807 + tristate "DW9807 lens voice coil support" + depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER + depends on VIDEO_V4L2_SUBDEV_API + ---help--- + This is a driver for the DW9807 camera lens voice coil. + DW9807 is a 10 bit DAC with 100mA output current sink + capability. This is designed for linear control of + voice coil motors, controlled via I2C serial interface. + config VIDEO_SAA7110 tristate "Philips SAA7110 video decoder" depends on VIDEO_V4L2 && I2C
drivers/media/i2c/Makefile +1 -0
@@ -23,6 +23,7 @@ obj-$(CONFIG_VIDEO_SAA7185) += saa7185.o obj-$(CONFIG_VIDEO_SAA6752HS) += saa6752hs.o obj-$(CONFIG_VIDEO_AD5820) += ad5820.o obj-$(CONFIG_VIDEO_DW9714) += dw9714.o +obj-$(CONFIG_VIDEO_DW9807) += dw9807.o obj-$(CONFIG_VIDEO_ADV7170) += adv7170.o obj-$(CONFIG_VIDEO_ADV7175) += adv7175.o obj-$(CONFIG_VIDEO_ADV7180) += adv7180.o
drivers/media/i2c/dw9807.c new file +320 -0
320 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v5 2/2 media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil
In reply to Andy YehFrom: Alan Chiang <[email protected]>
Dongwoon DW9807 is a voice coil lens driver.
Also add a vendor prefix for Dongwoon for one did not exist previously.
--- Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt
Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt new file +9 -0
@@ -0,0 +1,9 @@ +Dongwoon Anatech DW9807 voice coil lens driver + +DW9807 is a 10-bit DAC with current sink capability. It is intended for +controlling voice coil lenses. + +Mandatory properties: + +- compatible: "dongwoon,dw9807" +- reg: I2C slave address
Signature · 1 line
2.7.4
Rob Herring
maintainerRe: [v5 2/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil
Quoted 5 lines · Andy Yeh
From: Alan Chiang <[email protected]>
Dongwoon DW9807 is a voice coil lens driver.
Also add a vendor prefix for Dongwoon for one did not exist previously.
Where's that?
Quoted 4 lines
Signed-off-by Andy Yeh <[email protected]>--- Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt | 9 +++++++++
DACs generally go in bindings/iio/dac/
Quoted 25 lines
1 file changed, 9 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txtDocumentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt new file +9
-1@@ -0,0 +1,9 @@ +Dongwoon Anatech DW9807 voice coil lens driver + +DW9807 is a 10-bit DAC with current sink capability. It is intended for +controlling voice coil lenses. + +Mandatory properties: + +- compatible: "dongwoon,dw9807" +- reg: I2C slave address --2.7.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Sakari Ailus
maintainerRe: [v5 2/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil
Hi Rob,
Thanks for the review.
Quoted 8 lines · Rob Herring
Quoted 5 lines · Andy Yeh
From: Alan Chiang <[email protected]>
Dongwoon DW9807 is a voice coil lens driver.
Also add a vendor prefix for Dongwoon for one did not exist previously.
Where's that?
Added by aece98a912d92444ea9da03b04269407d1308f1f . So that line isn't relevant indeed and should be removed.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Andy Yeh <[email protected]>--- Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt | 9 +++++++++DACs generally go in bindings/iio/dac/
We have quite a few lens voice coil drivers under bindings/media/i2c now. I don't really object to putting this one to bindings/iio/dac but then the rest should be moved as well.
The camera LED flash drivers are under bindings/leds so this would actually be analoguous to that. The lens voice coil drivers are perhaps still a bit more bound to the domain (camera) than the LED flash drivers.
I can send a patch if you think the existing bindings should be moved; let me know.
Signature · 4 lines
Kind regards, Sakari Ailus [email protected]
Rob Herring
maintainerRe: [v5 2/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil
Quoted 25 lines · Sakari Ailus
Hi Rob,
Thanks for the review.
Quoted 8 lines · Rob Herring
Quoted 5 lines · Andy Yeh
From: Alan Chiang <[email protected]>
Dongwoon DW9807 is a voice coil lens driver.
Also add a vendor prefix for Dongwoon for one did not exist previously.
Where's that?
Added by
aece98a912d92444ea9da03b04269407d1308f1f. So that line isn't relevant indeed and should be removed.Quoted 7 lines
Quoted 5 lines
Signed-off-by Andy Yeh <[email protected]>--- Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt | 9 +++++++++DACs generally go in bindings/iio/dac/
Quoted 7 lines
We have quite a few lens voice coil drivers under bindings/media/i2c now. I don't really object to putting this one to bindings/iio/dac but then the rest should be moved as well.
The camera LED flash drivers are under bindings/leds so this would actually be analoguous to that. The lens voice coil drivers are perhaps still a bit more bound to the domain (camera) than the LED flash drivers.
The h/w is bound to that function or just the s/w?
Quoted 2 lines
I can send a patch if you think the existing bindings should be moved; let me know.
I'm okay if they are separate as long as we're not going to see the same device show up in both places. However, "i2c" is not the best directory choice. It should be by function, so we can find common properties.
Rob
Sakari Ailus
maintainerRe: [v5 2/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil
Quoted 30 lines · Rob Herring
Quoted 29 lines · Sakari Ailus
Hi Rob,
Thanks for the review.
Quoted 8 lines · Rob Herring
Quoted 5 lines · Andy Yeh
From: Alan Chiang <[email protected]>
Dongwoon DW9807 is a voice coil lens driver.
Also add a vendor prefix for Dongwoon for one did not exist previously.
Where's that?
Added by
aece98a912d92444ea9da03b04269407d1308f1f. So that line isn't relevant indeed and should be removed.Quoted 7 lines
Quoted 5 lines
Signed-off-by Andy Yeh <[email protected]>--- Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt | 9 +++++++++DACs generally go in bindings/iio/dac/
We have quite a few lens voice coil drivers under bindings/media/i2c now. I don't really object to putting this one to bindings/iio/dac but then the rest should be moved as well.
Quoted 5 lines
Quoted 3 lines
The camera LED flash drivers are under bindings/leds so this would actually be analoguous to that. The lens voice coil drivers are perhaps still a bit more bound to the domain (camera) than the LED flash drivers.
The h/w is bound to that function or just the s/w?
The hardware. I guess in principle you could use them for other purposes --- most devices seem to be current sinks with configurable current --- but I've never seen that.
The datasheet (dw9714) is here:
<URL:http://www.datasheetspdf.com/datasheet/download.php?id=840322>
Quoted 6 lines
Quoted 3 lines
I can send a patch if you think the existing bindings should be moved; let me know.
I'm okay if they are separate as long as we're not going to see the same device show up in both places. However, "i2c" is not the best
Ack. I wouldn't expect that. The datasheets of such devices clearly label the devices voice coil module drivers.
Quoted 2 lines
directory choice. It should be by function, so we can find common properties.
I2c devices in the media subsystem tend to be peripherals that are always used with another device with access to some system bus. Camera sensors, lens devices and tuners can be found there currently. I don't know the original reasoning but it most likely is related to that.
In terms of different kinds of devices we have currently at least the following:
Camera ISPs and CSI-2 receivers
Video muxes
Video codecs
Camera sensors
Camera lens drivers (right now only voice coil modules?) Tuners (DVB, radio, analogue TV, whatever) Radio transmitters
HDMI CEC
Remote controllers
JPEG codecs
Cc Hans, too.
Signature · 2 lines
Sakari Ailus [email protected]
Re: [v5 2/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil
Quoted 8 lines · Sakari Ailus
Quoted 7 lines · Rob Herring
Quoted 6 lines · Sakari Ailus
Hi Rob,
Thanks for the review.
Quoted 1 line · Rob Herring
On Fri, Feb 23, 2018 at 10:13 AM, Andy Yeh <[email protected]>
Quoted 5 lines · wrote:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
From: Alan Chiang <[email protected]>
Dongwoon DW9807 is a voice coil lens driver.
Also add a vendor prefix for Dongwoon for one did not exist
previously.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 2 lines
Where's that?
Added by
aece98a912d92444ea9da03b04269407d1308f1f. So that line isn't relevant indeed and should be removed.Quoted 5 lines
Quoted 5 lines
Signed-off-by Andy Yeh <[email protected]>---
Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt
| 9 +++++++++
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
DACs generally go in bindings/iio/dac/
We have quite a few lens voice coil drivers under bindings/media/i2c
now. I
Quoted 1 line
Quoted 1 line
Quoted 1 line
don't really object to putting this one to bindings/iio/dac but then
the
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
rest should be moved as well.
The camera LED flash drivers are under bindings/leds so this would
actually
Quoted 1 line
Quoted 1 line
Quoted 1 line
be analoguous to that. The lens voice coil drivers are perhaps still
a bit
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
more bound to the domain (camera) than the LED flash drivers.
The h/w is bound to that function or just the s/w?
The hardware. I guess in principle you could use them for other purposes --- most devices seem to be current sinks with configurable current ---
but
Quoted 8 lines
I've never seen that.
The datasheet (dw9714) is here:
<URL:http://www.datasheetspdf.com/datasheet/download.php?id=840322>
Quoted 2 lines
Quoted 2 lines
I can send a patch if you think the existing bindings should be
moved; let
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
me know.
I'm okay if they are separate as long as we're not going to see the same device show up in both places. However, "i2c" is not the best
Quoted 8 lines
Ack. I wouldn't expect that. The datasheets of such devices clearly label the devices voice coil module drivers.
Quoted 2 lines
directory choice. It should be by function, so we can find common properties.
I2c devices in the media subsystem tend to be peripherals that are always used with another device with access to some system bus. Camera sensors,
lens
Quoted 17 lines
devices and tuners can be found there currently. I don't know the original reasoning but it most likely is related to that.
In terms of different kinds of devices we have currently at least the following:
Camera ISPs and CSI-2 receivers
Video muxes
Video codecs
Camera sensors
Camera lens drivers (right now only voice coil modules?) Tuners (DVB, radio, analogue TV, whatever) Radio transmitters
HDMI CEC
Remote controllers
JPEG codecs
Quoted 1 line
Cc Hans, too.
Any updates here?
To be honest, I'm not sure there is too much to be thinking about here. This particular hardware block is a lens driver, specifically designed to be used with cameras. Quoting maker's website [1]:
"Driver ICs for automatically focus on images of mobile cameras.
Dongwoon Anatech's AF driver ICs are optimized mobile cameras with low power, low noise, smallest package, as well as include various lens position control methodology."
IMHO putting its bindings under the more general purpose iio/ directory doesn't make much sense and would be actually confusing.
[1] http://www.dwanatech.com/eng/sub/sub02_01.php?cat_no=6
Best regards,
Tomasz
Sakari Ailus
maintainerRe: [v5 2/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil
Hi Tomasz,
Quoted 103 lines · Tomasz Figa
Quoted 8 lines · Sakari Ailus
Quoted 7 lines · Rob Herring
Quoted 6 lines · Sakari Ailus
Hi Rob,
Thanks for the review.
Quoted 1 line · Rob Herring
On Fri, Feb 23, 2018 at 10:13 AM, Andy Yeh <[email protected]>
Quoted 5 lines · wrote:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
From: Alan Chiang <[email protected]>
Dongwoon DW9807 is a voice coil lens driver.
Also add a vendor prefix for Dongwoon for one did not exist
previously.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 2 lines
Where's that?
Added by
aece98a912d92444ea9da03b04269407d1308f1f. So that line isn't relevant indeed and should be removed.Quoted 5 lines
Quoted 5 lines
Signed-off-by Andy Yeh <[email protected]>---
Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt| 9 +++++++++
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
DACs generally go in bindings/iio/dac/
We have quite a few lens voice coil drivers under bindings/media/i2c
now. I
Quoted 1 line
Quoted 1 line
Quoted 1 line
don't really object to putting this one to bindings/iio/dac but then
the
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
rest should be moved as well.
The camera LED flash drivers are under bindings/leds so this would
actually
Quoted 1 line
Quoted 1 line
Quoted 1 line
be analoguous to that. The lens voice coil drivers are perhaps still
a bit
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
more bound to the domain (camera) than the LED flash drivers.
The h/w is bound to that function or just the s/w?
The hardware. I guess in principle you could use them for other purposes --- most devices seem to be current sinks with configurable current ---
but
Quoted 8 lines
I've never seen that.
The datasheet (dw9714) is here:
<URL:http://www.datasheetspdf.com/datasheet/download.php?id=840322>
Quoted 2 lines
Quoted 2 lines
I can send a patch if you think the existing bindings should be
moved; let
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
me know.
I'm okay if they are separate as long as we're not going to see the same device show up in both places. However, "i2c" is not the best
Quoted 8 lines
Ack. I wouldn't expect that. The datasheets of such devices clearly label the devices voice coil module drivers.
Quoted 2 lines
directory choice. It should be by function, so we can find common properties.
I2c devices in the media subsystem tend to be peripherals that are always used with another device with access to some system bus. Camera sensors,
lens
Quoted 17 lines
devices and tuners can be found there currently. I don't know the original reasoning but it most likely is related to that.
In terms of different kinds of devices we have currently at least the following:
Camera ISPs and CSI-2 receivers
Video muxes
Video codecs
Camera sensors
Camera lens drivers (right now only voice coil modules?) Tuners (DVB, radio, analogue TV, whatever) Radio transmitters
HDMI CEC
Remote controllers
JPEG codecsQuoted 1 line
Cc Hans, too.
Any updates here?
To be honest, I'm not sure there is too much to be thinking about here. This particular hardware block is a lens driver, specifically designed to be used with cameras. Quoting maker's website [1]:
"Driver ICs for automatically focus on images of mobile cameras.
Dongwoon Anatech's AF driver ICs are optimized mobile cameras with low power, low noise, smallest package, as well as include various lens position control methodology."
Quoted 4 lines
IMHO putting its bindings under the more general purpose iio/ directory doesn't make much sense and would be actually confusing.
Rob has acked v6 Andy sent some time ago while the driver patch has unaddressed comments from Jacopo. I think Andy (unintentionally) missed you from cc list:
<URL:https://www.spinics.net/lists/linux-media/msg130709.html>
Signature · 4 lines
Regards, Sakari Ailus [email protected]
Re: [v5 2/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil
Hi Sakari,
Quoted 4 lines · Sakari Ailus
Hi Tomasz,
Quoted 1 line · Tomasz Figa
On Sat, Mar 3, 2018 at 5:15 AM Sakari Ailus <
Quoted 13 lines
Quoted 13 lines
Quoted 8 lines · wrote:
Quoted 7 lines · Rob Herring
Quoted 6 lines · Sakari Ailus
Hi Rob,
Thanks for the review.
Quoted 1 line · Rob Herring
On Fri, Feb 23, 2018 at 10:13 AM, Andy Yeh <[email protected]>
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
From: Alan Chiang <[email protected]>
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Dongwoon DW9807 is a voice coil lens driver.
Also add a vendor prefix for Dongwoon for one did not exist
previously.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Where's that?
Added by
aece98a912d92444ea9da03b04269407d1308f1f. So that line
isn't
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
relevant indeed and should be removed.
Quoted 5 lines
Quoted 5 lines
Signed-off-by Andy Yeh <[email protected]>---
Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt
Quoted 5 lines
Quoted 5 lines
| 9 +++++++++
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
DACs generally go in bindings/iio/dac/
We have quite a few lens voice coil drivers under
bindings/media/i2c
Quoted 2 lines
Quoted 2 lines
now. I
Quoted 1 line
Quoted 1 line
Quoted 1 line
don't really object to putting this one to bindings/iio/dac but
then
Quoted 6 lines
Quoted 6 lines
the
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
rest should be moved as well.
The camera LED flash drivers are under bindings/leds so this would
actually
Quoted 1 line
Quoted 1 line
Quoted 1 line
be analoguous to that. The lens voice coil drivers are perhaps
still
Quoted 6 lines
Quoted 6 lines
a bit
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
more bound to the domain (camera) than the LED flash drivers.
The h/w is bound to that function or just the s/w?
The hardware. I guess in principle you could use them for other
purposes
Quoted 1 line
Quoted 1 line
Quoted 1 line
--- most devices seem to be current sinks with configurable current
---
Quoted 8 lines
Quoted 8 lines
but
Quoted 7 lines
I've never seen that.
The datasheet (dw9714) is here:
<URL:http://www.datasheetspdf.com/datasheet/download.php?id=840322>
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
I can send a patch if you think the existing bindings should be
moved; let
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
me know.
I'm okay if they are separate as long as we're not going to see the same device show up in both places. However, "i2c" is not the best
Ack. I wouldn't expect that. The datasheets of such devices clearly
label
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
the devices voice coil module drivers.
Quoted 2 lines
directory choice. It should be by function, so we can find common properties.
I2c devices in the media subsystem tend to be peripherals that are
always
Quoted 1 line
Quoted 1 line
Quoted 1 line
used with another device with access to some system bus. Camera
sensors,
Quoted 2 lines
Quoted 2 lines
lens
Quoted 1 line
devices and tuners can be found there currently. I don't know the
original
Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
reasoning but it most likely is related to that.
In terms of different kinds of devices we have currently at least the following:
Camera ISPs and CSI-2 receivers
Video muxes
Video codecs
Camera sensors
Camera lens drivers (right now only voice coil modules?) Tuners (DVB, radio, analogue TV, whatever) Radio transmitters
HDMI CEC
Remote controllers
JPEG codecs
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Cc Hans, too.
Any updates here?
To be honest, I'm not sure there is too much to be thinking about here. This particular hardware block is a lens driver, specifically designed
to
Quoted 10 lines
Quoted 10 lines
be used with cameras. Quoting maker's website [1]:
"Driver ICs for automatically focus on images of mobile cameras.
Dongwoon Anatech's AF driver ICs are optimized mobile cameras with low power, low noise, smallest package, as well as include various lens position control methodology."IMHO putting its bindings under the more general purpose iio/ directory doesn't make much sense and would be actually confusing.
Quoted 7 lines
Quoted 1 line
Rob has acked v6 Andy sent some time ago while the driver patch has unaddressed comments from Jacopo. I think Andy (unintentionally) missed you from cc list:
<URL:https://www.spinics.net/lists/linux-media/msg130709.html>
That's good to hear. Thanks for the pointer.
Best regards,
Tomasz