From patchwork Mon Jul 11 08:16:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 589641 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43C70C433EF for ; Mon, 11 Jul 2022 08:16:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229780AbiGKIQ4 (ORCPT ); Mon, 11 Jul 2022 04:16:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229771AbiGKIQw (ORCPT ); Mon, 11 Jul 2022 04:16:52 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA9751E3CB; Mon, 11 Jul 2022 01:16:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1657527408; x=1689063408; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=klwcmwrkKvPTuZKskv/wl1boELttcnKApdWjvkZ9c7c=; b=bliDJc/GTQrnKkgJeO5r3zK7zk03Fw2VckRnXNGHGhydgrWw60ACqFKu r2Kszanx/uttNmxQIWjYlj/1cYDOSA+l2Ynfc5Qww4kmW8EaVzUWephVP cp/hOkwGCZa3UUzRCBpcjugScvw5jMC/KnH9Vl9qCYNio0Cc5PAvNgyME DenSOT3cDfJ0vkn2DtTIQKsO7codUo2jzg6/sxt2NBg69CGIEct0N0KBA V6bTkJOxh2IwgKuEGWwBO2qhBokVwewlog6B1/rn2pnZMMcOamdY2egOK YeD7GewQ4Ykvnc0cvBQkhfCTfVc8JsezLcsY9T7k+8R3A14Y8yW6xf1BB g==; X-IronPort-AV: E=Sophos;i="5.92,262,1650924000"; d="scan'208";a="24967070" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 11 Jul 2022 10:16:42 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Mon, 11 Jul 2022 10:16:42 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Mon, 11 Jul 2022 10:16:42 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1657527402; x=1689063402; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=klwcmwrkKvPTuZKskv/wl1boELttcnKApdWjvkZ9c7c=; b=DXrpaLA2zvN5B401IdE/pEPsqmhWLdhflPSduKPFYNkyZ8cCC/MGh1iQ j2MXh4WLrg5sFNcyRM5l/XvNL8zFegX4IkdoLXV/X+xMR++a098tORc3I KwE8ID/bjjP0qNdIy+ieuR1iDPK6QHdG1FQOOQGpMqaeTvL3QkIzkr6NX TUJ5XBdsqCda4qqHv0tL3s/Ch5cvc7jfIkSFgBk+AyJvC9V8BQa+D3WTI FWlIgh0cK7JqYBiS1RxiSqQQFuSgzfCDU3EvTpzPLn6328z1YoZdeylOd TDt7cnYRvNm3cxqFjfpTkm6kzNw/ocIFC4jl3tQ5kP77mIbDt8gn83zjM Q==; X-IronPort-AV: E=Sophos;i="5.92,262,1650924000"; d="scan'208";a="24967069" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 11 Jul 2022 10:16:42 +0200 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id A6342280078; Mon, 11 Jul 2022 10:16:42 +0200 (CEST) From: Alexander Stein To: "Paul J . Murphy" , Daniele Alessandrelli , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski Cc: Alexander Stein , linux-media@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 1/6] media: i2c: ov9282: remove unused and unset i2c_client member Date: Mon, 11 Jul 2022 10:16:34 +0200 Message-Id: <20220711081639.150153-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220711081639.150153-1-alexander.stein@ew.tq-group.com> References: <20220711081639.150153-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This is not need anyway as the i2c_client is stored in v4l2_subdev. Signed-off-by: Alexander Stein Acked-by: Daniele Alessandrelli --- drivers/media/i2c/ov9282.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c index 2e0b315801e5..3269c1983bd5 100644 --- a/drivers/media/i2c/ov9282.c +++ b/drivers/media/i2c/ov9282.c @@ -123,7 +123,6 @@ struct ov9282_mode { */ struct ov9282 { struct device *dev; - struct i2c_client *client; struct v4l2_subdev sd; struct media_pad pad; struct gpio_desc *reset_gpio; From patchwork Mon Jul 11 08:16:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 590704 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDD67CCA485 for ; Mon, 11 Jul 2022 08:17:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229809AbiGKIRA (ORCPT ); Mon, 11 Jul 2022 04:17:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229792AbiGKIQw (ORCPT ); Mon, 11 Jul 2022 04:16:52 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE5251E3E4; Mon, 11 Jul 2022 01:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1657527409; x=1689063409; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YDQE92GOuvRF1sa7iDiI0MVkyNA4McNXNdcJVdHctLQ=; b=jP0iLgf71ZH/+8AC1Tvofjmhnes8OzU90ukJJ6GWKZGu8RDPP+MCFP8J oo7dQ6arUTejBzSYDu4w/AF6GM+g9pZ25hhUu/KDb4d/abfzL8GoZan7M JVnAa3cp5vLM70rxnepBvo+i7svonbw3stt1ZI4y1vGFt4BLa5i6ptQZ1 mARreKghboJ4o5G475S03SrbeqWidqJqxA13GcNLFbTyrrypIehUs8yJm ST6IbSrFGDEL/v9dOdwx9zu0/lCjKFB92Amp2TVQeXXSPFw2fAfuDAFfy OH+e+IGtR5NCCWR61H3y3xvaYFQA9hkW40zEMZy8eRg+nQyRXwXQGw1ED Q==; X-IronPort-AV: E=Sophos;i="5.92,262,1650924000"; d="scan'208";a="24967072" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 11 Jul 2022 10:16:43 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Mon, 11 Jul 2022 10:16:43 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Mon, 11 Jul 2022 10:16:43 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1657527403; x=1689063403; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YDQE92GOuvRF1sa7iDiI0MVkyNA4McNXNdcJVdHctLQ=; b=pvz1VeEQQQFuKrnSMiwOTcY+a7HyI1EBeT30rPtf9BiBVTh8PGWgjdsx fin23zlvEwN/vZXmI2IfzNyp0w5DKCNpd//Ei4n8es3k0/qGW/3EPkIjB Rk2WrXFN8Fy2yQ3yP6W9kp76EfuTxSHGmZ7Imczm3QLWRHwZMcI7okdDe mEfwec3/Vjg+SpgUj6W2hy2YQJ8lsBMhenvW8g6YvPi8SsG0ZrU+9NDj1 vNIs9oWp5GCLiv8S3vsiM6wZdDtfYnmhsXhrvkDsPJSg8xO1fmD8j6xrK FXurmS5ZmmTTuuhbPRRyrW6K7DYA2Glzr/AWmsuOQdvwQucv/9CcZoeYn Q==; X-IronPort-AV: E=Sophos;i="5.92,262,1650924000"; d="scan'208";a="24967071" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 11 Jul 2022 10:16:42 +0200 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id D888728007C; Mon, 11 Jul 2022 10:16:42 +0200 (CEST) From: Alexander Stein To: "Paul J . Murphy" , Daniele Alessandrelli , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski Cc: Alexander Stein , linux-media@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 2/6] media: dt-bindings: media: Add compatible for ov9281 Date: Mon, 11 Jul 2022 10:16:35 +0200 Message-Id: <20220711081639.150153-3-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220711081639.150153-1-alexander.stein@ew.tq-group.com> References: <20220711081639.150153-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This is a slightly different hardware with identical software interface. Signed-off-by: Alexander Stein --- Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml index bf115ab9d926..285f8c85f253 100644 --- a/Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml @@ -16,10 +16,13 @@ description: sensor with an active array size of 1296H x 816V. It is programmable through I2C interface. The I2C client address is fixed to 0x60/0x70 as per sensor data sheet. Image data is sent through MIPI CSI-2. + OV9281 has a different lens chief ray angle. properties: compatible: - const: ovti,ov9282 + enum: + - ovti,ov9281 + - ovti,ov9282 reg: description: I2C address maxItems: 1 From patchwork Mon Jul 11 08:16:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 589640 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 355E3C433EF for ; Mon, 11 Jul 2022 08:17:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229757AbiGKIQ7 (ORCPT ); Mon, 11 Jul 2022 04:16:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229785AbiGKIQw (ORCPT ); Mon, 11 Jul 2022 04:16:52 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B74981E3E9; Mon, 11 Jul 2022 01:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1657527410; x=1689063410; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5sXjuleYa2Wf1ygagT2cNefKIkNKtXeK00Li8tFYqJ8=; b=SBuJBGA7yd0IcM6xaBwIFoqvHwjissZdpNlkEBBKNuUrUj54WBYFa+X8 OR0XNPrKDoxPK8JHx2GcXrIPP7bUqCET21eUpYA5BK8vXtCZNzudexxX1 s6oQyiRybz6mcxBGaCwQ0qfbr6NIM1cTQT+UA73ukPSBD2ebkgWfb/u8p 5x/Xua3qVcGY4SlyDg66xa6HQK4LJQzIbrlu7XJjfq1LjeR6qxkycan6+ LTg+HLK/IxgM2dDP9rpFQaH4e+eL0Rz6RVDVYOdZwF7ZkRfPFIXDoA/Ri fuH7umxu16u4/Lh1w6sqFlUDyELpyYwH3r0syow6qMwSqCTeB2PK8kFDf w==; X-IronPort-AV: E=Sophos;i="5.92,262,1650924000"; d="scan'208";a="24967075" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 11 Jul 2022 10:16:43 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Mon, 11 Jul 2022 10:16:43 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Mon, 11 Jul 2022 10:16:43 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1657527403; x=1689063403; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5sXjuleYa2Wf1ygagT2cNefKIkNKtXeK00Li8tFYqJ8=; b=AvBEZP/m79nbPYH+kASFcZW5b+zSVRDzBOZ52J6/ci275Lh2LWc9bem6 R8nHSCk8tNgX44Z5M4joOGPNFfpHSg0zo0AkDN4THuAulXLyTr+FFopFC xciaXtx2UzhJlwWfeV/5tWt5n/dydK63u/Q+9w7Z75ixmRvrDcLUqYDcZ c98UqQP1NAZX5oodLxWWI7gN0wF7tEOURGJgap0LPWPGF+jikwc3d9k1u u6v5i3dMo2GMaewTaH0xtPEEiqnPhzi0881F60/yTzENHqLIkd4c++Zp9 8yTOvDLmug2sZ6PZ+DhkoJmWMDNroGUBo3tqOTj8nId3t3IKc1xjXGzIW A==; X-IronPort-AV: E=Sophos;i="5.92,262,1650924000"; d="scan'208";a="24967074" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 11 Jul 2022 10:16:43 +0200 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 0D3DC28007F; Mon, 11 Jul 2022 10:16:43 +0200 (CEST) From: Alexander Stein To: "Paul J . Murphy" , Daniele Alessandrelli , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski Cc: Alexander Stein , linux-media@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 3/6] media: i2c: ov9282: Add ov9281 compatible Date: Mon, 11 Jul 2022 10:16:36 +0200 Message-Id: <20220711081639.150153-4-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220711081639.150153-1-alexander.stein@ew.tq-group.com> References: <20220711081639.150153-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org According to product brief they are identical from software point of view. Differences are a different chief ray angle (CRA) and the package. Signed-off-by: Alexander Stein --- drivers/media/i2c/ov9282.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c index 3269c1983bd5..04fda8222e07 100644 --- a/drivers/media/i2c/ov9282.c +++ b/drivers/media/i2c/ov9282.c @@ -1114,6 +1114,7 @@ static const struct dev_pm_ops ov9282_pm_ops = { }; static const struct of_device_id ov9282_of_match[] = { + { .compatible = "ovti,ov9281" }, { .compatible = "ovti,ov9282" }, { } }; From patchwork Mon Jul 11 08:16:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 590705 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BD26CCA480 for ; Mon, 11 Jul 2022 08:16:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229754AbiGKIQ6 (ORCPT ); Mon, 11 Jul 2022 04:16:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229798AbiGKIQw (ORCPT ); Mon, 11 Jul 2022 04:16:52 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F5181E3CA; Mon, 11 Jul 2022 01:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1657527410; x=1689063410; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HSaIiK0leOoEhihrSLT6bFw0oUUcvujOX0lUO0UHAro=; b=D74x2mTp6Sz2Y9v5jxD+pkUHqUPGyGdkq3SqtuomTUSgVYLrkXykjCOY CiVKKs39XEpVRp/sxT/7n2HOgCn9UHA9tmj6MIBU4BAeQ7p66ul9iurJD 3fYyBVFep2YHNmOuLwgEMo+h31BY+Ehj+jMiO4TJYbL7plzyhlLyo3509 3l8zTqzBShNkRkt/zNwOY3yaLIkjfovdHTYKy+bqdm17W4/vE26G0kcmO 6cFzE0j7ZgjyS4cgUv/morSNq3VECqHOE0lgPX6dt8RUwIIUOA/Qb/PGf c7nbqN5eHOudtxtSgoAacD1rKO04mfS6kGKmaoyah02wUJ3ICbo3nWaZ+ A==; X-IronPort-AV: E=Sophos;i="5.92,262,1650924000"; d="scan'208";a="24967077" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 11 Jul 2022 10:16:43 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Mon, 11 Jul 2022 10:16:43 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Mon, 11 Jul 2022 10:16:43 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1657527403; x=1689063403; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HSaIiK0leOoEhihrSLT6bFw0oUUcvujOX0lUO0UHAro=; b=hTAFaTPW4qoft3NmCPBbsfwfkDQJn90wqOX74E0wMIUxEH1mN+v3Mb9r 1wcJ2QrkPdVWUr004ulaKe9kwtoQgW+LVWSYyZj9MO0j8O3YbTpnBTLz9 yo/DhbOi3YyfLq7UntmpLsu29P5oG3WL9RwrofFXp1pA4rlxHcNgLvw2N BoVmeHDPkg7Bm7xrCYp2K9F7cz+lh23vvBMDNzyby6lP7dQg7sit6kek3 NskMjTHqsXHPAD6C3Y/HTxT5Wc4McNzF7gScBUHZEgoBtzdmECE+K2ZaT BKH6PqP758JguykPO+MCwfFiozoBlSb2qeo0gVJ6tFGT9M+WCACcTHLaF w==; X-IronPort-AV: E=Sophos;i="5.92,262,1650924000"; d="scan'208";a="24967076" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 11 Jul 2022 10:16:43 +0200 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 41537280075; Mon, 11 Jul 2022 10:16:43 +0200 (CEST) From: Alexander Stein To: "Paul J . Murphy" , Daniele Alessandrelli , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski Cc: Alexander Stein , linux-media@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 4/6] media: dt-bindings: media: ov9282: Add power supply properties Date: Mon, 11 Jul 2022 10:16:37 +0200 Message-Id: <20220711081639.150153-5-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220711081639.150153-1-alexander.stein@ew.tq-group.com> References: <20220711081639.150153-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add regulators for each power domain. Signed-off-by: Alexander Stein --- .../devicetree/bindings/media/i2c/ovti,ov9282.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml index 285f8c85f253..9abfaabd373a 100644 --- a/Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml @@ -39,6 +39,15 @@ properties: description: Reference to the GPIO connected to the XCLR pin, if any. maxItems: 1 + avdd-supply: + description: Analog power supply + + dovdd-supply: + description: Digital I/O power supply + + dvdd-supply: + description: Digital core supply + port: additionalProperties: false $ref: /schemas/graph.yaml#/$defs/port-base From patchwork Mon Jul 11 08:16:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 589639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33B4BCCA483 for ; Mon, 11 Jul 2022 08:17:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229779AbiGKIRA (ORCPT ); Mon, 11 Jul 2022 04:17:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229803AbiGKIQw (ORCPT ); Mon, 11 Jul 2022 04:16:52 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E49B1DA6D; Mon, 11 Jul 2022 01:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1657527411; x=1689063411; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=l0d36+69eYrkkbVW1c3AnF9c2X+JUGK0g9stTZsQnb4=; b=JfJnzemUScsReuFTPEdYqJe0bLs70QkBkOZWd043faB0mJWkb5NEOZSQ fswyfEY+NUzgKoogZ3u3HlBX+rndzaFyKbm0CKZg0wjhyRm2ODJEOdoGd eG6hofP9b/1lW0ihshcY1DDASbhky2Rmlh0o5UobuEK6IoOGoR6GSWeRs 1uPOPb/0dW7Rq8AIoCriKh83kvC/qtF5QxQRolbuIPSaln4eV/VCmuEcU 0NfTX0WUY3Nyq6ItiZuWqsgB4QQb+++71bLqWGgeH1/4CkpcDssc1LqOK kl8EOmk9+h3wME20rlJ1G55lyxNQaOTTYPU+oEtULuHmdW0SqQ5tcegGc A==; X-IronPort-AV: E=Sophos;i="5.92,262,1650924000"; d="scan'208";a="24967080" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 11 Jul 2022 10:16:43 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Mon, 11 Jul 2022 10:16:43 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Mon, 11 Jul 2022 10:16:43 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1657527403; x=1689063403; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=l0d36+69eYrkkbVW1c3AnF9c2X+JUGK0g9stTZsQnb4=; b=QeuBaYzUVPiuBc5OhsWiS3LPUt3vP/tzcj0yDSk5sBBr3YAW3owx0l8o AUvfW/KuIpL7IKfPV+PH++QXcnuTuQ//Gzubmu55QSE8VURXoZjQ3Huw/ hAAIuRu5Dk3ZZYbmpbMGvpG4uMw8Hh1Q+NnDln/Wm+psEwd4mwiYpr1Mv IW0I6FvFl6RfH1H3NxPhSvC/0RZLYcUINUj3C6P8zeIuP0VlXBOecpdHH SLiNAd1EoF7vGUVfpoO5RxPfcqQrmEnzWm5HHDMPbsn60PBcgTRYv7dDF nyn5Dzl273lMathz4x8znknvUl/X7lvp+AVVtr/FlROHXd0UbRVTMUU8a w==; X-IronPort-AV: E=Sophos;i="5.92,262,1650924000"; d="scan'208";a="24967079" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 11 Jul 2022 10:16:43 +0200 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 6BA92280078; Mon, 11 Jul 2022 10:16:43 +0200 (CEST) From: Alexander Stein To: "Paul J . Murphy" , Daniele Alessandrelli , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski Cc: Alexander Stein , linux-media@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 5/6] media: i2c: ov9282: Add regulator support Date: Mon, 11 Jul 2022 10:16:38 +0200 Message-Id: <20220711081639.150153-6-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220711081639.150153-1-alexander.stein@ew.tq-group.com> References: <20220711081639.150153-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Need in case the sensors is supplied by a switchable regulator. Signed-off-by: Alexander Stein --- drivers/media/i2c/ov9282.c | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c index 04fda8222e07..c3faf11a99b5 100644 --- a/drivers/media/i2c/ov9282.c +++ b/drivers/media/i2c/ov9282.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -55,6 +56,14 @@ #define OV9282_REG_MIN 0x00 #define OV9282_REG_MAX 0xfffff +static const char * const ov9282_supply_names[] = { + "avdd", /* Analog power */ + "dovdd", /* Digital I/O power */ + "dvdd", /* Digital core power */ +}; + +#define OV9282_NUM_SUPPLIES ARRAY_SIZE(ov9282_supply_names) + /** * struct ov9282_reg - ov9282 sensor register * @address: Register address @@ -127,6 +136,7 @@ struct ov9282 { struct media_pad pad; struct gpio_desc *reset_gpio; struct clk *inclk; + struct regulator_bulk_data supplies[OV9282_NUM_SUPPLIES]; struct v4l2_ctrl_handler ctrl_handler; struct v4l2_ctrl *link_freq_ctrl; struct v4l2_ctrl *pclk_ctrl; @@ -883,10 +893,18 @@ static int ov9282_power_on(struct device *dev) goto error_reset; } + ret = regulator_bulk_enable(ARRAY_SIZE(ov9282->supplies), ov9282->supplies); + if (ret) { + dev_err(dev, "Failed to enable regulators\n"); + goto disable_clk; + } + usleep_range(400, 600); return 0; +disable_clk: + clk_disable_unprepare(ov9282->inclk); error_reset: gpiod_set_value_cansleep(ov9282->reset_gpio, 0); @@ -903,6 +921,11 @@ static int ov9282_power_off(struct device *dev) { struct v4l2_subdev *sd = dev_get_drvdata(dev); struct ov9282 *ov9282 = to_ov9282(sd); + int ret; + + ret = regulator_bulk_disable(ARRAY_SIZE(ov9282->supplies), ov9282->supplies); + if (ret) + dev_err(ov9282->dev, "Failed to disable supplies: %d\n", ret); gpiod_set_value_cansleep(ov9282->reset_gpio, 0); @@ -996,6 +1019,18 @@ static int ov9282_init_controls(struct ov9282 *ov9282) return 0; } +static int ov9282_configure_regulators(struct ov9282 *ov9282) +{ + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(ov9282->supplies); i++) + ov9282->supplies[i].supply = ov9282_supply_names[i]; + + return devm_regulator_bulk_get(ov9282->dev, + ARRAY_SIZE(ov9282->supplies), + ov9282->supplies); +} + /** * ov9282_probe() - I2C client device binding * @client: pointer to i2c client device @@ -1022,6 +1057,12 @@ static int ov9282_probe(struct i2c_client *client) return ret; } + ret = ov9282_configure_regulators(ov9282); + if (ret) { + dev_err(&client->dev, "Failed to get power regulators\n"); + return ret; + } + mutex_init(&ov9282->mutex); ret = ov9282_power_on(ov9282->dev); From patchwork Mon Jul 11 08:16:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 590703 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E37FCC43334 for ; Mon, 11 Jul 2022 08:17:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229724AbiGKIRB (ORCPT ); Mon, 11 Jul 2022 04:17:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbiGKIQw (ORCPT ); Mon, 11 Jul 2022 04:16:52 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6134D1E3F6; Mon, 11 Jul 2022 01:16:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1657527411; x=1689063411; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Y1jhfsmxQKVxIp6rBu6QJpOOgTPsqtvWckn4ApHA2QY=; b=gbCnLx6t0BlthS5bNIchaHuWV4nPJJXu+xbpkGmaqJgFhL1xh51X1psc TaMt46vOFpZrC2clcuB2DJSgYRUVcfmO0wS61s/R3J5S1DVcL9DCf+WIB Ji8NEEmQtCtkmIBjRyWwrvNspSRBGmFIUGP0CHjNt+0oRTI2UCdXUT05D yXRpEpJ18htYTvd7Ganqtc8+ZAoJHUi+8utjZr5OjHBTOnpQIWKincZL5 x/P996xGTgRtA4jyTE2j9CwZ/cGIt58AC8RQDtHjDKYV7kQyBfUPqC+ZU l8kqaqAa9sooYFIx619te0MjB6E1OsbmLgkJMA/K2OKgcQsmkmu00kEEx w==; X-IronPort-AV: E=Sophos;i="5.92,262,1650924000"; d="scan'208";a="24967083" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 11 Jul 2022 10:16:43 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Mon, 11 Jul 2022 10:16:43 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Mon, 11 Jul 2022 10:16:43 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1657527403; x=1689063403; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Y1jhfsmxQKVxIp6rBu6QJpOOgTPsqtvWckn4ApHA2QY=; b=TYOqv9h3JjDspPKIFY3t5fMQQjwSV6A25pp9vxhbUmRu7XjW7EdYJCey /c6E9GFmkjDpe2Y3Nq5qJS9yphuRHLU05D1zknMZjrtYP4WN77bgQ8iHs upMWquS49ADKndvPZHno0CRBtzBjfEfnCFmdIo5P70d9ZnOUZR2suNzcS T4308nDypjQZ3K+Yc6ITa57WVm9wwQnW1TF/KCIjDmWV8QJ7PkSMmQxkA LwtBWmTi0yrzKHP2G5AUPR4iP5+lngV1KZzoIvO9m1ueDw+OorKlwH7vf DG40QSECNce8Mbj+E+W/Ji/92iI8w7BkHiqstmTEdxHy7G/+AmIfKKCki g==; X-IronPort-AV: E=Sophos;i="5.92,262,1650924000"; d="scan'208";a="24967081" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 11 Jul 2022 10:16:43 +0200 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 92E5928007C; Mon, 11 Jul 2022 10:16:43 +0200 (CEST) From: Alexander Stein To: "Paul J . Murphy" , Daniele Alessandrelli , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski Cc: Alexander Stein , linux-media@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 6/6] media: i2c: ov9282: Fix device detection Date: Mon, 11 Jul 2022 10:16:39 +0200 Message-Id: <20220711081639.150153-7-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220711081639.150153-1-alexander.stein@ew.tq-group.com> References: <20220711081639.150153-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Apparently the Vision Components model (VC MIPI OV9281) does not support address auto-increment, so probe fails with: ov9282 2-0060: chip id mismatch: 9281!=92ff Instead two a 1 byte reads to combine the result. Signed-off-by: Alexander Stein --- drivers/media/i2c/ov9282.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c index c3faf11a99b5..c507d9d4531a 100644 --- a/drivers/media/i2c/ov9282.c +++ b/drivers/media/i2c/ov9282.c @@ -761,11 +761,16 @@ static int ov9282_set_stream(struct v4l2_subdev *sd, int enable) static int ov9282_detect(struct ov9282 *ov9282) { int ret; + u32 id[2]; u32 val; - ret = ov9282_read_reg(ov9282, OV9282_REG_ID, 2, &val); - if (ret) - return ret; + ret = ov9282_read_reg(ov9282, OV9282_REG_ID + 1, + 1, &id[1]); + if (!ret) + ret = ov9282_read_reg(ov9282, OV9282_REG_ID, + 1, &id[0]); + val = id[1]; + val |= (id[0] << 8); if (val != OV9282_ID) { dev_err(ov9282->dev, "chip id mismatch: %x!=%x",