Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c14c189c authored by Lokesh Kumar Aakulu's avatar Lokesh Kumar Aakulu
Browse files

msm: camera: Update sensor mount angle & position in media entity flag



Update bitmask entried with sensor mount angle and sensor
position. correct mount angle for rear camera for mtp device.

Change-Id: I09f80c3523f06850ec6117c9fd86a5c07f2f1804
Signed-off-by: default avatarLokesh Kumar Aakulu <lkumar@codeaurora.org>
parent 2a9f3229
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -198,6 +198,7 @@
		reg = <0x0>;
		qcom,csiphy-sd-index = <0>;
		qcom,csid-sd-index = <0>;
		qcom,mount-angle = <270>;
		qcom,actuator-src = <&actuator0>;
		qcom,led-flash-src = <&led_flash0>;
		cam_vdig-supply = <&pm8226_l5>;
@@ -230,6 +231,7 @@
		reg = <0x1>;
		qcom,csiphy-sd-index = <1>;
		qcom,csid-sd-index = <1>;
		qcom,mount-angle = <270>;
		cam_vdig-supply = <&pm8226_l5>;
		cam_vana-supply = <&pm8226_l19>;
		cam_vio-supply = <&pm8226_lvs1>;
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -112,7 +112,7 @@
		reg = <0x0>;
		qcom,csiphy-sd-index = <0>;
		qcom,csid-sd-index = <0>;
		qcom,mount-angle = <0>;
		qcom,mount-angle = <270>;
		qcom,actuator-src = <&actuator0>;
		qcom,led-flash-src = <&led_flash0>;
		cam_vdig-supply = <&pm8226_l5>;
+7 −0
Original line number Diff line number Diff line
@@ -1347,6 +1347,7 @@ int32_t msm_sensor_init_default_params(struct msm_sensor_ctrl_t *s_ctrl)
	int32_t                       rc = -ENOMEM;
	struct msm_camera_cci_client *cci_client = NULL;
	struct msm_cam_clk_info      *clk_info = NULL;
	unsigned long mount_pos = 0;

	/* Validate input parameters */
	if (!s_ctrl) {
@@ -1409,6 +1410,12 @@ int32_t msm_sensor_init_default_params(struct msm_sensor_ctrl_t *s_ctrl)
	s_ctrl->sensordata->power_info.clk_info_size =
		ARRAY_SIZE(cam_8974_clk_info);

	/* Update sensor mount angle and position in media entity flag */
	mount_pos = s_ctrl->sensordata->sensor_info->position << 16;
	mount_pos = mount_pos | ((s_ctrl->sensordata->sensor_info->
					sensor_mount_angle / 90) << 8);
	s_ctrl->msm_sd.sd.entity.flags = mount_pos | MEDIA_ENT_FL_DEFAULT;

	return 0;

FREE_CCI_CLIENT: