EmbeddedController
EmbeddedController copied to clipboard
pwm: fix always false condition in pwm_get_bb_sleep_mask()
Fix incorrect range check for BBLED PWM IDs.
The original condition:
id >= MCHP_PWM_ID_MAX && id < MCHP_PWM_ID_MAX
can never be true. Updated the check to:
id >= MCHP_PWM_ID_MAX &&
id < (MCHP_PWM_ID_MAX + MCHP_BBLEN_INSTANCES)
This correctly validates BBLED instances and aligns with the size of pwm_slp_bitpos[].
Fixes #31