Patch "pwm: cros-ec: Explicitly set .polarity in .get_state()" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    pwm: cros-ec: Explicitly set .polarity in .get_state()

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pwm-cros-ec-explicitly-set-.polarity-in-.get_state.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 61fc49be27e8a2096f5e57446da37072771f526a
Author: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
Date:   Wed Mar 22 22:45:41 2023 +0100

    pwm: cros-ec: Explicitly set .polarity in .get_state()
    
    [ Upstream commit 30006b77c7e130e01d1ab2148cc8abf73dfcc4bf ]
    
    The driver only supports normal polarity. Complete the implementation of
    .get_state() by setting .polarity accordingly.
    
    Reviewed-by: Guenter Roeck <groeck@xxxxxxxxxxxx>
    Fixes: 1f0d3bb02785 ("pwm: Add ChromeOS EC PWM driver")
    Link: https://lore.kernel.org/r/20230228135508.1798428-3-u.kleine-koenig@xxxxxxxxxxxxxx
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
    Signed-off-by: Thierry Reding <thierry.reding@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pwm/pwm-cros-ec.c b/drivers/pwm/pwm-cros-ec.c
index 98f6ac6cf6ab4..bedf6298acfbb 100644
--- a/drivers/pwm/pwm-cros-ec.c
+++ b/drivers/pwm/pwm-cros-ec.c
@@ -125,6 +125,7 @@ static void cros_ec_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
 
 	state->enabled = (ret > 0);
 	state->period = EC_PWM_MAX_DUTY;
+	state->polarity = PWM_POLARITY_NORMAL;
 
 	/* Note that "disabled" and "duty cycle == 0" are treated the same */
 	state->duty_cycle = ret;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux