From patchwork Fri Jul 3 08:04:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongchun Zhu X-Patchwork-Id: 11641139 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C32D113BD for ; Fri, 3 Jul 2020 08:12:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9AC7B207DA for ; Fri, 3 Jul 2020 08:12:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="stysZ88f"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="tGbHVgl0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9AC7B207DA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=XtJcGpN1QJKlvAbY2OUvHgZICra92ocTwddIJjsi21Q=; b=stysZ88fCAlTtGL4tAuZjYS99v v6RdHvOYGsB9mFsawfjc1tYk8OWR0rI1ZpMVLJT2CDnrZaiKLfzles36qZvO86ZY56oGK2QDOjir9 5vzJYFvb88hHpTSqd+uzax3qoHEL+GVBrs+3Q/B7BOr5Fv2ASYDoZGpTHaKk5hfP0d1ATapyLWMnW fjmfO2ARH3smFwFeA4TWmSCvLN8+LYzzDLNrWPEbxGyKLTeAgCn32V5pA/0w7lAeJmgSw1lNw8ahv agPaS8SYe9OUhEwqUQMcWf/cRBo88wyslR2nLIoi6oPEaODbBpVTK+98tz+4hYx5CNlXcQIoDEvXK c0h76sLA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jrGnN-000477-Mq; Fri, 03 Jul 2020 08:11:41 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jrGnJ-000448-Qn; Fri, 03 Jul 2020 08:11:39 +0000 X-UUID: 34d2f23f3fa64538b56efd86107b9c31-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: 34d2f23f3fa64538b56efd86107b9c31-20200703 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 944686102; Fri, 03 Jul 2020 00:11:18 -0800 Received: from mtkmbs05n2.mediatek.inc (172.21.101.140) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 3 Jul 2020 01:04:35 -0700 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 To: , , , , , , , , , , 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 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200703_041138_147204_25C7CD1B X-CRM114-Status: GOOD ( 11.56 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, srv_heupstream@mediatek.com, shengnan.wang@mediatek.com, sj.huang@mediatek.com, linux-mediatek@lists.infradead.org, dongchun.zhu@mediatek.com, louis.kuo@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org 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