[V5, 0/2] media: i2c: Add support for DW9768 VCM driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

This series adds DT bindings in YAML and V4L2 sub-device driver for DW9768
lens voice coil motor, which is a 10-bit DAC with 100mA output current
sink capability from Dongwoon.

The driver is designed for linear control of voice coil motor,
and controlled via IIC serial interface to set the desired focus.
It controls the position with 10-bit DAC data D[9:0] and seperates
two 8-bit registers to control the VCM position as belows.
DAC_MSB: D[9:8](ADDR: 0x03):
     +---+---+---+---+---+---+---+---+
     |---|---|---|---|---|---|D09|D08|
     +---+---+---+---+---+---+---+---+
DAC_LSB: D[7:0](ADDR: 0x04):
     +---+---+---+---+---+---+---+---+
     |D07|D06|D05|D04|D03|D02|D01|D00|
     +---+---+---+---+---+---+---+---+

This driver supports:
 - set DW9768 to standby mode once suspend and turn it back to active if resume
 - set the desired focus via V4L2_CID_FOCUS_ABSOLUTE ctrl

Previous versions of this patch-set can be found here:
 v4: https://lore.kernel.org/linux-media/20200330123634.363-1-dongchun.zhu@xxxxxxxxxxxx/
 v3: https://lore.kernel.org/linux-media/20200228155958.20657-1-dongchun.zhu@xxxxxxxxxxxx/
 v2: https://lore.kernel.org/linux-media/20190905072142.14606-1-dongchun.zhu@xxxxxxxxxxxx/
 v1: https://lore.kernel.org/linux-media/20190708100641.2702-1-dongchun.zhu@xxxxxxxxxxxx/

Changes of v5 are addressing comments from Rob, Andy, Sakari, including:
 - Rebase onto 5.7-rc1
 - Refine DT bindings in YAML
 - Remove the condition of IS_ENABLED(CONFIG_PM) as the driver depends on PM
 - Reverse the order of enabling RPM and registering the async subdev

Please review.
Thanks.

Dongchun Zhu (2):
  media: dt-bindings: media: i2c: Document DW9768 bindings
  media: i2c: dw9768: Add DW9768 VCM driver

 .../bindings/media/i2c/dongwoon,dw9768.yaml        |  60 +++
 MAINTAINERS                                        |   8 +
 drivers/media/i2c/Kconfig                          |  11 +
 drivers/media/i2c/Makefile                         |   1 +
 drivers/media/i2c/dw9768.c                         | 440 +++++++++++++++++++++
 5 files changed, 520 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9768.yaml
 create mode 100644 drivers/media/i2c/dw9768.c

-- 
2.9.2




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux