25 Jun, 2020
1 commit
-
This reverts commit d2ee0ef1e03fd3520b81d703838e35512432a7cc
Causes build errors on 5.8-rc1, hopefully a new version will be
submitted upstream, no need to keep this around at the moment.Signed-off-by: Greg Kroah-Hartman
Change-Id: I9d13a5b727ebc9dd4aaa591bb64d28adef8cb38c
10 Feb, 2020
2 commits
-
Because period and duty cycle are defined as ints with units of
nanoseconds, the maximum time duration that can be set is limited to
~2.147 seconds. Change their definitions to u64 in the structs of the
PWM framework so that higher durations may be set.Also make the relevant fixes to those drivers that use the period and
duty_cycle struct members in division operations, viz. replacing the
division operations with 64-bit division macros as appropriate.Bug: 140290586
Link: https://www.spinics.net/lists/linux-pwm/msg11133.html
Signed-off-by: Guru Das Srinagesh
Reported-by: kbuild test robot
Signed-off-by: Todd Kjos
Signed-off-by: Greg Kroah-Hartman
Change-Id: Ife96637115f8f704aef938291eb189cb29378afb -
This reverts commit 79650f61a73ba40fa896823d05d6dd5a2768c9b6 as it
causes merge issues with the 5.6-rc1 merge.Bug: 140290586
Cc: Guru Das Srinagesh
Cc: Todd Kjos
Signed-off-by: Greg Kroah-Hartman
Change-Id: I397f72b24bc9230cc04c35e77abf1f167147f4de
27 Nov, 2019
1 commit
-
Because period and duty cycle are defined as ints with units of
nanoseconds, the maximum time duration that can be set is limited to
~2.147 seconds. Change their definitions to u64 in the structs of the
PWM framework so that higher durations may be set.Also make the relevant fixes to those drivers that use the period and
duty_cycle struct members in division operations, viz. replacing the
division operations with 64-bit division macros as appropriate.Bug: 140290586
Change-Id: Ibb8c7f007f4c11ebf8cf01e7a468cc9c29aa8b23
Link: https://www.spinics.net/lists/linux-pwm/msg11133.html
Signed-off-by: Guru Das Srinagesh
Reported-by: kbuild test robot
Signed-off-by: Todd Kjos
21 Sep, 2019
1 commit
-
We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.//
@@
expression ret;
struct platform_device *E;
@@ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret
While we're here, remove braces on if statements that only have one
statement (manually).Cc: Thierry Reding
Cc: linux-pwm@vger.kernel.org
Cc: Greg Kroah-Hartman
Signed-off-by: Stephen Boyd
Signed-off-by: Thierry Reding
31 May, 2019
1 commit
-
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later versionextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 3029 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman
04 Jan, 2017
1 commit
-
All PWM devices have been marked as "might sleep" since v4.5, there is
no longer a need to differentiate on a per-chip basis.Signed-off-by: Thierry Reding
08 Sep, 2016
10 commits
-
This includes fixing some Coding Style issues and re-ordering and/or
simplifying a little code.Signed-off-by: Lee Jones
[thierry.reding@gmail.com: applied some bikeshedding>
Signed-off-by: Thierry Reding -
Setting up the STI PWM IP as capture only, with zero PWM output devices
is a perfectly valid configuration. It is no longer okay to assume that
there must be at least 1 PWM output device. In this patch we make the
default number of PWM output devices zero and only configure channels
explicitly requested.Reported-by: Peter Griffin
Signed-off-by: Lee Jones
Signed-off-by: Thierry Reding -
Once a PWM capture has been initiated, the capture call enables a rising
edge detection interrupt, then waits. Once each of the 3 phase changes
have been recorded the thread then wakes. The remaining part of the call
carries out the relevant calculations and returns a structure filled out
with the capture data.Signed-off-by: Lee Jones
Signed-off-by: Thierry Reding -
Here we're requesting the PWM capture IRQ and supplying the handler that
will be called in the event of an interrupt to handle it.Signed-off-by: Lee Jones
Signed-off-by: Thierry Reding -
Each PWM capture device is allocated a structure to hold its own state.
During a capture the device may be partaking in one of 3 phases. Initial
(rising) phase change, a subsequent (falling) phase change indicating
end of the duty-cycle phase and finally a final (rising) phase change
indicating the end of the period. The timer value snapshot each event is
held in a variable of the same name, and the phase number (0, 1, 2) is
contained in the index variable. Other device specific information, such
as GPIO pin, the IRQ wait queue and locking is also contained in the
structure. This patch initialises this structure for each of the
available devices.Signed-off-by: Lee Jones
Signed-off-by: Thierry Reding -
ST's PWM IP is supplied by 2 different clocks. One for PWM output and
the other for capture. This patch provides clock handling for the
latter.Signed-off-by: Lee Jones
Signed-off-by: Thierry Reding -
This is in preparation for subsequent patches that add support for PWM
capture to this driver.Signed-off-by: Lee Jones
Signed-off-by: Thierry Reding -
In the original code the clock rate was only obtained during
initialisation; however, the rate may change between then and
its use. This patch ensures the correct rate is acquired just
before use.Signed-off-by: Lee Jones
Signed-off-by: Thierry Reding -
Exciting functionality is on the way to this device. But
before we can add it, we need to do some basic housekeeping
so the additions can be added cleanly.Signed-off-by: Lee Jones
Signed-off-by: Thierry Reding -
This is to bring the terminology used in the STi PWM driver more
into line with the PWM subsystem.Signed-off-by: Lee Jones
Signed-off-by: Thierry Reding
30 Jan, 2015
1 commit
-
This patch introduces a bitmap which is used to keep track of the
pwm channels which have been configured in a pwm chip.The method used earlier to find the number of configured channels,
was to count the pwmdevices with PWMF_REQUESTED field set
and period value configured. This was not correct and failed
when of_pwm_get()/pwm_get() and then pwm_config() was used.Signed-off-by: Ajit Pal Singh
Signed-off-by: Thierry Reding
08 Aug, 2014
4 commits
-
Removes the PWM period table. Instead the prescaler is computed
from the period value passed in the config() function.Signed-off-by: Ajit Pal Singh
Signed-off-by: Lee Jones
Signed-off-by: Thierry Reding -
ST PWM IP has a common enable/disable control for all the PWM
channels on a PWM cell. Disables PWM output on the PWM HW only
when disable is called for the last channel.Signed-off-by: Ajit Pal Singh
Signed-off-by: Lee Jones
Signed-off-by: Thierry Reding -
ST PWM IP shares the same clock prescaler across all the PWM
channels. Hence configuration requests which change the period
will affect all the channels. Do not allow period changes which
will stomp period settings of the already configured channels.Signed-off-by: Ajit Pal Singh
Signed-off-by: Lee Jones
Signed-off-by: Thierry Reding -
This patch fixes the pwm driver to write the complete 8 bits of
the prescaler value to the PWM Control register.Signed-off-by: Ajit Pal Singh
Signed-off-by: Lee Jones
Signed-off-by: Thierry Reding
07 Aug, 2014
1 commit
-
This driver supports all current STi platforms' PWM IPs.
Signed-off-by: Ajit Pal Singh
Signed-off-by: Lee Jones
[thierry.reding: rename module to pwm-sti, fix build breakage]
Signed-off-by: Thierry Reding