mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
samus_pd: remove PWM module
Remove PWM module which is not being used in order to save flash space. BUG=chrome-os-partner:34489 BRANCH=samus TEST=make -j buildall. view .map file and see we save ~760 bytes. Change-Id: Id107fb402a60c5ac7510982f8ace6bad46fb14d0 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/239912 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
@@ -403,9 +403,11 @@ static void board_init(void)
|
||||
}
|
||||
pd_comm_enable(pd_enable);
|
||||
|
||||
#ifdef CONFIG_PWM
|
||||
/* Enable ILIM PWM: initial duty cycle 0% = 500mA limit. */
|
||||
pwm_enable(PWM_CH_ILIM, 1);
|
||||
pwm_set_duty(PWM_CH_ILIM, 0);
|
||||
#endif
|
||||
}
|
||||
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
|
||||
|
||||
@@ -616,6 +618,7 @@ int board_set_active_charge_port(int charge_port)
|
||||
*/
|
||||
void board_set_charge_limit(int charge_ma)
|
||||
{
|
||||
#ifdef CONFIG_PWM
|
||||
int pwm_duty = MA_TO_PWM(charge_ma);
|
||||
if (pwm_duty < 0)
|
||||
pwm_duty = 0;
|
||||
@@ -623,6 +626,7 @@ void board_set_charge_limit(int charge_ma)
|
||||
pwm_duty = 100;
|
||||
|
||||
pwm_set_duty(PWM_CH_ILIM, pwm_duty);
|
||||
#endif
|
||||
|
||||
pd_status.curr_lim_ma = charge_ma;
|
||||
pd_send_ec_int();
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#define CONFIG_I2C
|
||||
#undef CONFIG_LID_SWITCH
|
||||
#define CONFIG_LOW_POWER_IDLE
|
||||
#define CONFIG_PWM
|
||||
#undef CONFIG_PWM
|
||||
#define CONFIG_STM_HWTIMER32
|
||||
#undef CONFIG_TASK_PROFILING
|
||||
#define CONFIG_USB_POWER_DELIVERY
|
||||
|
||||
Reference in New Issue
Block a user