Re: [PATCH 0/5] Tegra264 PWM support
From: Uwe Kleine-König
Date: Tue Mar 24 2026 - 13:03:46 EST
Hello Mikko,
On Mon, Mar 23, 2026 at 11:36:36AM +0900, Mikko Perttunen wrote:
> this adds support for the PWM controller on Tegra264. The controller
> is similar to previous generations, but the register fields are
> widened, the depth is made configurable, and the enable bit moves
> to a different spot.
looking at the driver it would be great if you could provide a
get_state() callback (or even convert to the waveform callbacks) and
fix:
static int tegra_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
int duty_ns, int period_ns)
{
...
}
static int tegra_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{
...
err = tegra_pwm_config(chip, pwm, state->duty_cycle, state->period);
...
}
where state->duty_cycle and state->period are u64 and thus big values
are not passed correctly to tegra_pwm_config().
The former helps a lot for testing the driver, and the latter for fixing
the fallout that you then will probably notice :-)
Best regards
Uwe
Attachment:
signature.asc
Description: PGP signature