cip-dev.lists.cip-project.org archive mirror
 help / color / mirror / Atom feed
From: "Lad Prabhakar" <prabhakar.mahadev-lad.rj@bp.renesas.com>
To: cip-dev@lists.cip-project.org,
	Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>,
	Pavel Machek <pavel@denx.de>
Cc: Biju Das <biju.das.jz@bp.renesas.com>
Subject: [cip-dev] [PATCH 4.19.y-cip 01/40] media: ov5645: Remove unneeded regulator_set_voltage()
Date: Tue,  9 Mar 2021 16:36:17 +0000	[thread overview]
Message-ID: <20210309163656.20944-2-prabhakar.mahadev-lad.rj@bp.renesas.com> (raw)
In-Reply-To: <20210309163656.20944-1-prabhakar.mahadev-lad.rj@bp.renesas.com>

[-- Attachment #1: Type: text/plain, Size: 2525 bytes --]

From: Fabio Estevam <festevam@gmail.com>

commit 45ffbd15ede6add6e4fb150e4bab7a27cfe62552 upstream.

There is no need to call regulator_set_voltage() for each regulator
that powers the camera.

The voltage value for each regulator should be retrieved from the
device tree, so remove the unneeded regulator_set_voltage().

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
 drivers/media/i2c/ov5645.c | 28 ----------------------------
 1 file changed, 28 deletions(-)

diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c
index 34343bc10007..5f3229bc68a5 100644
--- a/drivers/media/i2c/ov5645.c
+++ b/drivers/media/i2c/ov5645.c
@@ -42,10 +42,6 @@
 #include <media/v4l2-fwnode.h>
 #include <media/v4l2-subdev.h>
 
-#define OV5645_VOLTAGE_ANALOG               2800000
-#define OV5645_VOLTAGE_DIGITAL_CORE         1500000
-#define OV5645_VOLTAGE_DIGITAL_IO           1800000
-
 #define OV5645_SYSTEM_CTRL0		0x3008
 #define		OV5645_SYSTEM_CTRL0_START	0x02
 #define		OV5645_SYSTEM_CTRL0_STOP	0x42
@@ -1174,42 +1170,18 @@ static int ov5645_probe(struct i2c_client *client,
 		return PTR_ERR(ov5645->io_regulator);
 	}
 
-	ret = regulator_set_voltage(ov5645->io_regulator,
-				    OV5645_VOLTAGE_DIGITAL_IO,
-				    OV5645_VOLTAGE_DIGITAL_IO);
-	if (ret < 0) {
-		dev_err(dev, "cannot set io voltage\n");
-		return ret;
-	}
-
 	ov5645->core_regulator = devm_regulator_get(dev, "vddd");
 	if (IS_ERR(ov5645->core_regulator)) {
 		dev_err(dev, "cannot get core regulator\n");
 		return PTR_ERR(ov5645->core_regulator);
 	}
 
-	ret = regulator_set_voltage(ov5645->core_regulator,
-				    OV5645_VOLTAGE_DIGITAL_CORE,
-				    OV5645_VOLTAGE_DIGITAL_CORE);
-	if (ret < 0) {
-		dev_err(dev, "cannot set core voltage\n");
-		return ret;
-	}
-
 	ov5645->analog_regulator = devm_regulator_get(dev, "vdda");
 	if (IS_ERR(ov5645->analog_regulator)) {
 		dev_err(dev, "cannot get analog regulator\n");
 		return PTR_ERR(ov5645->analog_regulator);
 	}
 
-	ret = regulator_set_voltage(ov5645->analog_regulator,
-				    OV5645_VOLTAGE_ANALOG,
-				    OV5645_VOLTAGE_ANALOG);
-	if (ret < 0) {
-		dev_err(dev, "cannot set analog voltage\n");
-		return ret;
-	}
-
 	ov5645->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_HIGH);
 	if (IS_ERR(ov5645->enable_gpio)) {
 		dev_err(dev, "cannot get enable gpio\n");
-- 
2.17.1


[-- Attachment #2: Type: text/plain, Size: 428 bytes --]


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6216): https://lists.cip-project.org/g/cip-dev/message/6216
Mute This Topic: https://lists.cip-project.org/mt/81205337/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/4520388/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-


  reply	other threads:[~2021-03-09 16:37 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 16:36 [cip-dev] [PATCH 4.19.y-cip 00/40] Renesas RZ/G2{E,H,M,N} add VIN, CSI2 support Lad Prabhakar
2021-03-09 16:36 ` Lad Prabhakar [this message]
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 02/40] media: device property: Add a function to test is a fwnode is a graph endpoint Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 03/40] media: v4l2-async: Accept endpoints and devices for fwnode matching Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 04/40] media: v4l2-async: Pass notifier pointer to match functions Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 05/40] media: v4l2-async: Log message in case of heterogeneous fwnode match Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 06/40] media: v4l: ctrl: Provide unlocked variant of v4l2_ctrl_grab Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 07/40] media: rcar-vin: fix wrong return value in rvin_set_channel_routing() Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 08/40] media: rcar-csi2: Update V3M and E3 start procedure Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 09/40] media: rcar-vin: Invalidate pipeline if conversion is not possible on input formats Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 10/40] media: rcar-vin: Add support for MEDIA_BUS_FMT_SRGGB8_1X8 format Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 11/40] media: rcar-csi2: " Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 12/40] media: dt-bindings: media: i2c: Add IMX219 CMOS sensor binding Lad Prabhakar
2021-03-09 18:52   ` Pavel Machek
2021-03-10  8:48     ` Lad Prabhakar
2021-03-10  9:38       ` Pavel Machek
2021-03-10 10:24         ` Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 13/40] media: i2c: Add driver for Sony IMX219 sensor Lad Prabhakar
2021-03-09 20:36   ` Pavel Machek
2021-03-10  9:36     ` Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 14/40] media: i2c: imx219: Fix power sequence Lad Prabhakar
2021-03-09 19:42   ` Pavel Machek
2021-03-10  8:49     ` Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 15/40] media: i2c: imx219: Add support for RAW8 bit bayer format Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 16/40] media: i2c: imx219: Add support for cropped 640x480 resolution Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 17/40] media: i2c: imx219: Implement get_selection Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 18/40] media: i2c: imx219: Fix a bug in imx219_enum_frame_size Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 19/40] media: i2c: imx219: Selection compliance fixes Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 20/40] media: i2c: imx219: take lock in imx219_enum_mbus_code/frame_size Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 21/40] arm64: dts: renesas: r8a774c0-cat874: Add support for AISTARVISION MIPI Adapter V2.1 Lad Prabhakar
2021-03-09 20:39   ` Pavel Machek
2021-03-10  9:37     ` Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 22/40] media: dt-bindings: media: rcar_vin: Add r8a774a1 support Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 23/40] media: rcar-vin: Enable support for r8a774a1 Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 24/40] media: dt-bindings: media: rcar-csi2: Add r8a774a1 support Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 25/40] media: rcar-csi2: Enable support for r8a774a1 Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 26/40] arm64: dts: renesas: r8a774a1: Add VIN and CSI-2 nodes Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 27/40] media: dt-bindings: rcar-vin: Add R8A774B1 support Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 28/40] media: rcar-vin: Enable support for R8A774B1 Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 29/40] media: dt-bindings: rcar-csi2: Add R8A774B1 support Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 30/40] media: rcar-csi2: Enable support for R8A774B1 Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 31/40] arm64: dts: renesas: r8a774b1: Add VIN and CSI-2 support Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 32/40] media: dt-bindings: media: renesas,vin: Add R8A774E1 support Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 33/40] media: rcar-vin: Enable support for R8A774E1 Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 34/40] media: dt-bindings: media: renesas,csi2: Add R8A774E1 support Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 35/40] media: rcar-csi2: Enable support for R8A774E1 Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 36/40] arm64: dts: renesas: r8a774e1: Add VIN and CSI-2 nodes Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 37/40] arm64: dts: renesas: aistarvision-mipi-adapter-2.1: Add parent macro for each sensor Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 38/40] arm64: dts: renesas: Add support for MIPI Adapter V2.1 connected to HiHope RZ/G2H Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 39/40] arm64: dts: renesas: Add support for MIPI Adapter V2.1 connected to HiHope RZ/G2M Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 40/40] arm64: dts: renesas: Add support for MIPI Adapter V2.1 connected to HiHope RZ/G2N Lad Prabhakar
2021-03-09 20:48 ` [cip-dev] [PATCH 4.19.y-cip 00/40] Renesas RZ/G2{E,H,M,N} add VIN, CSI2 support Pavel Machek
2021-03-09 23:13 ` Pavel Machek
2021-03-10  8:07 ` Nobuhiro Iwamatsu
2021-03-10  9:41   ` Lad Prabhakar
2021-03-10 10:58   ` Chris Paterson
     [not found]   ` <166AF609ACF1E617.19014@lists.cip-project.org>
2021-03-22 22:11     ` Chris Paterson
2021-03-23  7:31       ` Nobuhiro Iwamatsu
2021-03-23  7:50         ` Chris Paterson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210309163656.20944-2-prabhakar.mahadev-lad.rj@bp.renesas.com \
    --to=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=nobuhiro1.iwamatsu@toshiba.co.jp \
    --cc=pavel@denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).