From d11086cfab48a41ffee94bd01aad98b0c527d09f Mon Sep 17 00:00:00 2001 From: Frank Chen Date: Tue, 2 Aug 2016 15:09:01 -0700 Subject: [PATCH] drivers: camera: Fix power on function calls Since sensor and forcuser has the same V4L2 group id, when device s_power callback is called, the power_on function of sensor and foucser will both be called, even though only one of them needs to be powered on. Switched to subdev s_power call to power on either sensor or focuser, instead of both of them. Bug 1792264 Change-Id: Iacae6ab92ec931cced28073589e82109b037a840 Signed-off-by: Frank Chen Reviewed-on: http://git-master/r/1196342 (cherry picked from commit d67aaad60ae73c78950a403c86851ac7f81aef61) Reviewed-on: http://git-master/r/1197577 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Winnie Hsu Reviewed-by: Ankit Gupta (SW-TEGRA) Tested-by: Ankit Gupta (SW-TEGRA) --- drivers/media/platform/tegra/camera/channel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/platform/tegra/camera/channel.c b/drivers/media/platform/tegra/camera/channel.c index 468b2f2cfca..7e95ac1e62a 100644 --- a/drivers/media/platform/tegra/camera/channel.c +++ b/drivers/media/platform/tegra/camera/channel.c @@ -819,8 +819,7 @@ static int tegra_channel_set_stream(struct tegra_channel *chan, bool on) static int tegra_channel_set_power(struct tegra_channel *chan, bool on) { - return v4l2_device_call_until_err(chan->video.v4l2_dev, - chan->grp_id, core, s_power, on); + return v4l2_subdev_call(chan->subdev_on_csi, core, s_power, on); } static int update_clk(struct tegra_mc_vi *vi) -- 2.39.2