RE: [PATCH v3 06/10] pwm: Add NVIDIA Tegra SoC support |
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: RE: [PATCH v3 06/10] pwm: Add NVIDIA Tegra SoC support
- From: Stephen Warren <swarren@xxxxxxxxxx>
- Date: Tue, 28 Feb 2012 13:14:35 -0800
- Accept-language: en-US
- Acceptlanguage: en-US
- Cc: "linux-arm-kernel@xxxxxxxxxxxxxxxxxxx" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "linux-tegra@xxxxxxxxxxxxxxx" <linux-tegra@xxxxxxxxxxxxxxx>, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Matthias Kaehlcke <matthias@xxxxxxxxxxxx>, Kurt Van Dijck <kurt.van.dijck@xxxxxx>, Rob Herring <rob.herring@xxxxxxxxxxx>, Grant Likely <grant.likely@xxxxxxxxxxxx>, Colin Cross <ccross@xxxxxxxxxxx>, Olof Johansson <olof@xxxxxxxxx>, Richard Purdie <rpurdie@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>, Mitch Bradley <wmb@xxxxxxxxxxxxx>, Mike Frysinger <vapier@xxxxxxxxxx>, Eric Miao <eric.y.miao@xxxxxxxxx>, Lars-Peter Clausen <lars@xxxxxxxxxx>, Ryan Mallon <rmallon@xxxxxxxxx>
- In-reply-to: <1329923841-32017-7-git-send-email-thierry.reding@avionic-design.de>
- Thread-index: AczxdTOcG0XeIKIXTg6DGIA7pvrIXwE6A3Fw
- Thread-topic: [PATCH v3 06/10] pwm: Add NVIDIA Tegra SoC support
Thierry Reding wrote at Wednesday, February 22, 2012 8:17 AM:
> This commit adds a generic PWM framework driver for the PWFM controller
> found on NVIDIA Tegra SoCs. The driver is based on code from the
> Chromium kernel tree and was originally written by Gary King (NVIDIA)
> and later modified by Simon Que (Chromium).
> diff --git a/drivers/pwm/pwm-tegra.c b/drivers/pwm/pwm-tegra.c
> +static int tegra_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
> + /*
> + * Convert from duty_ns / period_ns to a fixed number of duty
> + * ticks per (1 << PWM_DUTY_WIDTH) cycles.
> + */
> + c = duty_ns * ((1 << PWM_DUTY_WIDTH) - 1);
The driver in ChromeOS has the following extra line here:
c += (period_ns / 2);
and the following extra line in the comment above:
Also, make sure to round to the nearest integer during division.
I don't know the HW well enough to know if that line should be present?
Otherwise, this looks similar enough to the ChromeOS driver, so:
Acked-by: Stephen Warren <swarren@xxxxxxxxxx>
--
nvpublic
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[ARM Kernel]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]