From patchwork Fri Jul 15 07:48:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 591252 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 3D2AEC433EF for ; Fri, 15 Jul 2022 07:49:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232260AbiGOHtJ (ORCPT ); Fri, 15 Jul 2022 03:49:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232258AbiGOHtI (ORCPT ); Fri, 15 Jul 2022 03:49:08 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD31724BD9; Fri, 15 Jul 2022 00:49:06 -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=1657871347; x=1689407347; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JuBIX9AlsLth2DV5UV2eBx3OUqbtmMFLVWX7jnn/yrY=; b=gSWkQ3FYcvrFmvFcf5TCeFW5DC82/Orvpwt0DVeQo0ZxFS6jQ2s7LNPZ pjQBR2h96z1F4wZ+Djj8nHxt37vYIW2t0/6jwXYLy9DzA7x+J/ORWCMkz iQtl3QybKwhCcBmPGk4/Nk/y+lhJpWW2AxdPu0aZlrPVgtaTr2vowDMDf +7KW8lvulvPNSFuFGSjqKwbZgs623EpU5+NRx3mj7vFbcgNJIKKp8gtne CuwQxWsAhmeNnD0TzriOkj9E34IgU1ocyX6WEY5L2O6VLqeyhjFGNbkRU Ey/fXuBYCyM8ZiqkQeSh8X6e3jTWDF0UFUSRQXTor0t7g6buK/D8vs/MF A==; X-IronPort-AV: E=Sophos;i="5.92,273,1650924000"; d="scan'208";a="25069082" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 15 Jul 2022 09:49:04 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Fri, 15 Jul 2022 09:49:04 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Fri, 15 Jul 2022 09:49:04 +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=1657871344; x=1689407344; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JuBIX9AlsLth2DV5UV2eBx3OUqbtmMFLVWX7jnn/yrY=; b=MHaIila42GWO8qVIYVrD0bSRLwUy5yr8vZaafNWTDyOO0aUFVM16CSzn cD2FUGFjv+4jfbvQ1bjp8skHRiTkTM3yCjshNnQVFNyqvfAq+EIXY6PtH TsR3R6lYLs8AjrH8owwpNdB5vCqQXdABC0Gh2AF4giO7djMME6eeEDUq1 uEDmaqwQFdKLlcLIZdSxcM0THdmN3TiO1DblXVou08Q5K7Tw3uto5OdqD rrsVFFrllTJEAAq3x5NGVx7fAkt7KmwiM4oQbhBE4z1+rgvBW+W2TdxpV 86zLrWTecItc3lUviSPxccmaO7JURRHIMc7+lvgkaox7wlE9ZpgkDs7zR A==; X-IronPort-AV: E=Sophos;i="5.92,273,1650924000"; d="scan'208";a="25069081" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 15 Jul 2022 09:49:04 +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 06E1B280072; Fri, 15 Jul 2022 09:49:04 +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 v2 1/6] media: i2c: ov9282: remove unused and unset i2c_client member Date: Fri, 15 Jul 2022 09:48:53 +0200 Message-Id: <20220715074858.875808-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220715074858.875808-1-alexander.stein@ew.tq-group.com> References: <20220715074858.875808-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 Fri Jul 15 07:48:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 591088 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 7404DCCA47C for ; Fri, 15 Jul 2022 07:49:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232267AbiGOHtJ (ORCPT ); Fri, 15 Jul 2022 03:49:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229719AbiGOHtI (ORCPT ); Fri, 15 Jul 2022 03:49:08 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 720C4248F1; Fri, 15 Jul 2022 00:49:07 -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=1657871347; x=1689407347; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KaEDJVU3uZqRPoVDhl+O6jtIVNEtEGZ+mLxj2kIA+XQ=; b=ZtOcCrX7VqgClptEcrxh1px1NNJpttA+DBvLJsPuE8d/fIZtxbcRiqgJ DruRwF+W6QfBHeoOrL+uwjc+sHiVfv39ZzhYGCuwTtmzByMfLoLgZKgn6 hnFkqqFnqhVOM2xcx6CMh1+HeH9+9dxS1qedVZcOb6X6m33b3H70WoVjq AVWskCq0WK/xDZOrKYfCx6UZ8+kaXRbN2JtJAkq44f8GLGgTYiCbUs4Qd 8EgEgVb99k5sUNYPmeknxdZBRBROko4St6TsObKpe7oFrtBbTFFxxowsM rwis1noLvCNG8AWWxojcN+kVZtUONJkpoqY99ocEJ7HxqCo5hg6RkTSWB g==; X-IronPort-AV: E=Sophos;i="5.92,273,1650924000"; d="scan'208";a="25069084" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 15 Jul 2022 09:49:04 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Fri, 15 Jul 2022 09:49:04 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Fri, 15 Jul 2022 09:49:04 +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=1657871344; x=1689407344; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KaEDJVU3uZqRPoVDhl+O6jtIVNEtEGZ+mLxj2kIA+XQ=; b=fiO1FdwRtBAzRZSqCAZsncbTKZPD3qFG/YgOMISpOo0VSB0bbQr5XPbG 4p8+lw7K04/A+yODwxo085TA+unKD31L/zra/fkr4R8qKfxD4fyRHF54m CaktlUpX9VhhmSRdrIRpLRrLvO3wO0p7RPw2Dnli/MiuG9Jghw0/tHgFP npWDCMLAielWaUXallP7NN2bpvk354+CGfYdYBX7mn/xZTs6IjdLXUPW8 xo8m9wW/dy/6af05DvubM82mFHOCgva0OBX16Pdhb+h4wVdncPyEumPmw y29g6cs157W+6vyQ3irRR3AAMBm7phmltoVnLRgHVAQrkzC07M3BO6CtG Q==; X-IronPort-AV: E=Sophos;i="5.92,273,1650924000"; d="scan'208";a="25069083" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 15 Jul 2022 09:49:04 +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 3902F280056; Fri, 15 Jul 2022 09:49:04 +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, Krzysztof Kozlowski Subject: [PATCH v2 2/6] media: dt-bindings: media: Add compatible for ov9281 Date: Fri, 15 Jul 2022 09:48:54 +0200 Message-Id: <20220715074858.875808-3-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220715074858.875808-1-alexander.stein@ew.tq-group.com> References: <20220715074858.875808-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 Acked-by: Krzysztof Kozlowski --- 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 Fri Jul 15 07:48:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 591087 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 8FEFFC433EF for ; Fri, 15 Jul 2022 07:49:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232286AbiGOHtR (ORCPT ); Fri, 15 Jul 2022 03:49:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232263AbiGOHtJ (ORCPT ); Fri, 15 Jul 2022 03:49:09 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BDAB24976; Fri, 15 Jul 2022 00:49:08 -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=1657871348; x=1689407348; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wPuNOpFdSsFsXF8Dch070sqETEJwKj+qyzoVF98CDRo=; b=nEDLG17F2pl6U37Bi+YurSwyIz3YMcdUU1T4Bk7fdTFer72EHubKGhq+ yK1HRI5hErpM4daRWWm3mXXnOifMVdOxAUZLY7XOV0AeomWT3+/0H4evm 6o/Qn6TgsKciGspil3R2sG6Dov57mtnijJ8zruG0J8UGTQ+DnUuxemvfJ zEkWB8cpll8yN8fN3qwUGODPXG85jMXjr+mlJcbegPyjBWIIBYe0OXeHP nY3xAQ0Qwt3FT5TpNoi181SozRe94yuvIJGEnMnhxRdKCu0mWcL8fAAtN tA/kqJy0eXiXCSPW3mqGtqpP8Hi4bZI3vBylUQATUBM3n8sfdSll3aLH3 A==; X-IronPort-AV: E=Sophos;i="5.92,273,1650924000"; d="scan'208";a="25069086" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 15 Jul 2022 09:49:04 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Fri, 15 Jul 2022 09:49:04 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Fri, 15 Jul 2022 09:49:04 +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=1657871344; x=1689407344; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wPuNOpFdSsFsXF8Dch070sqETEJwKj+qyzoVF98CDRo=; b=C5+zd1G4e7CE0lqFxibRGMYOeNZtXebQUZBdiEZ5XH+XsiCRqX2A85fl gDqSpmk2D28mke19k6KRnUlS0wrnnA23yk2IpgX4TrVezOQSFYZZ7UJb2 fVv1M4L2AaXsPxFNfOSdEPIbalrvcBj+iEcsvVH2xrdhFUD8qLyMHq2o7 iPnH3jAsQ3/jnmqGf/PMLT4DFEdovQetTISjyXXI/wx56yjmbZux8UfG6 dkODdUSWTVJEvQjswhtxNAA3YEAAJB+jPH5+IQ28shOW/uUBxccQGTv8O qwS5a918kdMJQs0cLOwDJ2T8jyUWzBKjgopXMMmoPi1I4bHVWzronB/hx Q==; X-IronPort-AV: E=Sophos;i="5.92,273,1650924000"; d="scan'208";a="25069085" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 15 Jul 2022 09:49:04 +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 67BCB280072; Fri, 15 Jul 2022 09:49:04 +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 v2 3/6] media: i2c: ov9282: Add ov9281 compatible Date: Fri, 15 Jul 2022 09:48:55 +0200 Message-Id: <20220715074858.875808-4-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220715074858.875808-1-alexander.stein@ew.tq-group.com> References: <20220715074858.875808-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 Acked-by: Daniele Alessandrelli --- 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 Fri Jul 15 07:48:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 591251 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 82956CCA485 for ; Fri, 15 Jul 2022 07:49:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230320AbiGOHtQ (ORCPT ); Fri, 15 Jul 2022 03:49:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232266AbiGOHtJ (ORCPT ); Fri, 15 Jul 2022 03:49:09 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6DD62559B; Fri, 15 Jul 2022 00:49:08 -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=1657871349; x=1689407349; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DZEpBns6FBLrwGth9N0WA8nJfnM4oXu/eo0E3+I9z84=; b=kvL9V2KUGtbgBN+LYP+CxGadQF35I2yBi1lsrBFXiyIhS+6B905h+69k ScdwdzcV6pTSCqGY9Yj6hXZ8jrjo8S7mtquRwGadfZaY/ZlRaUJKH8kvU Q0r3MUp7UdqqKc8qQV4yHT6JfvC+WQttj0oFTTA90IjEXgpxzhhBhECny 7wZKK9JGRGW7cLmpBYVtPJ7BFdni/eV7pK+lrZeieg5nJn4OCCbS4IIap Y1/tEN4PfbZPaUAoqE6Ya5abfHOzFy9bgMMWdTUubZMmMtpbKtZeJ+UP8 7pKsdsmZdjcTFvip50Isgto8rV/SRycj6Crgq0PrvvDkiHlCIJFWh214B g==; X-IronPort-AV: E=Sophos;i="5.92,273,1650924000"; d="scan'208";a="25069088" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 15 Jul 2022 09:49:04 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Fri, 15 Jul 2022 09:49:04 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Fri, 15 Jul 2022 09:49:04 +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=1657871344; x=1689407344; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DZEpBns6FBLrwGth9N0WA8nJfnM4oXu/eo0E3+I9z84=; b=N4+lY7Nawe0joOSFwvNgdtn4aRs2phgLKFamqn0wxWYQsoWghra1Z4Ps YK35Vq+n+uZNyPv46cjmAEtU6SwD8x3b9z8REoxl2kkAFhf07Qr3zMHyK EU14xeLBHB5s7P3l0dlWQCTaBLf3f45qkRdaRw4cW+w/JoDnvJDHDLpgZ AzE9cnYQe9kQtJn7iSTDI0stl+f9agS38KnpbuAfr/4fUMWvm2f9cBhXk gXFLvKHdWn1poUoGtfD09AVpmKqp8N+VProlpSNNUwa6rJP1xVvOn3xgi fma5N7WhW5XZyp8vfiKhYdeqU9yQ4Raarl2Tnju2dSRwRAMRKDNNbctWx g==; X-IronPort-AV: E=Sophos;i="5.92,273,1650924000"; d="scan'208";a="25069087" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 15 Jul 2022 09:49:04 +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 999EE280056; Fri, 15 Jul 2022 09:49:04 +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, Krzysztof Kozlowski Subject: [PATCH v2 4/6] media: dt-bindings: media: ov9282: Add power supply properties Date: Fri, 15 Jul 2022 09:48:56 +0200 Message-Id: <20220715074858.875808-5-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220715074858.875808-1-alexander.stein@ew.tq-group.com> References: <20220715074858.875808-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 Acked-by: Krzysztof Kozlowski --- .../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 Fri Jul 15 07:48:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 591086 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 40209CCA47C for ; Fri, 15 Jul 2022 07:49:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231961AbiGOHtT (ORCPT ); Fri, 15 Jul 2022 03:49:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232280AbiGOHtK (ORCPT ); Fri, 15 Jul 2022 03:49:10 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E87A1248F1; Fri, 15 Jul 2022 00:49:08 -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=1657871349; x=1689407349; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WPEzwNrqt8+h8RK1E0wJLqv7Sc/l+LFqsghA9Y4/7l8=; b=jch64GeXzr++87m1JYj6/UOU2TPS3mxeJM6+k/czhUG31TJPOs5wLF/9 3brpf4Motg9Yf7idO1uP7QFz9KuUn2+1XdZIfz44d+SCYF7aN3vNV1Koh M3zy+PjUp5Mmb9HCwwlHCVowwz0ZxbCL9P+EbWFXzVA1tZ/mPoygZdksr PVy0ZUssbUuFrqGA45y0utqxuisIZa7ebHj/fYuvfe1zXwySGKvR67/Dy lf16PSNh3hHORy+9HZZsH9w92S6muEjGwNpdczvU0XDgXYOIOBffX5UvW JhWEMerIOoxLhkh7LdWCZKMFkNSj2vRQzp61FKf7NZ435HtEccuYSPHts w==; X-IronPort-AV: E=Sophos;i="5.92,273,1650924000"; d="scan'208";a="25069090" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 15 Jul 2022 09:49:05 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Fri, 15 Jul 2022 09:49:05 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Fri, 15 Jul 2022 09:49:05 +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=1657871345; x=1689407345; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WPEzwNrqt8+h8RK1E0wJLqv7Sc/l+LFqsghA9Y4/7l8=; b=OPnCRgrnwCh6Aor5VAeOEH+fBccyiXMRQffdf5l1TqiUx3Chk+q8egQW YnagZdnRdoo1GqGmSE41x+l1mP1LX4nclKbWbLdA15qb+9QFIWSmnprqw B3nJ/tqQJzQYI2Bt5jTuauvr1DnmwuVuTOYpTx4u5WCoFcrkmyfEKFZzM MI3HwONlKymxMEy6FrYjqzCjew1wYA+hSpDmM6QGtE8LkvxnEshO6sOlh JvaK9iliFCIM1ytFO0n3HtHipL4+96jscgqd5LVRw+5Ew4+LcnDv26Vbv c1OM1wyG8o14EMihsB9+4ZB1xcVyTlLO5kY5PEw5Q6nXY7Ii1zYT2e3vI Q==; X-IronPort-AV: E=Sophos;i="5.92,273,1650924000"; d="scan'208";a="25069089" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 15 Jul 2022 09:49:04 +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 C67D6280072; Fri, 15 Jul 2022 09:49:04 +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 v2 5/6] media: i2c: ov9282: Add regulator support Date: Fri, 15 Jul 2022 09:48:57 +0200 Message-Id: <20220715074858.875808-6-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220715074858.875808-1-alexander.stein@ew.tq-group.com> References: <20220715074858.875808-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 --- Changes in v2: * Remove error message for failed regulator_bulk_disable() * Rename ov9282_configure_regulators to ov9282_get_regulators drivers/media/i2c/ov9282.c | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c index 04fda8222e07..263cdffc558f 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,9 @@ static int ov9282_power_off(struct device *dev) { struct v4l2_subdev *sd = dev_get_drvdata(dev); struct ov9282 *ov9282 = to_ov9282(sd); + int ret; + + regulator_bulk_disable(ARRAY_SIZE(ov9282->supplies), ov9282->supplies); gpiod_set_value_cansleep(ov9282->reset_gpio, 0); @@ -996,6 +1017,18 @@ static int ov9282_init_controls(struct ov9282 *ov9282) return 0; } +static int ov9282_get_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 +1055,12 @@ static int ov9282_probe(struct i2c_client *client) return ret; } + ret = ov9282_get_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 Fri Jul 15 07:48:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 591250 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 6834ECCA488 for ; Fri, 15 Jul 2022 07:49:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232336AbiGOHtS (ORCPT ); Fri, 15 Jul 2022 03:49:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232292AbiGOHtL (ORCPT ); Fri, 15 Jul 2022 03:49:11 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB7DB26109; Fri, 15 Jul 2022 00:49:09 -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=1657871350; x=1689407350; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7/YwaUnYvtErt4hvGUG8S2dvqzopMiwsOQ51LI01u30=; b=EQmBjnCwodid8pP04xL4WupZN/pe8DI3/sOGoJX1x6O2UxfIKfM9zvHP E0xOPzkb0aWR5XQUxEVtc7yzUUP05ZQ8+tAErvGKuLqPzYdnH0AN1HPch E0/rx5spWomCITmGwAo/PjHsd5ZxU+HXSY91coVzX5w4W0/9CUJd/HgAt PZvJEXRL1pe+H43MFLPZBKdpNtaPb0YazG/7AgBSZWrg6sLwBrGBvqDEF TM7wdSjh1ysIxt+gmIp7p26gQvSA0IZPsfnN3YOeRX5Xm74bIagO85sps 810J4ziohV4w2p5kPlM2ddyEUf6Hfsg+k9XiQkDpCMjF+lriHEnhGSt/2 Q==; X-IronPort-AV: E=Sophos;i="5.92,273,1650924000"; d="scan'208";a="25069093" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 15 Jul 2022 09:49:05 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Fri, 15 Jul 2022 09:49:05 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Fri, 15 Jul 2022 09:49:05 +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=1657871345; x=1689407345; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7/YwaUnYvtErt4hvGUG8S2dvqzopMiwsOQ51LI01u30=; b=DhkAnUjmOOjcepAeVCGiV2H8oEMemHVpWqpFCr6i9B38l76zLLCVNtht OS/wVLIw9fDcAxbWk5g5eqZ00eb3faWV2n/qoyAyRSCuM3CgPQysPjmlH aOuWWRekMYCT1bf/gcNrhCv0IiBGPlZbLDII0Jvuo/rUp7h5XE8NlGsTL UaqW69pwiVFSeMeqJxHIhPnAZbE64RHVwYWO+/VD/x6PsKymKfkrYGYfy kDU+Wgy64awQq7P84aTcf/AG06dPnM8d1EdbTvIKc1sJ9Y3ihJCzZyex4 D127Jxfg0Pmhnau+wrDaZyfmPl5FXzmneIOGRtUt69flWklz9QBBRv9E6 Q==; X-IronPort-AV: E=Sophos;i="5.92,273,1650924000"; d="scan'208";a="25069092" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 15 Jul 2022 09:49:05 +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 F247A280056; Fri, 15 Jul 2022 09:49:04 +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 v2 6/6] media: i2c: ov9282: Fix device detection Date: Fri, 15 Jul 2022 09:48:58 +0200 Message-Id: <20220715074858.875808-7-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220715074858.875808-1-alexander.stein@ew.tq-group.com> References: <20220715074858.875808-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 do two 1 byte reads and combine the result. Signed-off-by: Alexander Stein --- Changes in v2: * Fix commit message * Add comment about prevented auto-increment * Return early if reading ID register failed * Reorder ID registers, smaller register number first drivers/media/i2c/ov9282.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c index 263cdffc558f..532791304c3d 100644 --- a/drivers/media/i2c/ov9282.c +++ b/drivers/media/i2c/ov9282.c @@ -761,11 +761,24 @@ 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); + /* + * Some vendors prevent auto-increment, so each register has to + * be read separately + */ + ret = ov9282_read_reg(ov9282, OV9282_REG_ID, + 1, &id[0]); if (ret) return ret; + ret = ov9282_read_reg(ov9282, OV9282_REG_ID + 1, + 1, &id[1]); + if (ret) + return ret; + + val = id[1]; + val |= (id[0] << 8); if (val != OV9282_ID) { dev_err(ov9282->dev, "chip id mismatch: %x!=%x",