From patchwork Thu Jun 16 19:35:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2092 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 58A603F0B6 for ; Thu, 16 Jun 2022 21:36:08 +0200 (CEST) Received: by mail-ed1-f72.google.com with SMTP id h17-20020a056402281100b0043555086cdcsf1325460ede.15 for ; Thu, 16 Jun 2022 12:36:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655408168; cv=pass; d=google.com; s=arc-20160816; b=klR/wQP0W89v14JDfN0qEwnmHwzN4Eo0W53KMUX+0yEmz+D1jvWXBXrOQZ4xWtmIC4 NkCa81J8rK5hqd4B9ptfYPP4o8sn3qbcpZ8oc8aGfjQvdAnvcQWETXliSixASHJniNir eML9la787FQNPPyfQKuB/ef1NCoTYmgHROFiCOBy1nGeBRoGBnCXDyInaoBHKFVhItf8 52nZ6pzIgqv4i5HVshq4idDsUMvz3w7ROuVn0aZtM3TmWP3d7G5EZvELs5QT0UiMKzA3 VIFQv6i+zFajmBONXwdKOtvyzIzgMWxo37eMVYGdaqeXQToNC+riZOZm7OAMteC7Ra5j l2jA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=QP0BuH3nLh9zk0mKfB7QMQu6SILSMg3dCBY7yPQEeI4=; b=LzwBB67G8DV28GH0Drg1Yv7Wsm9U5FXFY6ZAia8h6x23iF7mF+tRCkb3FbdfMlsLeV ND1s3m1cB7KTgq6uL6pKot9QWUKsJVNPsrBA3DAIbVXmePdZEzM0Y0deo2SnC17E3YS1 VldrXBSrNVE69237kRGepe6Kd3fNVU91W9+21INYE0ufkw4yt5XqAK97UqnYxnQLzMg5 KnwmLgLFi/mj1hBLRrHdM6ViE9s8gg+0Xz28BoC8kcnKe7ZEFQMn6wgdBW405PfgEr+V Vr6c4rTIZCi0c5Cv3GAfaY4wrWgmFNHKCU0BwNXLjUlI2Yv6nSZL3+44+FNZSsWX0vDG srPw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DO9+vEKH; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=QP0BuH3nLh9zk0mKfB7QMQu6SILSMg3dCBY7yPQEeI4=; b=emQlCJo+TIGJu1wBi9x62/hxnUIHPCWjG4KxSlnu0D98fjm5zGdksp28GdvEAJgU3N Dt7B6OrIf3qxhYrKpS3DkAzmQx/NZR6yD3YL1MU+W+Xne/Kl+9+/3+HlWjc0Y7PKDOfd KB5K7OCY2u/+ga22tJPPCNNN4HHKWveM3DYhk= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=QP0BuH3nLh9zk0mKfB7QMQu6SILSMg3dCBY7yPQEeI4=; b=LxU8ib27LlaAHBCp/kA2nqxRd/5iCv4Fcvc8Cw5PSY/Jc3AvbKvy7tT3dRX5mSikov IUbAJm32dRgvDubBpK/kGml9pVH+dAJuLNxztHqY+vgkfHtJiSv+U4F1o7jxudf5QBXN Am+2S+UuQik/9j8gSG39pnRF/B6Sa1KELY/iYW4sJsDhQKHpDDuoPF0amKUJRCviXzju tYn/xV3kmgrXIxx1QAO2TSZpp9QeuTGuak2Lvi4clL1QuA+FQqk0hB8i0D5iA2t4Yntl 9npr+96w3PSv0ybv61HTdAqbX5hEnQqxPRPzQIiHa1MVJ5VZt/Uk1N8UFfwm38dDTHic sWdA== X-Gm-Message-State: AJIora9kzRQ3Q8hXdRfAfl2hRwUktTaQKQo4hmg3S1hT7hDlDqggWkTE YbAA90+cd1BZhmAmp8sj+LEE7CeJ X-Google-Smtp-Source: AGRyM1vfcHClp05UH1TRxs7/va02roSn9Fi1xHVUceLJMu+8fLL8hAe2wP4Sm9GIV8YrJUuxSkI8Fw== X-Received: by 2002:a05:6402:2741:b0:434:fe8a:1f96 with SMTP id z1-20020a056402274100b00434fe8a1f96mr8359080edd.331.1655408168189; Thu, 16 Jun 2022 12:36:08 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:709:b0:431:3a5e:75b3 with SMTP id w9-20020a056402070900b004313a5e75b3ls201699edx.1.gmail; Thu, 16 Jun 2022 12:36:07 -0700 (PDT) X-Received: by 2002:a05:6402:35ce:b0:430:cbae:d8d with SMTP id z14-20020a05640235ce00b00430cbae0d8dmr8482542edc.369.1655408167093; Thu, 16 Jun 2022 12:36:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655408167; cv=none; d=google.com; s=arc-20160816; b=LWRETJiMu82doU7a1Rpot1mzXSVsCHmGJlffiHCDcNQUtucpIV/F6LtBheOZgXwxcW qUqdfHOS63o760vIzaQkjyI+vxTA7srmnhoALcicnlwrxYNLkGlZqjNbBSmiWi9R9t8m cw+9kgkEqj04sPHB6xbnQBYrcVRd3HXZ9WD6IrdYPH7R7eVjhW9Xof7wJ702MI+39pMT mqITsHspaRatiaO0QDJM8jd9KHzd1Y1O/rS9rbcHoGHTQkYEMgp0lG/72kOuX4pfKPFn sZ7+EOj2M77PuNEL2wXN/nJnFZ9UUgLEAojHo9sdhW08t4AY5NAQqvW0brtS0cJcoZIN u+MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=G4OEOXi0phbd1Q1xDXnKIdPad9oihs5sqbpj/6rQA1c=; b=hiZ54tgCLNP6f+1WWcIljjutm0nKk5uifBFTIrqgyM6UYKHN/MNyTCM3KImuSCD5zy jjXMUgoV0hd+go52twIp17fSY6QkJv1IDm5jkXF6RmvfkF6mDXbIxomx4oxJsX4uKJYX iVmUJ5UiE74c6dEojxYD1Lcn+s40Rn5PJZK3xr2q+bX0VgJsmi5rfLOPqQ44RsrFUOLA B0IY6iMqrkjAydDas7robA6YWlhJm7d/xw3f9EhvAWTSunp28ipIhO+AGEbL9Rc6Dw74 PBo/D1PlyHvTghTdnm9Jc8PmTBzaftBKcVzKfWWXUUmoQExLoc3k/4+i1uSxjM3exrWS UNzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DO9+vEKH; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id u26-20020aa7db9a000000b0042aa8e4cadfsor1867376edt.70.2022.06.16.12.36.07 for (Google Transport Security); Thu, 16 Jun 2022 12:36:07 -0700 (PDT) Received-SPF: pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:aa7:dbd7:0:b0:433:55a6:e3c4 with SMTP id v23-20020aa7dbd7000000b0043355a6e3c4mr8677193edt.74.1655408166689; Thu, 16 Jun 2022 12:36:06 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-51-34.cust.vodafonedsl.it. [188.217.51.34]) by smtp.gmail.com with ESMTPSA id x24-20020a170906711800b006fec2097d53sm1130255ejj.118.2022.06.16.12.36.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 12:36:06 -0700 (PDT) From: Tommaso Merciai To: Cc: linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, dario.binacchi@amarulasolutions.com, angelo@amarulasolutions.com, Tommaso Merciai Subject: [PATCH v2 3/6] media: ov5693: rename clk into xvclk Date: Thu, 16 Jun 2022 21:35:57 +0200 Message-Id: <20220616193600.1835-4-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616193600.1835-1-tommaso.merciai@amarulasolutions.com> References: <20220616193600.1835-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: tommaso.merciai@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DO9+vEKH; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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: Dario Binacchi --- Changes since v1: - Add reviewed by tag - Squash 0003 and 0004 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)