From patchwork Mon Jun 27 15:04:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 585363 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 A9B6AC433EF for ; Mon, 27 Jun 2022 15:05:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237626AbiF0PFG (ORCPT ); Mon, 27 Jun 2022 11:05:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236422AbiF0PFC (ORCPT ); Mon, 27 Jun 2022 11:05:02 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C3E917592 for ; Mon, 27 Jun 2022 08:05:01 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id k22so13489369wrd.6 for ; Mon, 27 Jun 2022 08:05:01 -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=pGYlZSXrL+oaB0Q/zXs3LZ4NFxxmWuNHZP0D34FWGxY=; b=aVcPlY/e/m99y/qGbVvDjDSjv/2ydjwyEBwpEtzTxs+DDF8/2tInE4vWkkQs47wIkw Bp+GvBBrcJx8/tQaaHMaUaJpsQSQHNffH45vGnobt7SlC0tAfLVXCtmEUahLfiSTl91l ZnKd2OMdOSYA0L5ZWwedTNeQvtlZrkxFhz9Xc= 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=pGYlZSXrL+oaB0Q/zXs3LZ4NFxxmWuNHZP0D34FWGxY=; b=RcrCSHpwNBNuCjMXGGymxqhB8+VKbDORONBYdjdoCpwmJlrypqOqO/+WoTHv1b+moz hYRkRyxZwcWAyR7VIPFbfhe4Yv17mbW5dB8Y+gb0eFdOr/A0nK00IQ+092cgcmVPRfGL /N8vIOtlkGBc+ayiAkcXrw2AZgRbkYR3OMhFyemzsynWkE/oSuEdYPBocvJhQb/v9GEd T+jya0HATQG7ydA0R8LoMDr51H/HUQK5uHpkR14chSW2l4KzUdVDvxm0M0WlHNvVRr/j 4EKv5Xy3xPnRL/fAyDgJ2he6EtUNsx7Dx0z4En1fS96+aCeF6sOSXvnQS96Ue1LgBGb8 Wmcg== X-Gm-Message-State: AJIora9k07WPceai4Fe24I7hODEfzdj7/6zhIeKP5KBreifZUM5HW7Kb ZX6u9ZZ21XUAV0k6hQLV05fWew== X-Google-Smtp-Source: AGRyM1td5t3N3MSQv0AhcCYUAv+rIMiCvLzazaY2pmGLkqXdPiWEzt+KjuCMWt7OvTaWIsVO1dteLg== X-Received: by 2002:a05:6000:186e:b0:21b:c44a:7ab9 with SMTP id d14-20020a056000186e00b0021bc44a7ab9mr9873638wri.336.1656342299749; Mon, 27 Jun 2022 08:04:59 -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 d18-20020adfe852000000b0021ba3d1f2a0sm10581250wrn.48.2022.06.27.08.04.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 08:04:59 -0700 (PDT) From: Tommaso Merciai Cc: linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, quentin.schulz@theobroma-systems.com, Tommaso Merciai , Daniel Scally , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/7] media: ov5693: add dvdd into ov5693_supply_names array Date: Mon, 27 Jun 2022 17:04:48 +0200 Message-Id: <20220627150453.220292-3-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220627150453.220292-1-tommaso.merciai@amarulasolutions.com> References: <20220627150453.220292-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) 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 --- 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 Mon Jun 27 15:04:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 585362 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 784F9C43334 for ; Mon, 27 Jun 2022 15:05:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237667AbiF0PFL (ORCPT ); Mon, 27 Jun 2022 11:05:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237612AbiF0PFE (ORCPT ); Mon, 27 Jun 2022 11:05:04 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE1C117584 for ; Mon, 27 Jun 2022 08:05:02 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id o19-20020a05600c4fd300b003a0489f414cso2282277wmq.4 for ; Mon, 27 Jun 2022 08:05:02 -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=l2qHBG28ZF/0BqgZtfUZ2wwyoD54f6fad9bi6YF6qP8=; b=KkiLJR+dI/sfPPQ2s1lOQsqvvaQpAmiK08gsGDaD57ph/EMv5+h9GmRBeL8UEl/18+ ou22mjauhcxTNohAl3306Hb6yBAONh50aZiBb1VyWgF89BO6v480wSJUML9ym+h4Q7LC y3wM9rytEgubnTsw8dXfS34e8QVJAGGhoIDBc= 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=l2qHBG28ZF/0BqgZtfUZ2wwyoD54f6fad9bi6YF6qP8=; b=GWrctB9DF52K50K7ZM9q1AHM3BR00M//4M1ixoURMmbxqP8qOcf0+sCXh7kDoc7w/h 8L2H5+/zLjoYGFDsjIMQpsZOlN6C7PvstenBMIa8xbIKPDpbpQ01b+4c7L2JEaOOagp1 izL9wT5HujZe9Qt35p/Aa6Z7eVm4xd5T5PmGeABoxZFqjtdjgCJ0s/BwLFVI/0Ul3vk/ NoVMB7wHUH6Y/e7k9/VCPwTYGqrT3vbARCpzr/KE8+PduHblzC+gpbSLYOwQ/WTkfO77 HsqLxUm155byHNACPWoLhxovLF5XmZ1jy2g/cwkP7VY+BSTnMicPJR6/7mF4kS6kTHCJ mzLA== X-Gm-Message-State: AJIora9MpEzWWt5WpP7ocA+rfL99H0kspad1N47JI8mUclid5hnrOsh+ l92NQoq6H18FQSAfEzz5gOA9fQ== X-Google-Smtp-Source: AGRyM1uwQ/ftXCRReEPvQMOgtnMF2kmKx/Ogtd60o8TWs0K0is1A9sFNDATuAMoABM9niMGGVZZ5/Q== X-Received: by 2002:a05:600c:a03:b0:39e:4f0c:938c with SMTP id z3-20020a05600c0a0300b0039e4f0c938cmr15384218wmp.145.1656342301269; Mon, 27 Jun 2022 08:05:01 -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 d18-20020adfe852000000b0021ba3d1f2a0sm10581250wrn.48.2022.06.27.08.05.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 08:05:00 -0700 (PDT) From: Tommaso Merciai Cc: linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, quentin.schulz@theobroma-systems.com, Tommaso Merciai , Daniel Scally , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/7] media: ov5693: rename clk into xvclk Date: Mon, 27 Jun 2022 17:04:49 +0200 Message-Id: <20220627150453.220292-4-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220627150453.220292-1-tommaso.merciai@amarulasolutions.com> References: <20220627150453.220292-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) 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 --- 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 Mon Jun 27 15:04:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 585361 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 90AB7CCA473 for ; Mon, 27 Jun 2022 15:05:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237563AbiF0PFR (ORCPT ); Mon, 27 Jun 2022 11:05:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237651AbiF0PFJ (ORCPT ); Mon, 27 Jun 2022 11:05:09 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49B6D175A6 for ; Mon, 27 Jun 2022 08:05:07 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id o16-20020a05600c379000b003a02eaea815so5021328wmr.0 for ; Mon, 27 Jun 2022 08:05:07 -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=xYWlc/wQ018OwOnNA+AyeCt3Ba+fxR9sI/D7eVEieKk=; b=oIMyRqLbbNcQeDmGyzit2hoWXaACc6GAE/IMnjYVAbnHJQ6q5o/Gj7o+kOwoAz/Ach dv+JkhuPgsPBPfduG/ElG1gb9r+ZuBWDtWmTXEq86+g722shXGWd9j1CyWKgOKiNALOu JcMrRwJykwsRu9UtQGriXChqD34mkNQtWZ8Gk= 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=xYWlc/wQ018OwOnNA+AyeCt3Ba+fxR9sI/D7eVEieKk=; b=0o8Ucwe+wTqmWeMN1/QZLdju3TP69TzzHdJABVMD2Jx3TjP8Eoydw+k1r58q7ZjRpT yMxvFkrBPS0GZQBkdYzvpVXVJsIe/zl0z7e2nDaq8EZoNibShXPM5u1qLcIGv7/Yy2Wd U5F47fU17kPlsPeM1yIJFqnNedcgZo1qK+mJ0ud88Fj3ymGqlNY2+JUmQ9W/EsPjsuOr gNABNQcqvigoeUYkaa/8u3yvcePbJxt2QkmYWk3btByIHfMcpUntWsCy4Ldt6mVFtl97 TeyhdbXYBwDaGmK1HLfKawBbLzC0kL9LBW7gW7x1wnOA29W7eEwi1WZj8fFKqC1Jak8N p/tw== X-Gm-Message-State: AJIora9gjRX1Z0ltf62VvxRrgOi+bFvdyRab6IEq7+26xBLPM9kK8GHO LxLtgsammyEhLWCKe25z3PpFnQ== X-Google-Smtp-Source: AGRyM1uZH3Ii4ouIoGJ/bAPB0LRMvYK4GIAO6xqMH2pvQRoACmD/dsL1R4X08FqzAFFRop6qXGT8kw== X-Received: by 2002:a05:600c:a18a:b0:3a0:2978:30d2 with SMTP id id10-20020a05600ca18a00b003a0297830d2mr15765046wmb.173.1656342305771; Mon, 27 Jun 2022 08:05:05 -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 d18-20020adfe852000000b0021ba3d1f2a0sm10581250wrn.48.2022.06.27.08.05.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 08:05:05 -0700 (PDT) From: Tommaso Merciai Cc: linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, quentin.schulz@theobroma-systems.com, Tommaso Merciai , Dario Binacchi , Daniel Scally , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 6/7] media: ov5693: add ov5693_of_match, dts support Date: Mon, 27 Jun 2022 17:04:52 +0200 Message-Id: <20220627150453.220292-7-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220627150453.220292-1-tommaso.merciai@amarulasolutions.com> References: <20220627150453.220292-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add ov5693_of_match. Device tree support Reviewed-by: Dario Binacchi --- 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 273caef467fe..0854226dc140 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,