-
Notifications
You must be signed in to change notification settings - Fork 19.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meson: fix: Fail to register VCC_CORE regulator (#11583)
Clean up some kernel configurations
- Loading branch information
Showing
2 changed files
with
28 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
target/linux/meson/patches-6.1/905-pwm-meson-modify-and-simplify-calculation-in.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- a/drivers/pwm/pwm-meson.c | ||
+++ b/drivers/pwm/pwm-meson.c | ||
@@ -351,8 +351,18 @@ static int meson_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, | ||
channel->lo = FIELD_GET(PWM_LOW_MASK, value); | ||
channel->hi = FIELD_GET(PWM_HIGH_MASK, value); | ||
|
||
- state->period = meson_pwm_cnt_to_ns(chip, pwm, channel->lo + channel->hi); | ||
- state->duty_cycle = meson_pwm_cnt_to_ns(chip, pwm, channel->hi); | ||
+ if (channel->lo == 0) { | ||
+ state->period = meson_pwm_cnt_to_ns(chip, pwm, channel->hi); | ||
+ state->duty_cycle = state->period; | ||
+ } else if (channel->lo >= channel->hi) { | ||
+ state->period = meson_pwm_cnt_to_ns(chip, pwm, | ||
+ channel->lo + channel->hi); | ||
+ state->duty_cycle = meson_pwm_cnt_to_ns(chip, pwm, | ||
+ channel->hi); | ||
+ } else { | ||
+ state->period = 0; | ||
+ state->duty_cycle = 0; | ||
+ } | ||
|
||
state->polarity = PWM_POLARITY_NORMAL; | ||
|