diff options
| author | Rajesh Bondugula <rajeshb@codeaurora.org> | 2016-06-17 14:55:57 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-08-11 11:28:14 -0700 |
| commit | 8ccd1f2d5e7a5a03467ddfa7319c316ee827bbda (patch) | |
| tree | 5df8e95558dc661024a319761b343a2dd1e969d7 | |
| parent | 9d822a9489cceee0be66a722211426c544b04cdf (diff) | |
msm: camera: sensor: Detect flash_driver_type from dtsi
Flash type is automatically detected in kernel based on dtsi
entries.
It checkes in this order:
1) I2C flash
2) PMIC flash
3) GPIO flash
CRs-Fixed: 1028059
Change-Id: I7e57a4d6c67a58728bb3ef7f3ea0312380f84486
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
| -rw-r--r-- | drivers/media/platform/msm/camera_v2/sensor/flash/msm_flash.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/media/platform/msm/camera_v2/sensor/flash/msm_flash.c b/drivers/media/platform/msm/camera_v2/sensor/flash/msm_flash.c index c12e95d3310a..717c2849bf14 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/flash/msm_flash.c +++ b/drivers/media/platform/msm/camera_v2/sensor/flash/msm_flash.c @@ -915,6 +915,14 @@ static int32_t msm_flash_get_dt_data(struct device_node *of_node, fctrl->flash_driver_type = FLASH_DRIVER_I2C; } + /* Read the flash and torch source info from device tree node */ + rc = msm_flash_get_pmic_source_info(of_node, fctrl); + if (rc < 0) { + pr_err("%s:%d msm_flash_get_pmic_source_info failed rc %d\n", + __func__, __LINE__, rc); + return rc; + } + /* Read the gpio information from device tree */ rc = msm_sensor_driver_get_gpio_data( &(fctrl->power_info.gpio_conf), of_node); @@ -929,13 +937,6 @@ static int32_t msm_flash_get_dt_data(struct device_node *of_node, CDBG("%s:%d fctrl->flash_driver_type = %d", __func__, __LINE__, fctrl->flash_driver_type); - /* Read the flash and torch source info from device tree node */ - rc = msm_flash_get_pmic_source_info(of_node, fctrl); - if (rc < 0) { - pr_err("%s:%d msm_flash_get_pmic_source_info failed rc %d\n", - __func__, __LINE__, rc); - return rc; - } return rc; } |
