From patchwork Thu Nov 24 10:29:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13054801 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 F2DD2C43219 for ; Thu, 24 Nov 2022 10:30:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229865AbiKXKas (ORCPT ); Thu, 24 Nov 2022 05:30:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229792AbiKXKaY (ORCPT ); Thu, 24 Nov 2022 05:30:24 -0500 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 513A2C6611; Thu, 24 Nov 2022 02:30:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1669285815; x=1700821815; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=M/6ilgjP3/m/hMevg24REaxRyOPhlR2Q86fjvdSB8bI=; b=Fb3V+tx3LWlNjxKjHWqf5EvcNxKLlV2qs1H1E/gykUisBmpOh1mzfHjx 2yxvFu1cNk3F1MVQJ3NLr5PkRNKIhnUFoEaPlMwcx3pEPUXQUqbyTnm4I kBdqQ89reRZA08rb2XiFppxnZq6Adn9EJIGwS+cQSLUjBRacwTfPdfAc1 XA4e2roSCKiyt0NQdHW+J3/GUmNJVX19bdhYBr/u6aOmqGuHdn5MXTvRy Udsrm2FO6WK3OKk7W8TzQzMAZXCN4GPNQtY5uCYYGc2+y/HZ42dgHzAwL 9LGh9mmHFXsUr4RlYMt2xr5q43uFuDMrJr8nIcQHcQXl5ypXo5eTZdErn w==; X-IronPort-AV: E=Sophos;i="5.96,190,1665439200"; d="scan'208";a="27558278" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 24 Nov 2022 11:30:04 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 24 Nov 2022 11:30:04 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 24 Nov 2022 11:30:04 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1669285804; x=1700821804; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=M/6ilgjP3/m/hMevg24REaxRyOPhlR2Q86fjvdSB8bI=; b=jYdOBeg6KZa1exiCnJ5vL0cIdekRK236uYc816YG70neo5bCAIR8FKxm pq4yw72UuXtLTg5Js/aPYPaNz1SqTfwNY2v9EFupZfCAdwj6bcUNrvtl9 fOeK0R//vHE9fzz2qvzZN29ujxhtsZWlJbxUADfZRqqrXSfu17B+Ny37i K5A3U8Y3LM1wGqQayahvo9HVOCWLPiTR/ptciBvE/y4HPGRYwmoCx4cvq qK1AzixHDFAftpRSd8GDIX2C0bR7Zs26qhMkBAIFQA+6S5EJWZFbJGMAg QGcSr8f0WPVgh4DYbD2WHjgMM1PckwpkuXwi8ZaxaquVJ++Pf2popgY0w A==; X-IronPort-AV: E=Sophos;i="5.96,190,1665439200"; d="scan'208";a="27558277" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 24 Nov 2022 11:30:04 +0100 Received: from steina-w.tq-net.de (unknown [10.123.53.21]) (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 1C3C8280072; Thu, 24 Nov 2022 11:30:04 +0100 (CET) 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, Sakari Ailus , Krzysztof Kozlowski Subject: [PATCH v5 1/2] media: dt-bindings: media: Add compatible for ov9281 Date: Thu, 24 Nov 2022 11:29:58 +0100 Message-Id: <20221124102959.1605202-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221124102959.1605202-1-alexander.stein@ew.tq-group.com> References: <20221124102959.1605202-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 652b4cfeded7..0c4654e70d46 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 Thu Nov 24 10:29:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13054802 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 B3B67C352A1 for ; Thu, 24 Nov 2022 10:30:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229613AbiKXKau (ORCPT ); Thu, 24 Nov 2022 05:30:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229871AbiKXKaY (ORCPT ); Thu, 24 Nov 2022 05:30:24 -0500 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8957AD0DF2; Thu, 24 Nov 2022 02:30:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1669285816; x=1700821816; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8EzM2+AU1Fro6JRdsVRnMz881rd525NgC/kvBamkYW8=; b=dIOqgMTXbcpX/PHNw6YZCM4O5aer4F+x6MJczEw0FtiOYNcEOmcOeuQ0 cNwYO1IsmCaPNa3PsEPSd0XRYJWH6a58F2SzWRMBm2AL5vFKITEsnFhji bvQBk63PlJKgOYA3Jg0w6FlauFyEuFe8ZVgAMuLEXMTMrMbsWSmp742Ua Gk5rqZMhF6JQ5nA5dw6MaUWZtm1thC2qcoMESWq2YeTp/+oByI0+qSjuK q0zjEFgoNDNx531aaZXwQikQkjOvdgQcMcg4T5ZY/lZPa9wI7UW9vrt9t Yu+X1jsvs1ferI2Q/JU9K7P9C+5xmDuOyjrG/j7pboRpxlN6JJSEn9o11 g==; X-IronPort-AV: E=Sophos;i="5.96,190,1665439200"; d="scan'208";a="27558280" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 24 Nov 2022 11:30:04 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 24 Nov 2022 11:30:04 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 24 Nov 2022 11:30:04 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1669285804; x=1700821804; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8EzM2+AU1Fro6JRdsVRnMz881rd525NgC/kvBamkYW8=; b=Sqk2aDi/tz4wnljZuzRTKGfY/DSd4kQtWtsh/Jmx6VD0+tH4V16SCL/U l6QNM/WjhWrUvgq4Upd6hjCB7zrqK2ft87PMXJOIyzLDJxpthVQaer2s0 3OAVX48JwL5sYg54tgYWcpRLfaOrslboTbL5Sb48QXgE34rL617B2D7c1 77zjlWDcB/f6NB5Cd4rBVnNrx8e5LnKVRrO4KgWuKuSK11SSuLS7OH+BW A3Z4hqfb4+cP+yo830Rp39sRqUjGASxTjrI1GEUXalWS9+JTKPD5a8yt3 fHhLIuwqmU4qvBfEyOXFG+MLyGTeBSgPBP+pVsnWjj39MMeZEMKO0vsC2 g==; X-IronPort-AV: E=Sophos;i="5.96,190,1665439200"; d="scan'208";a="27558279" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 24 Nov 2022 11:30:04 +0100 Received: from steina-w.tq-net.de (unknown [10.123.53.21]) (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 4BBAD280073; Thu, 24 Nov 2022 11:30:04 +0100 (CET) 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, Sakari Ailus , Kieran Bingham Subject: [PATCH v5 2/2] media: i2c: ov9282: Add ov9281 compatible Date: Thu, 24 Nov 2022 11:29:59 +0100 Message-Id: <20221124102959.1605202-3-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221124102959.1605202-1-alexander.stein@ew.tq-group.com> References: <20221124102959.1605202-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. To distinguish ov9281 & ov9282 in userspace the name has to be explicitly set. Provide a fixed string using platform data. Signed-off-by: Alexander Stein Acked-by: Daniele Alessandrelli Reviewed-by: Kieran Bingham --- drivers/media/i2c/ov9282.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c index 072144668892..3d31d6f58dab 100644 --- a/drivers/media/i2c/ov9282.c +++ b/drivers/media/i2c/ov9282.c @@ -1400,6 +1400,8 @@ static int ov9282_probe(struct i2c_client *client) /* Initialize subdev */ v4l2_i2c_subdev_init(&ov9282->sd, client, &ov9282_subdev_ops); + v4l2_i2c_subdev_set_name(&ov9282->sd, client, + device_get_match_data(ov9282->dev), NULL); ret = ov9282_parse_hw_config(ov9282); if (ret) { @@ -1499,7 +1501,8 @@ static const struct dev_pm_ops ov9282_pm_ops = { }; static const struct of_device_id ov9282_of_match[] = { - { .compatible = "ovti,ov9282" }, + { .compatible = "ovti,ov9281", .data = "ov9281" }, + { .compatible = "ovti,ov9282", .data = "ov9282" }, { } };