From 4c0cc1e778c8bc3bfdc10892c30c3cbd81f32ea0 Mon Sep 17 00:00:00 2001 From: Jannis <52237708+Heisath@users.noreply.github.com> Date: Fri, 3 Jun 2022 18:51:39 +0200 Subject: [PATCH] Fix mvebu pwm patch (#3847) --- .../92-mvebu-gpio-remove-hardcoded-timer-assignment.patch | 8 +++++--- .../92-mvebu-gpio-remove-hardcoded-timer-assignment.patch | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch b/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch index 9216622d36..095e09f1e5 100644 --- a/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch +++ b/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch @@ -220,7 +220,7 @@ index bad399e3f..d3fdaf177 100644 regmap_read(mvchip->regs, GPIO_BLINK_EN_OFF + mvchip->offset, &u); if (u) -@@ -723,19 +796,26 @@ static void mvebu_pwm_get_state(struct pwm_chip *chip, +@@ -796,13 +796,15 @@ static void mvebu_pwm_get_state(struct pwm_chip *chip, else state->enabled = false; @@ -237,10 +237,12 @@ index bad399e3f..d3fdaf177 100644 struct mvebu_gpio_chip *mvchip = mvpwm->mvchip; unsigned long long val; unsigned long flags; - unsigned int on, off; +@@ -811,7 +813,12 @@ static int mvebu_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, + if (state->polarity != PWM_POLARITY_NORMAL) + return -EINVAL; - val = (unsigned long long) mvpwm->clk_rate * state->duty_cycle; -+ if (chip_data) ++ if (chip_data) + controller = mvebu_pwm_list[chip_data->ctrl]; + else + controller = &mvpwm->controller; diff --git a/patch/kernel/archive/mvebu-5.16/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch b/patch/kernel/archive/mvebu-5.16/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch index 9216622d36..095e09f1e5 100644 --- a/patch/kernel/archive/mvebu-5.16/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch +++ b/patch/kernel/archive/mvebu-5.16/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch @@ -220,7 +220,7 @@ index bad399e3f..d3fdaf177 100644 regmap_read(mvchip->regs, GPIO_BLINK_EN_OFF + mvchip->offset, &u); if (u) -@@ -723,19 +796,26 @@ static void mvebu_pwm_get_state(struct pwm_chip *chip, +@@ -796,13 +796,15 @@ static void mvebu_pwm_get_state(struct pwm_chip *chip, else state->enabled = false; @@ -237,10 +237,12 @@ index bad399e3f..d3fdaf177 100644 struct mvebu_gpio_chip *mvchip = mvpwm->mvchip; unsigned long long val; unsigned long flags; - unsigned int on, off; +@@ -811,7 +813,12 @@ static int mvebu_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, + if (state->polarity != PWM_POLARITY_NORMAL) + return -EINVAL; - val = (unsigned long long) mvpwm->clk_rate * state->duty_cycle; -+ if (chip_data) ++ if (chip_data) + controller = mvebu_pwm_list[chip_data->ctrl]; + else + controller = &mvpwm->controller;