static void set_blue_brightness(struct led_classdev *led_cdev, enum led_brightness value) { int ret = 0; RGB_PRINT("%s: value = %d\n",__func__, value); ret = pmic_set_low_current_led_intensity(PM_LOW_CURRENT_LED_DRV2, (!!value)? LEVEL : 0); if(ret) { RGB_PRINT("%s: failed\n",__func__); return; } RGB_PRINT("%s: success\n",__func__); }
static void set_blue_brightness(struct led_classdev *led_cdev, enum led_brightness value) { int ret = 0; RGB_PRINT("%s: value = %d\n",__func__, value); /*< DTS2012021602342 zhongjinrong 20120224 begin */ #ifdef CONFIG_ARCH_MSM7X27A /* DTS2012021602342 zhongjinrong 20120224 end >*/ ret = pmic_secure_mpp_config_i_sink(PM_MPP_8, PM_MPP__I_SINK__LEVEL_5mA, \ (!!value) ? PM_MPP__I_SINK__SWITCH_ENA : PM_MPP__I_SINK__SWITCH_DIS); #else ret = pmic_set_low_current_led_intensity(PM_LOW_CURRENT_LED_DRV2, (!!value)? LEVEL : 0); #endif if(ret) { RGB_PRINT("%s: failed,ret=%d\n",__func__,ret); return; } RGB_PRINT("%s: success\n",__func__); }
static void set_green_brightness(struct led_classdev *led_cdev, enum led_brightness value) { int ret = 0; RGB_PRINT("%s: value = %d\n",__func__, value); /*< DTS2011122703714 duanfei 20111227 begin */ /*< DTS2012021602342 zhongjinrong 20120224 begin */ #ifdef CONFIG_ARCH_MSM7X27A /* DTS2012021602342 zhongjinrong 20120224 end >*/ if (HW_DS == board_ds) { /*< DTS2012021602342 zhongjinrong 20120224 begin */ /* <DTS2012020906039 liguosheng 20120218 begin */ /*ap side control the gpio*/ gpio_tlmm_config(GPIO_CFG(GPIO_LED_GREEN, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA), GPIO_CFG_ENABLE); /* DTS2012020906039 liguosheng 20120218 end> */ /* DTS2012021602342 zhongjinrong 20120224 end >*/ ret = gpio_direction_output(GPIO_LED_GREEN,(!!value) ? LED_ON : LED_OFF); } else { ret = pmic_secure_mpp_config_i_sink(PM_MPP_5, PM_MPP__I_SINK__LEVEL_5mA, \ (!!value) ? PM_MPP__I_SINK__SWITCH_ENA : PM_MPP__I_SINK__SWITCH_DIS); } /* DTS2011122703714 duanfei 20111227 end >*/ #else ret = pmic_set_low_current_led_intensity(PM_LOW_CURRENT_LED_DRV1, (!!value)? LEVEL : 0); #endif if(ret) { RGB_PRINT("%s: failed,ret=%d\n",__func__,ret); return; } RGB_PRINT("%s: success\n",__func__); }