Home
last modified time | relevance | path

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

/linux-6.12.1/drivers/pwm/
Dpwm-microchip-core.c73 struct mchp_core_pwm_chip *mchp_core_pwm = to_mchp_core_pwm(chip); in mchp_core_pwm_enable() local
84 channel_enable = readb_relaxed(mchp_core_pwm->base + reg_offset); in mchp_core_pwm_enable()
88 writel_relaxed(channel_enable, mchp_core_pwm->base + reg_offset); in mchp_core_pwm_enable()
89 mchp_core_pwm->channel_enabled &= ~BIT(pwm->hwpwm); in mchp_core_pwm_enable()
90 mchp_core_pwm->channel_enabled |= enable << pwm->hwpwm; in mchp_core_pwm_enable()
97 if (mchp_core_pwm->sync_update_mask & (1 << pwm->hwpwm)) in mchp_core_pwm_enable()
98 mchp_core_pwm->update_timestamp = ktime_add_ns(ktime_get(), period); in mchp_core_pwm_enable()
101 static void mchp_core_pwm_wait_for_sync_update(struct mchp_core_pwm_chip *mchp_core_pwm, in mchp_core_pwm_wait_for_sync_update() argument
112 if (mchp_core_pwm->sync_update_mask & (1 << channel)) { in mchp_core_pwm_wait_for_sync_update()
117 remaining_ns = ktime_to_ns(ktime_sub(mchp_core_pwm->update_timestamp, in mchp_core_pwm_wait_for_sync_update()
[all …]