From patchwork Thu Jun 30 07:45:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 12901306 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 C593EC43334 for ; Thu, 30 Jun 2022 07:45:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233141AbiF3Hpd (ORCPT ); Thu, 30 Jun 2022 03:45:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233131AbiF3Hpc (ORCPT ); Thu, 30 Jun 2022 03:45:32 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 821203A70A for ; Thu, 30 Jun 2022 00:45:31 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id h23so37227774ejj.12 for ; Thu, 30 Jun 2022 00:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XZOi0La7XXKtkYx/fp0c768hVBWWCXiluyMMk6qKUzU=; b=MOT4Ask04bvtjdcHefCiKgo0uVx8FBvfb4js6ZVh70fYN+94Z+RF5YJakY/9i2yCBM 8wnt/IcUkrMBUbsEHWYnhaKERUTOtZjDlzGbgPQ8a2LrKyuK+cG+3HJt7g0zNKNsE3m8 njN62LsIS8zqzUfqokqe15f5n7cKWndXbMiPM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XZOi0La7XXKtkYx/fp0c768hVBWWCXiluyMMk6qKUzU=; b=4Bs4bItwXsQ6MTbLeAKQYvFSDKDBX1sMYxrZ4k7zweFJSOcRyT2Dr1DN71hKLLKS9L /MFnrJGzPR8+81ff5y4jB7qzeVnQXtp1SM8Hpp9OwvpwOjL1lY7cMzu37UuqeJFuiRha rZggV1ezodAmnTB7Fs+ZvymiLDo+Rnh3jhonLpRrtIL/EwbXTzE3m0LYfSVpMrknlR8J aBy95TfeOLmzr9pPl3mUPBk2729uM7HRBBXYe3fF/dE1hPwHgaHiji8dT3vFp7D7ZAkT P7GoF/SS4vw0APdjpRUEE2juXzBZ9EXlOuNxbDUYZjDwIUHLVy6235OPio4S38IVqlf4 rrSA== X-Gm-Message-State: AJIora+EKtoiquY+tVkddeJ+KQzMugRLVe9fvttkkVGs33uLTttXx2pg aIFZ9AcX+gcj33Cmi3Rm5PPd0g== X-Google-Smtp-Source: AGRyM1vffMug1IlnVp5LGuJQrv0D0KZZCOijptBd51rIvW5fVLabUJ71Ie0xhbQzlqaDGjloLym3ug== X-Received: by 2002:a17:907:7f1a:b0:726:2b37:7b82 with SMTP id qf26-20020a1709077f1a00b007262b377b82mr7314412ejc.366.1656575130059; Thu, 30 Jun 2022 00:45:30 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-58-216.cust.vodafonedsl.it. [188.217.58.216]) by smtp.gmail.com with ESMTPSA id b13-20020aa7c90d000000b0043564320274sm12594731edt.19.2022.06.30.00.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jun 2022 00:45:29 -0700 (PDT) From: Tommaso Merciai To: tommaso.merciai@amarulasolutions.com Cc: linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, quentin.schulz@theobroma-systems.com, Jacopo Mondi , Daniel Scally , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 1/6] media: ov5693: count num_supplies using array_size Date: Thu, 30 Jun 2022 09:45:20 +0200 Message-Id: <20220630074525.481790-2-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220630074525.481790-1-tommaso.merciai@amarulasolutions.com> References: <20220630074525.481790-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Instead of hardcode OV5693_NUM_SUPPLIES in a define is better use ARRAY_SIZE function to count the number of supplies from ov5693_supply_names array Signed-off-by: Tommaso Merciai Reviewed-by: Jacopo Mondi Reviewed-by: Daniel Scally --- Changes since v3: - Add reviewed-by tag, suggested by Jacopo, Krzysztof drivers/media/i2c/ov5693.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index 117ff5403312..f410333c4c67 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -127,11 +127,15 @@ #define OV5693_LINK_FREQ_419_2MHZ 419200000 #define OV5693_PIXEL_RATE 167680000 -/* Miscellaneous */ -#define OV5693_NUM_SUPPLIES 2 - #define to_ov5693_sensor(x) container_of(x, struct ov5693_device, sd) +static const char * const ov5693_supply_names[] = { + "avdd", /* Analog power */ + "dovdd", /* Digital I/O power */ +}; + +#define OV5693_NUM_SUPPLIES ARRAY_SIZE(ov5693_supply_names) + struct ov5693_reg { u32 reg; u8 val; @@ -352,11 +356,6 @@ static const s64 link_freq_menu_items[] = { OV5693_LINK_FREQ_419_2MHZ }; -static const char * const ov5693_supply_names[] = { - "avdd", - "dovdd", -}; - static const char * const ov5693_test_pattern_menu[] = { "Disabled", "Random Data", From patchwork Thu Jun 30 07:45:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 12901307 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 990A8C433EF for ; Thu, 30 Jun 2022 07:45:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233166AbiF3Hpg (ORCPT ); Thu, 30 Jun 2022 03:45:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233146AbiF3Hpe (ORCPT ); Thu, 30 Jun 2022 03:45:34 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11A773A70A for ; Thu, 30 Jun 2022 00:45:33 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id cf14so25384944edb.8 for ; Thu, 30 Jun 2022 00:45:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VNYYioEE6eRAWTo799NfZ03VtyHU0+m847tUVl43Yck=; b=YLjiXgvt9WepSmT9ZWnR5NUIPpyCbwSk9tCnGGCA2MfRQJ/JQiQv3MrwkZKcd/ANyt 95Z1mmWkFJRAhnXMGxLr6usLtWiqEogLMVG0Gh96jm1DsCvDisP9v1JOYJGkUo0qCeW6 skVfivMIR2LzuOFje+9s9oRNrsyjTks2W1Guo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VNYYioEE6eRAWTo799NfZ03VtyHU0+m847tUVl43Yck=; b=sz8gVe1JY4tqUciQcpgwxo6pqiNl/cq/XwfKXwJJlyzAMMYGWavsS7ttglI/E7oVSm qilaEoz+OhXCMbhbYWBS2o/D3xLJ3WzRtabL9z90HTKfs9YdfX/VyWEiQXy00OiLeZT7 U38w6tSkf/Nta6IYg7W7+TgiMSC9hfrx/FbuFQcpgzyEx8bmundYlkDwMJMttWq2OamX V28poQgaeqaleakPBz3SKpCzxDPXdIi+QfF28IgF0yD7GBDl6VdCIePj86HpWLGtffOL 8mxcz/1NcMjRHh5TZyzZQIOC7fg036Kp3q2AFNortbENEkvv9O5ncDdzIfw4GLsA5iVD lznA== X-Gm-Message-State: AJIora/aT4NgZGMFaUH1kXsfaEPlEUoLN99F9s5vNZ0735AAj2esQNZE FKqoeb4Mr//qiut4uW4G7ZUmLQ== X-Google-Smtp-Source: AGRyM1sFj8MoQk6ICrYzIG/7k4fYwLARHuMRDZqT7YjTSOwCdeamIUesx/jFGg0+IMSxYVgWyznfWg== X-Received: by 2002:a05:6402:4408:b0:435:9ed2:9be with SMTP id y8-20020a056402440800b004359ed209bemr9590051eda.81.1656575131548; Thu, 30 Jun 2022 00:45:31 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-58-216.cust.vodafonedsl.it. [188.217.58.216]) by smtp.gmail.com with ESMTPSA id b13-20020aa7c90d000000b0043564320274sm12594731edt.19.2022.06.30.00.45.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jun 2022 00:45:31 -0700 (PDT) From: Tommaso Merciai To: tommaso.merciai@amarulasolutions.com Cc: linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, quentin.schulz@theobroma-systems.com, Jacopo Mondi , Daniel Scally , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 2/6] media: ov5693: add dvdd into ov5693_supply_names array Date: Thu, 30 Jun 2022 09:45:21 +0200 Message-Id: <20220630074525.481790-3-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220630074525.481790-1-tommaso.merciai@amarulasolutions.com> References: <20220630074525.481790-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add missing "dvdd" (Digital circuit power) entry into ov5693_supply_names array Signed-off-by: Tommaso Merciai Reviewed-by: Jacopo Mondi Reviewed-by: Daniel Scally --- Changes since v3: - Add reviewed-by tag, suggested by Jacopo, Krzysztof drivers/media/i2c/ov5693.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index f410333c4c67..9e84468d920e 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -132,6 +132,7 @@ static const char * const ov5693_supply_names[] = { "avdd", /* Analog power */ "dovdd", /* Digital I/O power */ + "dvdd", /* Digital circuit power */ }; #define OV5693_NUM_SUPPLIES ARRAY_SIZE(ov5693_supply_names) From patchwork Thu Jun 30 07:45:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 12901308 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 371FAC433EF for ; Thu, 30 Jun 2022 07:45:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233171AbiF3Hpi (ORCPT ); Thu, 30 Jun 2022 03:45:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233160AbiF3Hpf (ORCPT ); Thu, 30 Jun 2022 03:45:35 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8418C36B54 for ; Thu, 30 Jun 2022 00:45:34 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id cf14so25385040edb.8 for ; Thu, 30 Jun 2022 00:45:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ctpa/T2vVk1WErHGmcuqVVZ1P5/ZM5PQkEWqW8vXr7A=; b=lRMEg3/FRguw5FwS8pKZMz//6FUb1bmUu/durvcaUXE93Uz6C54xek86KnAfW5U1ca ntiBw22+0Z9UspHk18n14P34zxpuhqERuCCMNUPyduCT9sOFyyb5SZGWpgBUMdk6gN5G V92UCxsO3NxQGZGqLelxE9MLKBOblUkvc5F3s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ctpa/T2vVk1WErHGmcuqVVZ1P5/ZM5PQkEWqW8vXr7A=; b=AKtwLNrZr/HOj6OkZEbxYZpAzgWqAhlfLIakZM3Ot1UVMVt3h8bPncZwU8YE8/7abR 8uXe5ZdUi5brpSC2ydSkole6qkWOiZ2/K9zH+3dZURS1ctQRxyFmIeVtAlbnUV1GbRat dwU0x96L5z6Gmg8eA47mrFnI5L8iy5+XhmgbAnu/zDcyvybkkh0Zwehxg/Er5sKUuwYR lqoDrJ6JZU7+/UDANTMjkF8HVodLCQctHU0UH5YULqUDZinlakEc3g55OLAeDof9rOdM lHIWcqSiSivbxhZkLKRF35pB8DF0tTRlkulh5g8QocYU6Xa+EaTLSdzdKa9ioSqlglvD wyeA== X-Gm-Message-State: AJIora/+D7dyo/+uKF0zsZ2uHX8AeOLu93TgB26zcRAOFmKPqWQup7L0 4tWqaTxy0LPpBiQWYi1wkp8l7g== X-Google-Smtp-Source: AGRyM1uuAMkrYZQ8JChtMp+7GI/hYI16/CjCaUjNyphloY7yDvh7i21GX7ol110y4S0BSN6t6q1vHw== X-Received: by 2002:a05:6402:2786:b0:435:da07:14cb with SMTP id b6-20020a056402278600b00435da0714cbmr9744966ede.408.1656575133094; Thu, 30 Jun 2022 00:45:33 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-58-216.cust.vodafonedsl.it. [188.217.58.216]) by smtp.gmail.com with ESMTPSA id b13-20020aa7c90d000000b0043564320274sm12594731edt.19.2022.06.30.00.45.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jun 2022 00:45:32 -0700 (PDT) From: Tommaso Merciai To: tommaso.merciai@amarulasolutions.com Cc: linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, quentin.schulz@theobroma-systems.com, Jacopo Mondi , Daniel Scally , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 3/6] media: ov5693: rename clk into xvclk Date: Thu, 30 Jun 2022 09:45:22 +0200 Message-Id: <20220630074525.481790-4-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220630074525.481790-1-tommaso.merciai@amarulasolutions.com> References: <20220630074525.481790-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Rename clk pdata pointer into xvclk (system clock input). Same for clk_rate into xvclk_rate. This is more explicit Signed-off-by: Tommaso Merciai Reviewed-by: Jacopo Mondi --- Changes since v3: - Add reviewed-by tag, suggested by Jacopo, Krzysztof drivers/media/i2c/ov5693.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index 9e84468d920e..d2adc5513a21 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -157,7 +157,7 @@ struct ov5693_device { struct gpio_desc *reset; struct gpio_desc *powerdown; struct regulator_bulk_data supplies[OV5693_NUM_SUPPLIES]; - struct clk *clk; + struct clk *xvclk; struct ov5693_mode { struct v4l2_rect crop; @@ -794,7 +794,7 @@ static void ov5693_sensor_powerdown(struct ov5693_device *ov5693) regulator_bulk_disable(OV5693_NUM_SUPPLIES, ov5693->supplies); - clk_disable_unprepare(ov5693->clk); + clk_disable_unprepare(ov5693->xvclk); } static int ov5693_sensor_powerup(struct ov5693_device *ov5693) @@ -804,7 +804,7 @@ static int ov5693_sensor_powerup(struct ov5693_device *ov5693) gpiod_set_value_cansleep(ov5693->reset, 1); gpiod_set_value_cansleep(ov5693->powerdown, 1); - ret = clk_prepare_enable(ov5693->clk); + ret = clk_prepare_enable(ov5693->xvclk); if (ret) { dev_err(ov5693->dev, "Failed to enable clk\n"); goto fail_power; @@ -1390,7 +1390,7 @@ static int ov5693_check_hwcfg(struct ov5693_device *ov5693) static int ov5693_probe(struct i2c_client *client) { struct ov5693_device *ov5693; - u32 clk_rate; + u32 xvclk_rate; int ret = 0; ov5693 = devm_kzalloc(&client->dev, sizeof(*ov5693), GFP_KERNEL); @@ -1408,16 +1408,16 @@ static int ov5693_probe(struct i2c_client *client) v4l2_i2c_subdev_init(&ov5693->sd, client, &ov5693_ops); - ov5693->clk = devm_clk_get(&client->dev, "xvclk"); - if (IS_ERR(ov5693->clk)) { + ov5693->xvclk = devm_clk_get(&client->dev, "xvclk"); + if (IS_ERR(ov5693->xvclk)) { dev_err(&client->dev, "Error getting clock\n"); - return PTR_ERR(ov5693->clk); + return PTR_ERR(ov5693->xvclk); } - clk_rate = clk_get_rate(ov5693->clk); - if (clk_rate != OV5693_XVCLK_FREQ) + xvclk_rate = clk_get_rate(ov5693->xvclk); + if (xvclk_rate != OV5693_XVCLK_FREQ) dev_warn(&client->dev, "Found clk freq %u, expected %u\n", - clk_rate, OV5693_XVCLK_FREQ); + xvclk_rate, OV5693_XVCLK_FREQ); ret = ov5693_configure_gpios(ov5693); if (ret) From patchwork Thu Jun 30 07:45:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 12901309 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 C9A82C43334 for ; Thu, 30 Jun 2022 07:45:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233180AbiF3Hpk (ORCPT ); Thu, 30 Jun 2022 03:45:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233146AbiF3Hph (ORCPT ); Thu, 30 Jun 2022 03:45:37 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E9403B2B8 for ; Thu, 30 Jun 2022 00:45:36 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id ej4so25403590edb.7 for ; Thu, 30 Jun 2022 00:45:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HMgTO+0GXKbF2GDHku+aibaoRp7NUzUN5XoO55rghiY=; b=j4norZtA85g2BOXLRNrwavWs1/mJePBfPBNyDy9UFriTTcOYUrQma2J0aN1MnbBA71 hkEOx/EZ0K0fri78rRfWG70dS5DGbV1Q5fvkdJFTxSI9tXDhndkO+3xuQ6MEGnQoazEy viKZ6bRQboidvZgQrLt/L3ABOOhbY3SdLwgkU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HMgTO+0GXKbF2GDHku+aibaoRp7NUzUN5XoO55rghiY=; b=6twkMH/iugMk5h7Ogsfz+BqZFGvZkZ75uKWgkBYxdnFNKH5YPMl/NN31g6nsZyBU75 0mARqhxUFFWBXH2DTPTMlkzDHaw9pQR75m5JkQX9aD/Ehj3sxiRXqwkYxF3xgkb+x8YD 83YBHHKFJ2WWLUBobB99CvoIRGZwq1WyO9cyrAL0yIow5RLH7EkTaX8j1sS4qascONk+ GhBCwK0gHDKqZFmi3HLgNPjDGadF/fOBTHuoRukBz8dNJtxsvV8svFVJCUAc625qJ96G g3m9lwOK137i8JhUNRX1GEFP42RBHcUCWQN1eqFTo9FnRZbmyO32sFQPzHfZ90eiBGHz 42IA== X-Gm-Message-State: AJIora9pvkarF04tKDh0uUt9++CqeutjdbIWNJ/htoUqg/7uzU+5UsUV k7qb6MaZ6SCq75SA6w7KOPAKJw== X-Google-Smtp-Source: AGRyM1vhhj9Qoso+xYV2Bazg/Et/lwaVLyV/sYrTBQSibERjoPA+gE5dkWLrEYd+RJniTFkWQXuClw== X-Received: by 2002:a05:6402:3490:b0:435:9802:96ac with SMTP id v16-20020a056402349000b00435980296acmr9772735edc.40.1656575134769; Thu, 30 Jun 2022 00:45:34 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-58-216.cust.vodafonedsl.it. [188.217.58.216]) by smtp.gmail.com with ESMTPSA id b13-20020aa7c90d000000b0043564320274sm12594731edt.19.2022.06.30.00.45.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jun 2022 00:45:34 -0700 (PDT) From: Tommaso Merciai To: tommaso.merciai@amarulasolutions.com Cc: linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, quentin.schulz@theobroma-systems.com, Jacopo Mondi , Sakari Ailus , Daniel Scally , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 4/6] media: ov5693: move hw cfg functions into ov5693_hwcfg Date: Thu, 30 Jun 2022 09:45:23 +0200 Message-Id: <20220630074525.481790-5-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220630074525.481790-1-tommaso.merciai@amarulasolutions.com> References: <20220630074525.481790-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Move hw configuration functions into ov5693_hwcfg. This is done to separate the code that handle the hw cfg from probe in a clean way. Add support for ACPI-based platforms that specify the clock frequency by using the "clock-frequency" property instead of specifying a clock provider reference Signed-off-by: Tommaso Merciai Reviewed-by: Jacopo Mondi Reviewed-by: Sakari Ailus --- Changes since v2: - Fix commit body as suggested by Sakari, Jacopo - Add details to commit body as suggested by Jacopo - Move ov5693_check_hwcfg into ov5693_hwcfg - Fix xvclk_rate position as suggested by Jacopo - Use devm_clk_get_optional instead of devm_clk_get as suggested Jacopo Changes since v3: - Fix commit body as suggested by Jacopo - Add reviewed-by tags, suggested by Jacopo, Krzysztof drivers/media/i2c/ov5693.c | 57 +++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index d2adc5513a21..3c805a5a5181 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -1339,16 +1339,48 @@ static int ov5693_get_regulators(struct ov5693_device *ov5693) ov5693->supplies); } -static int ov5693_check_hwcfg(struct ov5693_device *ov5693) +static int ov5693_hwcfg(struct ov5693_device *ov5693) { struct fwnode_handle *fwnode = dev_fwnode(ov5693->dev); struct v4l2_fwnode_endpoint bus_cfg = { .bus_type = V4L2_MBUS_CSI2_DPHY, }; struct fwnode_handle *endpoint; + u32 xvclk_rate; unsigned int i; int ret; + ov5693->xvclk = devm_clk_get_optional(ov5693->dev, "xvclk"); + if (IS_ERR(ov5693->xvclk)) + return dev_err_probe(ov5693->dev, PTR_ERR(ov5693->xvclk), + "failed to get xvclk: %ld\n", + PTR_ERR(ov5693->xvclk)); + + if (ov5693->xvclk) { + xvclk_rate = clk_get_rate(ov5693->xvclk); + } else { + ret = fwnode_property_read_u32(fwnode, "clock-frequency", + &xvclk_rate); + + if (ret) { + dev_err(ov5693->dev, "can't get clock frequency"); + return ret; + } + } + + if (xvclk_rate != OV5693_XVCLK_FREQ) + dev_warn(ov5693->dev, "Found clk freq %u, expected %u\n", + xvclk_rate, OV5693_XVCLK_FREQ); + + ret = ov5693_configure_gpios(ov5693); + if (ret) + return ret; + + ret = ov5693_get_regulators(ov5693); + if (ret) + return dev_err_probe(ov5693->dev, ret, + "Error fetching regulators\n"); + endpoint = fwnode_graph_get_next_endpoint(fwnode, NULL); if (!endpoint) return -EPROBE_DEFER; /* Could be provided by cio2-bridge */ @@ -1390,7 +1422,6 @@ static int ov5693_check_hwcfg(struct ov5693_device *ov5693) static int ov5693_probe(struct i2c_client *client) { struct ov5693_device *ov5693; - u32 xvclk_rate; int ret = 0; ov5693 = devm_kzalloc(&client->dev, sizeof(*ov5693), GFP_KERNEL); @@ -1400,7 +1431,7 @@ static int ov5693_probe(struct i2c_client *client) ov5693->client = client; ov5693->dev = &client->dev; - ret = ov5693_check_hwcfg(ov5693); + ret = ov5693_hwcfg(ov5693); if (ret) return ret; @@ -1408,26 +1439,6 @@ static int ov5693_probe(struct i2c_client *client) v4l2_i2c_subdev_init(&ov5693->sd, client, &ov5693_ops); - ov5693->xvclk = devm_clk_get(&client->dev, "xvclk"); - if (IS_ERR(ov5693->xvclk)) { - dev_err(&client->dev, "Error getting clock\n"); - return PTR_ERR(ov5693->xvclk); - } - - xvclk_rate = clk_get_rate(ov5693->xvclk); - if (xvclk_rate != OV5693_XVCLK_FREQ) - dev_warn(&client->dev, "Found clk freq %u, expected %u\n", - xvclk_rate, OV5693_XVCLK_FREQ); - - ret = ov5693_configure_gpios(ov5693); - if (ret) - return ret; - - ret = ov5693_get_regulators(ov5693); - if (ret) - return dev_err_probe(&client->dev, ret, - "Error fetching regulators\n"); - ov5693->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; ov5693->pad.flags = MEDIA_PAD_FL_SOURCE; ov5693->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; From patchwork Thu Jun 30 07:45:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 12901310 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 6AF6FCCA47E for ; Thu, 30 Jun 2022 07:45:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233205AbiF3Hpm (ORCPT ); Thu, 30 Jun 2022 03:45:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233181AbiF3Hpk (ORCPT ); Thu, 30 Jun 2022 03:45:40 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C575D3B2B8 for ; Thu, 30 Jun 2022 00:45:38 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id n8so11440164eda.0 for ; Thu, 30 Jun 2022 00:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2VoT8i8QeRks6MlNZX2wBTS/uT3kTm3TDTeb8DcOv84=; b=Cg9ldFAaThDM26guf461l+5hmf9AUk2f8wu5v9WUkPIRT1g2qexq3gpJpL+fr9Lyc9 VA0WfJrfo8XlXEvlfJ5kk8uoVJmCBMgGWEzXG+Uuc1SZEOKzsvFQaO8pwnIkQSZhQPYB +QPhGBko/zn+LtGQbPbP5e3dKyuQQ+T0bj1ds= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2VoT8i8QeRks6MlNZX2wBTS/uT3kTm3TDTeb8DcOv84=; b=DL37z2Ckqy9f+hhTjSrRrkJ1qSdrKBRjaQuVpKQjC31c149bMcA/s0vWSiNfNIQiRu odhM59V7e7p2crG1tzQrD4aZuyMvVEUO3cLNx6NHjBeIANQutAZOsf6EJLRIe+hTsDNQ 8V7d3Ud7QKR9uLXIR+PB4syjJEtTk6YG//L6dNzwqhgP5UA9OGD4Z499OoYZS5EJ+8a0 J8nYj6nI5P85j+0gj4y6vo6XldBXDGeNf7jEW4DkC1gHWegWIWKr/YL7aEbvB3l41OlI ES3H4q0MQEePzkM6dK3GS63EjtFHKdlbfDK7NpHytvsLyYNsxG8nk3nTN6V8Y45Fryiw fg0A== X-Gm-Message-State: AJIora9b4DuISYGopO7pkPlN8IQStNrh2JXbdAwWSVWsUdF8AGb3d7sm H3qste0GEWaAdJWUDrWH4jansA== X-Google-Smtp-Source: AGRyM1tzmpExmPgVDkzSX2xg767f6uWXrRkq/o6zPDN/PQYKdNvvBvcAXHnBfwWXSwDagnWlMbeC5Q== X-Received: by 2002:a05:6402:438a:b0:435:bc23:d615 with SMTP id o10-20020a056402438a00b00435bc23d615mr9597360edc.283.1656575137327; Thu, 30 Jun 2022 00:45:37 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-58-216.cust.vodafonedsl.it. [188.217.58.216]) by smtp.gmail.com with ESMTPSA id b13-20020aa7c90d000000b0043564320274sm12594731edt.19.2022.06.30.00.45.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jun 2022 00:45:37 -0700 (PDT) From: Tommaso Merciai To: tommaso.merciai@amarulasolutions.com Cc: linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, quentin.schulz@theobroma-systems.com, Krzysztof Kozlowski , Sakari Ailus , Daniel Scally , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 5/6] media: dt-bindings: ov5693: document YAML binding Date: Thu, 30 Jun 2022 09:45:24 +0200 Message-Id: <20220630074525.481790-6-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220630074525.481790-1-tommaso.merciai@amarulasolutions.com> References: <20220630074525.481790-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add documentation of device tree in YAML schema for the OV5693 CMOS image sensor from Omnivision Signed-off-by: Tommaso Merciai Reviewed-by: Krzysztof Kozlowski Reviewed-by: Sakari Ailus --- Changes since v1: - Fix allOf position as suggested by Krzysztof - Remove port description as suggested by Krzysztof - Fix EOF as suggested by Krzysztof Changes since v2: - Fix commit body as suggested by Krzysztof Changes since v3: - Add reviewed-by tags, ssuggested by Jacopo, Krzysztof .../bindings/media/i2c/ovti,ov5693.yaml | 106 ++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 107 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml new file mode 100644 index 000000000000..b83c9fc04023 --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml @@ -0,0 +1,106 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (c) 2022 Amarulasolutions +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/i2c/ovti,ov5693.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Omnivision OV5693 CMOS Sensor + +maintainers: + - Tommaso Merciai + +description: | + The Omnivision OV5693 is a high performance, 1/4-inch, 5 megapixel, CMOS + image sensor that delivers 2592x1944 at 30fps. It provides full-frame, + sub-sampled, and windowed 10-bit MIPI images in various formats via the + Serial Camera Control Bus (SCCB) interface. + + OV5693 is controlled via I2C and two-wire Serial Camera Control Bus (SCCB). + The sensor output is available via CSI-2 serial data output (up to 2-lane). + +allOf: + - $ref: /schemas/media/video-interface-devices.yaml# + +properties: + compatible: + const: ovti,ov5693 + + reg: + maxItems: 1 + + clocks: + description: + System input clock (aka XVCLK). From 6 to 27 MHz. + maxItems: 1 + + dovdd-supply: + description: + Digital I/O voltage supply, 1.8V. + + avdd-supply: + description: + Analog voltage supply, 2.8V. + + dvdd-supply: + description: + Digital core voltage supply, 1.2V. + + reset-gpios: + description: + The phandle and specifier for the GPIO that controls sensor reset. + This corresponds to the hardware pin XSHUTDN which is physically + active low. + maxItems: 1 + +required: + - compatible + - reg + - clocks + - dovdd-supply + - avdd-supply + - dvdd-supply + - port + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + ov5693: camera@36 { + compatible = "ovti,ov5693"; + reg = <0x36>; + + reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&cif_clkout_m0>; + + clocks = <&cru SCLK_CIF_OUT>; + assigned-clocks = <&cru SCLK_CIF_OUT>; + assigned-clock-rates = <19200000>; + + avdd-supply = <&vcc_1v8>; + dvdd-supply = <&vcc_1v2>; + dovdd-supply = <&vcc_2v8>; + + rotation = <90>; + orientation = <0>; + + port { + ucam_out: endpoint { + remote-endpoint = <&mipi_in_ucam>; + data-lanes = <1 2>; + link-frequencies = /bits/ 64 <450000000>; + }; + }; + }; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index 1fc9ead83d2a..844307cb20c4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14719,6 +14719,7 @@ M: Daniel Scally L: linux-media@vger.kernel.org S: Maintained T: git git://linuxtv.org/media_tree.git +F: Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml F: drivers/media/i2c/ov5693.c OMNIVISION OV5695 SENSOR DRIVER From patchwork Thu Jun 30 07:45:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 12901311 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 8A60BCCA481 for ; Thu, 30 Jun 2022 07:45:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233207AbiF3Hpn (ORCPT ); Thu, 30 Jun 2022 03:45:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233203AbiF3Hpl (ORCPT ); Thu, 30 Jun 2022 03:45:41 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CCD53A71C for ; Thu, 30 Jun 2022 00:45:40 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id mf9so37390644ejb.0 for ; Thu, 30 Jun 2022 00:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VBaQhh8M0SGoulgjZzCVQ2UkjFdtWV7Yt+dzNHvww78=; b=JCcxg9P/Qzd0goJ7WT9kRMcUwBSR0+QniS+dbJ8ePAquHKkURaZCDhsoeXGDw4Th+p pYxS34BY+bL9BH+CUO5St6BRL9iD8ddkcYVr8T1pz1N1stKRy6zMLAScsfLlYZsKL67h dKoJ5XuTadatvpcT2QMB/DCK7BbYwY6G1E3Fc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VBaQhh8M0SGoulgjZzCVQ2UkjFdtWV7Yt+dzNHvww78=; b=7J7+QJoMcF5WkxGXS53/PqDkcls5od822PBO+q1W8I3oVHbQyQXuTz69mLQ4ajoqE4 uK4CRBc9GywDD2PQ01xsUXI24Zp4zIrYYtYqarTUmewCRkhoz2irKZ0PsKH4q58iz8XS f7AxTBVG79El4rV01O7va6CXDHhhMC0ZFP77Tmtd69d8I/Uvum1sdUJ7zY7A3pdPNsvp BtvGCoiAYwPY6ZpRpKPmnYDFoKjgPocjzMqW9o50QCXMa6r+gVznHBYMJ7nBXe3hBZPI w3BowhWUTkGCBOmrcBEGN0sZEWHdWvJWS/XP4qZuVguIgSAtkHvWH0iSFYuGRIDsISUw 5XMg== X-Gm-Message-State: AJIora/ihChD3wsnSdWo2MitIhiQzh+42jsqIASHk++We7JPwfHYcGmQ 2FkfjmxiQLVViqZMt1I0GbZMwA== X-Google-Smtp-Source: AGRyM1sDgEvklapqUFjo5inrAdF/mgAhHliKgdgUttcbfqZDFoCqIsitSjQSSgoZ1BPm6ZU7nGW4gw== X-Received: by 2002:a17:907:7fa9:b0:711:d214:36cd with SMTP id qk41-20020a1709077fa900b00711d21436cdmr7285524ejc.600.1656575138524; Thu, 30 Jun 2022 00:45:38 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-58-216.cust.vodafonedsl.it. [188.217.58.216]) by smtp.gmail.com with ESMTPSA id b13-20020aa7c90d000000b0043564320274sm12594731edt.19.2022.06.30.00.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jun 2022 00:45:38 -0700 (PDT) From: Tommaso Merciai To: tommaso.merciai@amarulasolutions.com Cc: linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, quentin.schulz@theobroma-systems.com, Jacopo Mondi , Sakari Ailus , Daniel Scally , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 6/6] media: ov5693: add ov5693_of_match, dts support Date: Thu, 30 Jun 2022 09:45:25 +0200 Message-Id: <20220630074525.481790-7-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220630074525.481790-1-tommaso.merciai@amarulasolutions.com> References: <20220630074525.481790-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add ov5693_of_match. Device tree support Signed-off-by: Tommaso Merciai Reviewed-by: Jacopo Mondi Reviewed-by: Sakari Ailus Reviewed-by: Daniel Scally --- Changes since v2: - Change patch order 7 -> 6 as suggested by Sakari - Add missing signed-off as suggested by Jacopo Changes since v3: - Add reviewed-by tags, suggested by Jacopo, Krzysztof drivers/media/i2c/ov5693.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index 3c805a5a5181..5930207193c7 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -1532,10 +1532,17 @@ static const struct acpi_device_id ov5693_acpi_match[] = { }; MODULE_DEVICE_TABLE(acpi, ov5693_acpi_match); +static const struct of_device_id ov5693_of_match[] = { + { .compatible = "ovti,ov5693", }, + { /* sentinel */ }, +}; +MODULE_DEVICE_TABLE(of, ov5693_of_match); + static struct i2c_driver ov5693_driver = { .driver = { .name = "ov5693", .acpi_match_table = ov5693_acpi_match, + .of_match_table = ov5693_of_match, .pm = &ov5693_pm_ops, }, .probe_new = ov5693_probe,