Loading drivers/leds/leds-qpnp-flash-v2.c +13 −0 Original line number Diff line number Diff line Loading @@ -188,6 +188,10 @@ enum strobe_type { LPG_STROBE, }; enum wa_flags { PM8150L_IRES_WA = BIT(0), }; /* * Configurations for each individual LED */ Loading Loading @@ -286,6 +290,7 @@ struct qpnp_flash_led { int num_snodes; int enable; int total_current_ma; u32 wa_flags; u16 base; bool trigger_lmh; bool trigger_chgr; Loading Loading @@ -1028,7 +1033,12 @@ static void qpnp_flash_led_node_set(struct flash_node_data *fnode, int value) break; } } } else if (prgm_current_ma <= 20 && (led->wa_flags & PM8150L_IRES_WA)) { fnode->ires_idx = FLASH_LED_IRES_BASE; fnode->ires_ua = FLASH_LED_IRES_MIN_UA; } fnode->current_ma = prgm_current_ma; fnode->cdev.brightness = prgm_current_ma; fnode->current_reg_val = get_current_reg_code(prgm_current_ma, Loading Loading @@ -1927,6 +1937,9 @@ static int qpnp_flash_led_parse_common_dt(struct qpnp_flash_led *led, led->pdata->pmic_rev_id->pmic_subtype, led->pdata->pmic_rev_id->rev4); if (led->pdata->pmic_rev_id->pmic_subtype == PM8150L_SUBTYPE) led->wa_flags |= PM8150L_IRES_WA; led->pdata->hdrm_auto_mode_en = of_property_read_bool(node, "qcom,hdrm-auto-mode"); Loading Loading
drivers/leds/leds-qpnp-flash-v2.c +13 −0 Original line number Diff line number Diff line Loading @@ -188,6 +188,10 @@ enum strobe_type { LPG_STROBE, }; enum wa_flags { PM8150L_IRES_WA = BIT(0), }; /* * Configurations for each individual LED */ Loading Loading @@ -286,6 +290,7 @@ struct qpnp_flash_led { int num_snodes; int enable; int total_current_ma; u32 wa_flags; u16 base; bool trigger_lmh; bool trigger_chgr; Loading Loading @@ -1028,7 +1033,12 @@ static void qpnp_flash_led_node_set(struct flash_node_data *fnode, int value) break; } } } else if (prgm_current_ma <= 20 && (led->wa_flags & PM8150L_IRES_WA)) { fnode->ires_idx = FLASH_LED_IRES_BASE; fnode->ires_ua = FLASH_LED_IRES_MIN_UA; } fnode->current_ma = prgm_current_ma; fnode->cdev.brightness = prgm_current_ma; fnode->current_reg_val = get_current_reg_code(prgm_current_ma, Loading Loading @@ -1927,6 +1937,9 @@ static int qpnp_flash_led_parse_common_dt(struct qpnp_flash_led *led, led->pdata->pmic_rev_id->pmic_subtype, led->pdata->pmic_rev_id->rev4); if (led->pdata->pmic_rev_id->pmic_subtype == PM8150L_SUBTYPE) led->wa_flags |= PM8150L_IRES_WA; led->pdata->hdrm_auto_mode_en = of_property_read_bool(node, "qcom,hdrm-auto-mode"); Loading