[V10,0/2] media: i2c: Add support for DW9768 VCM
Message ID | 20200703080404.29770-1-dongchun.zhu@mediatek.com (mailing list archive) |
---|---|
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1jrGcK-000jwb-JB; Fri, 03 Jul 2020 08:00:17 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726283AbgGCIEi (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Fri, 3 Jul 2020 04:04:38 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:65470 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725648AbgGCIEh (ORCPT <rfc822;linux-media@vger.kernel.org>); Fri, 3 Jul 2020 04:04:37 -0400 X-UUID: 0abc58f37d8949f3a5e332253a872fb6-20200703 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=wAyY3Pzu4/qYV499F42vjkVX0Bv9W6FosPSxDbCeIiQ=; b=tGbHVgl0+5gctWKDS4v0I8RV5WhfNTba3Vvgx7Oc3QsyNfd+YIcDtq7fjfM2bqnONBdUB3N4uIm1s253HTrJHXcprsSfkhWbhfZv7dPKKGuY2UY0aVdRQPVpfRGbo/alpWL+/kXupSNgc7fBz9e78JUCHBLFTV8nWCuIizX5ank=; X-UUID: 0abc58f37d8949f3a5e332253a872fb6-20200703 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from <dongchun.zhu@mediatek.com>) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1636154247; Fri, 03 Jul 2020 16:04:35 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 3 Jul 2020 16:04:33 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 3 Jul 2020 16:04:31 +0800 From: Dongchun Zhu <dongchun.zhu@mediatek.com> To: <linus.walleij@linaro.org>, <bgolaszewski@baylibre.com>, <mchehab@kernel.org>, <andriy.shevchenko@linux.intel.com>, <robh+dt@kernel.org>, <mark.rutland@arm.com>, <sakari.ailus@linux.intel.com>, <drinkcat@chromium.org>, <tfiga@chromium.org>, <matthias.bgg@gmail.com>, <bingbu.cao@intel.com> CC: <srv_heupstream@mediatek.com>, <linux-mediatek@lists.infradead.org>, <linux-arm-kernel@lists.infradead.org>, <sj.huang@mediatek.com>, <linux-media@vger.kernel.org>, <devicetree@vger.kernel.org>, <louis.kuo@mediatek.com>, <shengnan.wang@mediatek.com>, <dongchun.zhu@mediatek.com> Subject: [PATCH V10 0/2] media: i2c: Add support for DW9768 VCM Date: Fri, 3 Jul 2020 16:04:02 +0800 Message-ID: <20200703080404.29770-1-dongchun.zhu@mediatek.com> X-Mailer: git-send-email 2.9.2 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -0.8 (/) X-LSpam-Report: No, score=-0.8 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,MIME_BASE64_TEXT=1.741,UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no |
Message
Dongchun Zhu
July 3, 2020, 8:04 a.m. UTC
Hello, This series adds DT binding and V4L2 sub-device driver for Dongwoon's DW9768. DW9768 is a 10-bit DAC with 100mA output current sink capability, designed for linear control of voice coil motor(VCM). This driver creates a V4L2 sub-device and provides control to set the desired focus via II2C serial interface. 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: v9: https://lore.kernel.org/linux-media/20200630062211.22988-1-dongchun.zhu@mediatek.com/ v8: https://lore.kernel.org/linux-media/20200616125531.31671-1-dongchun.zhu@mediatek.com/ v7: https://lore.kernel.org/linux-media/20200605105412.18813-1-dongchun.zhu@mediatek.com/ v6: https://lore.kernel.org/linux-media/20200518132731.20855-1-dongchun.zhu@mediatek.com/ v5: https://lore.kernel.org/linux-media/20200502161727.30463-1-dongchun.zhu@mediatek.com/ v4: https://lore.kernel.org/linux-media/20200330123634.363-1-dongchun.zhu@mediatek.com/ v3: https://lore.kernel.org/linux-media/20200228155958.20657-1-dongchun.zhu@mediatek.com/ v2: https://lore.kernel.org/linux-media/20190905072142.14606-1-dongchun.zhu@mediatek.com/ v1: https://lore.kernel.org/linux-media/20190708100641.2702-1-dongchun.zhu@mediatek.com/ Mainly changes of v10 address comments from Sakari, Tomasz, Bingbu. Compared to v9: - Add reviewed-by for VCM driver - Re-send plain patch to test if there are still weird trailing whitespaces 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 | 100 ++++ MAINTAINERS | 8 + drivers/media/i2c/Kconfig | 12 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/dw9768.c | 554 +++++++++++++++++++++ 5 files changed, 675 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9768.yaml create mode 100644 drivers/media/i2c/dw9768.c