Low flashlight brightness bugfix
Low flashlight brightness bugfix Because the platform side cannot output a PWM wave with 100% duty cycle, the brightness of the flashlight is too low. To fix this, we manually pull up this pin. Change-Id: Iaa58f021dcecf86d173332f425ba311d40959127 Reviewed-on: https://gerrit.mot.com/2250288 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Pengfei Qiao <qiaopf1@motorola.com> Reviewed-by: Zhichao Chen <chenzc2@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
1 parent
d3d76d71d5
commit
f7fd513151
3 files changed
+18
No files matched your search
@@ -582,8 +582,16 @@ static int cam_flash_low(
|
|||||||
}
|
}
|
||||||
|
|
||||||
cam_res_mgr_gpio_set_value(soc_private->flash_gpio_enable, 0);
|
cam_res_mgr_gpio_set_value(soc_private->flash_gpio_enable, 0);
|
||||||
|
#ifdef CONFIG_DEVON_CAMERA_FLASH
|
||||||
|
cam_res_mgr_gpio_request(soc_info.dev, DEVON_CAMERA_PWM_GPIO, 0, "torch_enable");
|
||||||
|
cam_res_mgr_gpio_set_value(DEVON_CAMERA_PWM_GPIO, 1);
|
||||||
|
usleep_range(5000,6000);
|
||||||
|
cam_res_mgr_gpio_set_value(DEVON_CAMERA_PWM_GPIO, 0);
|
||||||
|
cam_res_mgr_gpio_free(soc_info.dev, DEVON_CAMERA_PWM_GPIO);
|
||||||
|
#else
|
||||||
pm6125_flash_gpio_select_state(PM6125_FLASH_GPIO_STATE_ACTIVE, CAMERA_SENSOR_FLASH_OP_FIRELOW, FLASH_FIRE_LOW_MAXCURRENT);
|
pm6125_flash_gpio_select_state(PM6125_FLASH_GPIO_STATE_ACTIVE, CAMERA_SENSOR_FLASH_OP_FIRELOW, FLASH_FIRE_LOW_MAXCURRENT);
|
||||||
usleep_range(5000,6000);
|
usleep_range(5000,6000);
|
||||||
|
#endif
|
||||||
pm6125_flash_gpio_select_state(PM6125_FLASH_GPIO_STATE_ACTIVE, CAMERA_SENSOR_FLASH_OP_FIRELOW, flash_data->led_current_ma[0]);
|
pm6125_flash_gpio_select_state(PM6125_FLASH_GPIO_STATE_ACTIVE, CAMERA_SENSOR_FLASH_OP_FIRELOW, flash_data->led_current_ma[0]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,10 @@
|
|||||||
#ifndef _CAM_FLASH_CORE_H_
|
#ifndef _CAM_FLASH_CORE_H_
|
||||||
#define _CAM_FLASH_CORE_H_
|
#define _CAM_FLASH_CORE_H_
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEVON_CAMERA_FLASH
|
||||||
|
#define DEVON_CAMERA_PWM_GPIO 1165
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <media/cam_sensor.h>
|
#include <media/cam_sensor.h>
|
||||||
#include "cam_flash_dev.h"
|
#include "cam_flash_dev.h"
|
||||||
|
|
||||||
|
|||||||
@@ -20,9 +20,15 @@ enum{
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEVON_CAMERA_FLASH
|
||||||
|
#define PM6125_PWM_PERIOD 50000
|
||||||
|
#define FLASH_FIRE_HIGH_MAXCURRENT 1750
|
||||||
|
#define FLASH_FIRE_LOW_MAXCURRENT 285
|
||||||
|
#else
|
||||||
#define PM6125_PWM_PERIOD 50000
|
#define PM6125_PWM_PERIOD 50000
|
||||||
#define FLASH_FIRE_HIGH_MAXCURRENT 1200
|
#define FLASH_FIRE_HIGH_MAXCURRENT 1200
|
||||||
#define FLASH_FIRE_LOW_MAXCURRENT 150
|
#define FLASH_FIRE_LOW_MAXCURRENT 150
|
||||||
|
#endif
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Function Prototype
|
* Function Prototype
|
||||||
|
|||||||
Reference in new issue
Block a user