diff options
author | Kalle Valo <kvalo@kernel.org> | 2023-01-17 13:36:25 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2023-01-17 13:36:25 +0200 |
commit | d0e99511834b6828c960e978d9a8cb6e5731250d (patch) | |
tree | e7b062c1f9d28a55083477a1462286a7923a57fd /drivers/pwm/pwm-fsl-ftm.c | |
parent | de7d0ff301fccc75281d7d8eb98c4a47faacf32d (diff) | |
parent | 80f8a66dede0a4b4e9e846765a97809c6fe49ce5 (diff) | |
download | linux-d0e99511834b6828c960e978d9a8cb6e5731250d.tar.gz linux-d0e99511834b6828c960e978d9a8cb6e5731250d.tar.bz2 linux-d0e99511834b6828c960e978d9a8cb6e5731250d.zip |
Merge wireless into wireless-next
Due to the two cherry picked commits from wireless to wireless-next we have
several conflicts in mt76. To avoid any bugs with conflicts merge wireless into
wireless-next.
96f134dc1964 wifi: mt76: handle possible mt76_rx_token_consume failures
fe13dad8992b wifi: mt76: dma: do not increment queue head if mt76_dma_add_buf fails
Diffstat (limited to 'drivers/pwm/pwm-fsl-ftm.c')
-rw-r--r-- | drivers/pwm/pwm-fsl-ftm.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/pwm/pwm-fsl-ftm.c b/drivers/pwm/pwm-fsl-ftm.c index 0247757f9a72..5caadbd6194e 100644 --- a/drivers/pwm/pwm-fsl-ftm.c +++ b/drivers/pwm/pwm-fsl-ftm.c @@ -65,13 +65,12 @@ static void ftm_clear_write_protection(struct fsl_pwm_chip *fpc) regmap_read(fpc->regmap, FTM_FMS, &val); if (val & FTM_FMS_WPEN) - regmap_update_bits(fpc->regmap, FTM_MODE, FTM_MODE_WPDIS, - FTM_MODE_WPDIS); + regmap_set_bits(fpc->regmap, FTM_MODE, FTM_MODE_WPDIS); } static void ftm_set_write_protection(struct fsl_pwm_chip *fpc) { - regmap_update_bits(fpc->regmap, FTM_FMS, FTM_FMS_WPEN, FTM_FMS_WPEN); + regmap_set_bits(fpc->regmap, FTM_FMS, FTM_FMS_WPEN); } static bool fsl_pwm_periodcfg_are_equal(const struct fsl_pwm_periodcfg *a, @@ -94,8 +93,7 @@ static int fsl_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) ret = clk_prepare_enable(fpc->ipg_clk); if (!ret && fpc->soc->has_enable_bits) { mutex_lock(&fpc->lock); - regmap_update_bits(fpc->regmap, FTM_SC, BIT(pwm->hwpwm + 16), - BIT(pwm->hwpwm + 16)); + regmap_set_bits(fpc->regmap, FTM_SC, BIT(pwm->hwpwm + 16)); mutex_unlock(&fpc->lock); } @@ -108,8 +106,7 @@ static void fsl_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) if (fpc->soc->has_enable_bits) { mutex_lock(&fpc->lock); - regmap_update_bits(fpc->regmap, FTM_SC, BIT(pwm->hwpwm + 16), - 0); + regmap_clear_bits(fpc->regmap, FTM_SC, BIT(pwm->hwpwm + 16)); mutex_unlock(&fpc->lock); } @@ -317,8 +314,8 @@ static int fsl_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, if (!newstate->enabled) { if (oldstate->enabled) { - regmap_update_bits(fpc->regmap, FTM_OUTMASK, - BIT(pwm->hwpwm), BIT(pwm->hwpwm)); + regmap_set_bits(fpc->regmap, FTM_OUTMASK, + BIT(pwm->hwpwm)); clk_disable_unprepare(fpc->clk[FSL_PWM_CLK_CNTEN]); clk_disable_unprepare(fpc->clk[fpc->period.clk_select]); } @@ -342,8 +339,7 @@ static int fsl_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, goto end_mutex; } - regmap_update_bits(fpc->regmap, FTM_OUTMASK, BIT(pwm->hwpwm), - 0); + regmap_clear_bits(fpc->regmap, FTM_OUTMASK, BIT(pwm->hwpwm)); } end_mutex: |