Skip to contentSkip to conversation

DW9807 DT binding and driver patches

PATCH RESEND In review Andy Yeh 3 participants 9 messages May 2, 2018 – May 16, 2018

Subsystems (3)
lore
Share & tools
lore

Andy Yeh

author
#0 lore raw

v9 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
author
#1 lore raw

PATCH RESEND v9 1/2 media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil

From: Alan Chiang <[email protected]>

Dongwoon DW9807 is a voice coil lens driver.

---
 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
new file mode 100644
index 0000000..0a1a860
@@ -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
maintainer
#2 lore raw

Re: [RESEND PATCH v9 1/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil

Quoted 8 lines · Andy Yeh

From: Alan Chiang <[email protected]>

Dongwoon DW9807 is a voice coil lens driver.

I don't remember seeing these two on the first patch nor giving mine. For what it's worth, I've applied v8 to my tree here:

<URL:https://git.linuxtv.org/sailus/media_tree.git/log/?h=for-4.18-3>

I.e. there's no need to resend the same patch to just add the regular acked-by or reviewed-by tags. "RESEND" in the subject suggests you're sending exactly the same patch, and in that case the version would be unchanged as well.

Quoted 22 lines
---
 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
new file mode 100644
index 0000000..0a1a860
@@ -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 · 2 lines
Sakari Ailus
[email protected]
author
#3 lore raw

RE: [RESEND PATCH v9 1/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil

Hi Sakari,

Thanks to add to your tree. And I am not familiar with the process. So I wonder how the patchset will be applied to the Linux media tree eventually?

Regards, Andy

-----Original Message-----
From: Sakari Ailus [mailto:[email protected]]
Sent: Thursday, May 3, 2018 5:37 AM
To: Yeh, Andy <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Chiang, AlanX <[email protected]>
Subject: Re: [RESEND PATCH v9 1/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil

Quoted 8 lines · Andy Yeh

From: Alan Chiang <[email protected]>

Dongwoon DW9807 is a voice coil lens driver.

I don't remember seeing these two on the first patch nor giving mine. For what it's worth, I've applied v8 to my tree here:

<URL:https://git.linuxtv.org/sailus/media_tree.git/log/?h=for-4.18-3>

I.e. there's no need to resend the same patch to just add the regular acked-by or reviewed-by tags. "RESEND" in the subject suggests you're sending exactly the same patch, and in that case the version would be unchanged as well.

Quoted 17 lines
---
 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

(quoted diff) +0 -0

a/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt b/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt new file mode 100644
index 0000000..0a1a860

Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt line 9

Quoted 9 lines
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

--
Sakari Ailus
[email protected]

author
#4 lore raw

RE: [RESEND PATCH v9 1/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil

In reply to Sakari Ailus

Dear reviewers,

As the dt-binding patch has been accepted, would any help set the driver patch be accepted too? Any missing action from my side blocked the process. Thanks in advance.

media: dw9807: Add dw9807 vcm driver
https://patchwork.linuxtv.org/patch/49159/

Regards, Andy

-----Original Message-----
From: Sakari Ailus [mailto:[email protected]]
Sent: Thursday, May 3, 2018 5:37 AM
To: Yeh, Andy <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Chiang, AlanX <[email protected]>
Subject: Re: [RESEND PATCH v9 1/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil

Quoted 8 lines · Andy Yeh

From: Alan Chiang <[email protected]>

Dongwoon DW9807 is a voice coil lens driver.

I don't remember seeing these two on the first patch nor giving mine. For what it's worth, I've applied v8 to my tree here:

<URL:https://git.linuxtv.org/sailus/media_tree.git/log/?h=for-4.18-3>

I.e. there's no need to resend the same patch to just add the regular acked-by or reviewed-by tags. "RESEND" in the subject suggests you're sending exactly the same patch, and in that case the version would be unchanged as well.

Quoted 17 lines
---
 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

(quoted diff) +0 -0

a/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt b/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt new file mode 100644
index 0000000..0a1a860

Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt line 9

Quoted 9 lines
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

--
Sakari Ailus
[email protected]

Hello,

The following patches (submitted by you) have been updated in patchwork:

* linux-media: [RESEND,v8,1/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil
- http://patchwork.linuxtv.org/patch/49028/
- for: Linux Media kernel patches
was: New
now: Accepted

* linux-media: [RESEND,v9,1/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil
- http://patchwork.linuxtv.org/patch/49158/
- for: Linux Media kernel patches
was: New
now: Accepted

* linux-media: RESEND[PATCH v6 1/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil
- http://patchwork.linuxtv.org/patch/47979/
- for: Linux Media kernel patches
was: New
now: Accepted

This email is a notification only - you do not need to respond.

-

Patches submitted to [email protected] have the following possible states:

New: Patches not yet reviewed (typically new patches);

Under review: When it is expected that someone is reviewing it (typically,
the driver's author or maintainer). Unfortunately, patchwork doesn't have a field to indicate who is the driver maintainer. If in doubt about who is the driver maintainer please check the MAINTAINERS file or ask at the ML;

Superseded: when the same patch is sent twice, or a new version of the
same patch is sent, and the maintainer identified it, the first version is marked as such. It is also used when a patch was superseeded by a git pull request.

Obsoleted: patch doesn't apply anymore, because the modified code doesn't
exist anymore.

Changes requested: when someone requests changes of the patch;

Rejected: When the patch is wrong or doesn't apply. Most of the
time, 'rejected' and 'changes requested' means the same thing for the developer: he'll need to re-work on the patch.

RFC: patches marked as such and other patches that are also RFC, but the
patch author was not nice enough to mark them as such. That includes:
- patches sent by a driver's maintainer who send patches via git pull requests;
- patches with a very active community (typically from developers working with embedded devices), where lots of versions are needed for the driver maintainer and/or the community to be happy with.

TODO: A variant of RFC. It keeps the patch visible at patchwork main
screen, allowing to better track it.

Not Applicable: for patches that aren't meant to be applied via
the media-tree.git.

Accepted: when some driver maintainer says that the patch will be applied
via his tree, or when everything is ok and it got applied either at the main tree or via some other tree (fixes tree; some other maintainer's tree - when it belongs to other subsystems, etc);

If you think any status change is a mistake, please send an email to the ML.

-

This is an automated mail sent by the patchwork system at patchwork.linuxtv.org. To stop receiving these notifications, edit your mail settings at:
http://patchwork.linuxtv.org/mail/

maintainer
#5 lore raw

Re: [RESEND PATCH v9 1/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil

Quoted 6 lines · Andy

Dear reviewers,

As the dt-binding patch has been accepted, would any help set the driver patch be accepted too? Any missing action from my side blocked the process. Thanks in advance.

media: dw9807: Add dw9807 vcm driver
https://patchwork.linuxtv.org/patch/49159/

The patchwork status was wrong and I've fixed it now; the patches themselves are contained in a pull request to Mauro here:

<URL:https://www.spinics.net/lists/linux-media/msg133734.html>

Signature · 2 lines
Sakari Ailus
[email protected]
author
#6 lore raw

PATCH RESEND v9 2/2 media: dw9807: Add dw9807 vcm driver

In reply to Andy Yeh

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
since v4:
- sent patchset included DT binding with cover page
since v6:
- change the return code of i2c_check
- fix long cols exceed 80 chars
- remove #define DW9807_NAME since only used once
since v7:
- Remove some redundant type cast
- Modify to meet the coding style
- Replace a while loop by readx_poll_timeout function
- Return the i2c error directly.
since v8:
- Added Reviewed-by and Acked-by

 MAINTAINERS                |   7 +
 drivers/media/i2c/Kconfig  |  10 ++
 drivers/media/i2c/Makefile |   1 +
 drivers/media/i2c/dw9807.c | 329 +++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 347 insertions(+)
 create mode 100644 drivers/media/i2c/dw9807.c
MAINTAINERS +7 -0
index 845fc25..a339bb5 100644
@@ -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
index cb5d7ff..fd01842 100644
@@ -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
index 548a9ef..1b62639 100644
@@ -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 +329 -0

329 lines not on this page · raw message

Signature · 1 line
2.7.4
#7 lore raw

Re: [RESEND PATCH v9 2/2] media: dw9807: Add dw9807 vcm driver

Em Wed, 2 May 2018 23:53:48 +0800
Andy Yeh <[email protected]> escreveu:

Quoted 5 lines

From: Alan Chiang <[email protected]>

DW9807 is a 10 bit DAC from Dongwoon, designed for linear control of voice coil motor.

Quoted 8 lines

This driver creates a V4L2 subdevice and
provides control to set the desired focus.

This adds a new warning.

Thanks,
Mauro

    drivers/media/i2c/dw9807.c: In function 'dw9807_set_dac':
    drivers/media/i2c/dw9807.c:81:16: warning: unused variable 'retry' [-Wunused-variable]
      int val, ret, retry = 0;
                    ^

Please either fix or fold the following patch.

drivers/media/i2c/dw9807.c +1 -1
index 28ede2b47acf..6ebb98717fb1 100644
@@ -78,7 +78,7 @@ static int dw9807_set_dac(struct i2c_client *client, u16 data)
        const char tx_data[3] = {
                DW9807_MSB_ADDR, ((data >> 8) & 0x03), (data & 0xff)
        };
-       int val, ret, retry = 0;
+       int val, ret;
 
        /*
         * According to the datasheet, need to check the bus status before we
author
#8 lore raw

RE: [RESEND PATCH v9 2/2] media: dw9807: Add dw9807 vcm driver

Hi Mauro,

Quoted 12 lines

-----Original Message-----
From: Mauro Carvalho Chehab [mailto:[email protected]]
Sent: Thursday, May 10, 2018 3:04 AM
To: Yeh, Andy <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Chiang, AlanX <[email protected]>
Subject: Re: [RESEND PATCH v9 2/2] media: dw9807: Add dw9807 vcm driver

This adds a new warning.

Thanks,
Mauro

Quoted 7 lines
   drivers/media/i2c/dw9807.c: In function 'dw9807_set_dac':
   drivers/media/i2c/dw9807.c:81:16: warning: unused variable 'retry' [-Wunused-variable]
     int val, ret, retry = 0;
                   ^

Please either fix or fold the following patch.

I noticed you just submitted a patch to the list to address the warning. Thanks.
https://patchwork.linuxtv.org/patch/49575/

Just in the meantime, I uploaded the same one before noticing your patch. I would like to obsolete mine, so let me know if you agree too. Thanks.
https://patchwork.linuxtv.org/patch/49574/

Regards, Andy

Quoted 12 lines
drivers/media/i2c/dw9807.c +1 -1
@@ -78,7 +78,7 @@ static int dw9807_set_dac(struct i2c_client *client, u16 data)
       const char tx_data[3] = {
               DW9807_MSB_ADDR, ((data >> 8) & 0x03), (data & 0xff)
       };
-       int val, ret, retry = 0;
+       int val, ret;
 
       /*
        * According to the datasheet, need to check the bus status before we