Home
last modified time | relevance | path

Searched refs:psel_cap (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/usb/typec/
H A Drt1719.c754 static u16 rt1719_gen_snkcap_by_current(const struct rt1719_psel_cap *psel_cap, in rt1719_gen_snkcap_by_current() argument
759 if (!(psel_cap->himask & BIT(capsel))) in rt1719_gen_snkcap_by_current()
762 cap |= psel_cap->milliamp / 10; in rt1719_gen_snkcap_by_current()
766 static u16 rt1719_gen_snkcap_by_watt(const struct rt1719_psel_cap *psel_cap, in rt1719_gen_snkcap_by_watt() argument
772 if (!(psel_cap->lomask & BIT(capsel))) in rt1719_gen_snkcap_by_watt()
775 cap |= min(psel_cap->milliwatt / volt_div[capsel], (u32)5000) / 10; in rt1719_gen_snkcap_by_watt()
782 const struct rt1719_psel_cap *psel_cap; in rt1719_gen_snkcap() local
788 psel_cap = rt1719_psel_caps + psel; in rt1719_gen_snkcap()
790 return rt1719_gen_snkcap_by_current(psel_cap, capsel); in rt1719_gen_snkcap()
792 return rt1719_gen_snkcap_by_watt(psel_cap, capsel); in rt1719_gen_snkcap()