14 Dec, 2020
1 commit
-
During suspend, all the tpm registers will loose values.
So the 'real_period' value of struct 'imx_tpm_pwm_chip'
should be forced to be zero to force the period update
code can be executed after system resume back.Signed-off-by: Fancy Fang
16 Jun, 2020
1 commit
-
Since the PWM framework is switching struct pwm_state.period's datatype
to u64, prepare for this transition by using DIV64_U64_ROUND_CLOSEST to
handle a 64-bit divisor.Cc: Shawn Guo
Cc: Sascha Hauer
Cc: Pengutronix Kernel Team
Cc: Fabio Estevam
Cc: NXP Linux Team
Signed-off-by: Guru Das Srinagesh
Signed-off-by: Thierry Reding
30 Mar, 2020
1 commit
-
There is nothing in use from log2.h/of_address.h, remove them.
Signed-off-by: Anson Huang
Acked-by: Uwe Kleine-König
Signed-off-by: Thierry Reding
21 Sep, 2019
1 commit
-
It is surprising for a PWM consumer when the variable holding the
requested state is modified by pwm_apply_state(). Consider for example a
driver doing:#define PERIOD 5000000
#define DUTY_LITTLE 10
...
struct pwm_state state = {
.period = PERIOD,
.duty_cycle = DUTY_LITTLE,
.polarity = PWM_POLARITY_NORMAL,
.enabled = true,
};pwm_apply_state(mypwm, &state);
...
state.duty_cycle = PERIOD / 2;
pwm_apply_state(mypwm, &state);For sure the second call to pwm_apply_state() should still have
state.period = PERIOD and not something the hardware driver chose for a
reason that doesn't necessarily apply to the second call.So declare the state argument as a pointer to a const type and adapt all
drivers' .apply callbacks.Signed-off-by: Uwe Kleine-König
Signed-off-by: Thierry Reding
09 May, 2019
1 commit
-
i.MX7ULP has TPM(Low Power Timer/Pulse Width Modulation Module) inside,
it can support multiple PWM channels, all the channels share same
counter and period setting, but each channel can configure its duty and
polarity independently.There are several TPM modules in i.MX7ULP, the number of channels in TPM
modules are different, it can be read from each TPM module's PARAM
register.Signed-off-by: Anson Huang
Reviewed-by: Uwe Kleine-König
Signed-off-by: Thierry Reding