Home
last modified time | relevance | path

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

/openbmc/linux/drivers/pwm/
H A Dpwm-microchip-core.c74 struct mchp_core_pwm_chip *mchp_core_pwm = to_mchp_core_pwm(chip); in mchp_core_pwm_enable() local
85 channel_enable = readb_relaxed(mchp_core_pwm->base + reg_offset); in mchp_core_pwm_enable()
89 writel_relaxed(channel_enable, mchp_core_pwm->base + reg_offset); in mchp_core_pwm_enable()
90 mchp_core_pwm->channel_enabled &= ~BIT(pwm->hwpwm); in mchp_core_pwm_enable()
91 mchp_core_pwm->channel_enabled |= enable << pwm->hwpwm; in mchp_core_pwm_enable()
98 if (mchp_core_pwm->sync_update_mask & (1 << pwm->hwpwm)) in mchp_core_pwm_enable()
99 mchp_core_pwm->update_timestamp = ktime_add_ns(ktime_get(), period); in mchp_core_pwm_enable()
102 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
113 if (mchp_core_pwm->sync_update_mask & (1 << channel)) { in mchp_core_pwm_wait_for_sync_update()
118 remaining_ns = ktime_to_ns(ktime_sub(mchp_core_pwm->update_timestamp, in mchp_core_pwm_wait_for_sync_update()
[all …]