24 Apr, 2018
1 commit
-
commit 6225f9c64b40bc8a22503e9cda70f55d7a9dd3c6 upstream.
This patch fixes an issue that is possible to set mismatch value to duty
for R-Car PWM if we input the following commands:# cd /sys/class/pwm//
# echo 0 > export
# cd pwm0
# echo 30 > period
# echo 30 > duty_cycle
# echo 0 > duty_cycle
# cat duty_cycle
0
# echo 1 > enable
--> Then, the actual duty_cycle is 30, not 0.So, this patch adds a condition into rcar_pwm_config() to fix this
issue.Signed-off-by: Ryo Kodama
[shimoda: revise the commit log and add Fixes and Cc tags]
Fixes: ed6c1476bf7f ("pwm: Add support for R-Car PWM Timer")
Cc: Cc: # v4.4+
Signed-off-by: Yoshihiro Shimoda
Signed-off-by: Thierry Reding
Signed-off-by: Greg Kroah-Hartman
19 Mar, 2018
1 commit
-
[ Upstream commit 8472b529e113e0863ea064fdee51bf73c3f86fd6 ]
Fix trivial copy/paste bug.
Signed-off-by: Axel Lin
Reviewed-by: Linus Walleij
Fixes: ef1f09eca74a ("pwm: Add a driver for the STMPE PWM")
Signed-off-by: Thierry Reding
Signed-off-by: Sasha Levin
Signed-off-by: Greg Kroah-Hartman
02 Nov, 2017
1 commit
-
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.By default all files without license information are under the default
license of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if
Reviewed-by: Philippe Ombredanne
Reviewed-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
12 Sep, 2017
1 commit
-
…ierry.reding/linux-pwm
Pull pwm updates from Thierry Reding:
"The changes for this release include a new driver for the PWM
controller found on SoCs of the ZTX ZX family. Support for an old
SH-Mobile SoC has been dropped and the Rockchip and MediaTek drivers
gain support for more generations.Other than that there are a bunch of coding style fixes, minor bug
fixes and cleanup as well as documentation patches"* tag 'pwm/for-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (32 commits)
pwm: pwm-samsung: fix suspend/resume support
pwm: samsung: Remove redundant checks from pwm_samsung_config()
pwm: mediatek: Disable clock on PWM configuration failure
dt-bindings: pwm: Add MT2712/MT7622 information
pwm: mediatek: Fix clock control issue
pwm: mediatek: Fix PWM source clock selection
pwm: mediatek: Fix Kconfig description
pwm: tegra: Explicitly request exclusive reset control
pwm: hibvt: Explicitly request exclusive reset control
pwm: tiehrpwm: Set driver data before runtime PM enable
pwm: tiehrpwm: Miscellaneous coding style fixups
pwm: tiecap: Set driver data before runtime PM enable
pwm: tiecap: Miscellaneous coding style fixups
dt-bindings: pwm: tiecap: Add TI 66AK2G SoC specific compatible
pwm: tiehrpwm: fix clock imbalance in probe error path
pwm: tiehrpwm: Fix runtime PM imbalance at unbind
pwm: Kconfig: Enable pwm-tiecap to be built for Keystone
pwm: Add ZTE ZX PWM device driver
dt-bindings: pwm: Add bindings doc for ZTE ZX PWM controller
pwm: bcm2835: Support for polarity setting via DT
...
05 Sep, 2017
1 commit
-
…-4.14', 'ib-mfd-iio-pwm-4.14', 'ib-mfd-input-rtc-4.14', 'ib-mfd-many-4.14' and 'ib-mfd-pinctrl-regulator-4.14' into ibs-for-mfd-merged
04 Sep, 2017
2 commits
-
Add support for single PWM channel on Low-Power Timer, that can be
found on some STM32 platforms.Signed-off-by: Fabrice Gasnier
Acked-by: Thierry Reding
Signed-off-by: Lee Jones -
include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.Signed-off-by: Wolfram Sang
Acked-by: Greg Kroah-Hartman
Acked-by: Alexandre Belloni
Acked-by: Mark Brown
Acked-by: Sebastian Reichel
Acked-by: Jonathan Cameron
Acked-by: Dmitry Torokhov
Acked-by: Kishon Vijay Abraham I
Acked-by: Bartlomiej Zolnierkiewicz
Acked-by: Thierry Reding
Acked-by: Tony Lindgren
Acked-by: Daniel Thompson
Acked-by: Linus Walleij
Acked-by: Guenter Roeck
Signed-off-by: Lee Jones
21 Aug, 2017
17 commits
-
Fix suspend/resume support:
- add disabled_mask to struct samsung_pwm_chip to track PWM
disabled state information in pwm_samsung_{disable,enable}()- rename pwm_samsung_config() to __pwm_samsung_config() and
add extra force_period parameter to be used during resume
(to force tin_ns and tcnt recalculation)- add pwm_samsung_config() wrapper for preserving old behavior
- properly restore PWM configuration in pwm_samsung_resume()
- remove no longer needed pwm_samsung_suspend()
- update Copyrights
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Thierry Reding -
If the requested period_ns and duty_ns values are identical to the last
programmed ones pwm_samsung_config() returns early and skips the
hardware configuration. The same checks are now done by the PWM core so
the driver specific ones can be removed.Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Thierry Reding -
Make sure to disable the PWM clock if the PWM cannot be configured due
to the clock divider exceeding the maximum value.While at it, replace the hardcoded maximum clock divider with a defined
constant to improve code readability.Signed-off-by: Zhi Mao
Acked-by: John Crispin
Signed-off-by: Thierry Reding -
In order to save some power, do not prepare the top and main clocks
during mtk_pwm_probe(). Instead, prepare the clocks only when necessary
and also make sure to enable the clocks to match the semantics of the
common clock framework.While at it, don't explicitly disable all PWM channels in ->remove()
because all users should have done that already.Signed-off-by: Zhi Mao
Acked-by: John Crispin
Signed-off-by: Thierry Reding -
In original code, the PWM output frequency is not correct when set
bit=1 to PWMCON register.Signed-off-by: Zhi Mao
Reviewed-by: Matthias Brugger
Acked-by: John Crispin
Signed-off-by: Thierry Reding -
Fix a copy/paste error that sneaked into the Kconfig description of the
Mediatek PWM driver.Signed-off-by: Zhi Mao
Acked-by: John Crispin
Signed-off-by: Thierry Reding -
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.No functional changes.
Cc: Thierry Reding
Cc: Jonathan Hunter
Cc: linux-pwm@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Philipp Zabel
Signed-off-by: Thierry Reding -
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.No functional changes.
Cc: Thierry Reding
Cc: linux-pwm@vger.kernel.org
Signed-off-by: Philipp Zabel
Signed-off-by: Thierry Reding -
Runtime PM callbacks can be run right after runtime PM is enabled, so
make sure to set the driver data before that. This is unlikely to ever
happen with the current driver, but it doesn't hurt to follow best
practices anyway.Signed-off-by: Thierry Reding
-
I noticed most of these while reviewing another patch and thought I'd
fix them while at it. These are mostly changes to make variable types
more strict and whitespace fixups.Signed-off-by: Thierry Reding
-
Runtime PM callbacks can be run right after runtime PM is enabled, so
make sure to set the driver data before that. This is unlikely to ever
happen with the current driver, but it doesn't hurt to follow best
practices anyway.Signed-off-by: Thierry Reding
-
I noticed most of these while reviewing another patch and thought I'd
fix them while at it. These are mostly changes to make variable types
more strict and whitespace fixups.Signed-off-by: Thierry Reding
-
Make sure to unprepare the clock before returning on late probe errors.
Fixes: b388f15fd14c ("pwm: pwm-tiehrpwm: Use clk_enable/disable instead clk_prepare/unprepare.")
Signed-off-by: Johan Hovold
Signed-off-by: Thierry Reding -
Remove unbalanced RPM put at driver unbind which resulted in a negative
usage count.Fixes: 19891b20e7c2 ("pwm: pwm-tiehrpwm: PWM driver support for EHRPWM")
Signed-off-by: Johan Hovold
Signed-off-by: Thierry Reding -
66AK2G SoC has ECAP subsystem that is used as pwm-backlight provider for
display. Hence, enable pwm-tiecap driver to be built for Keystone
architecture.Signed-off-by: Vignesh R
Signed-off-by: Thierry Reding -
It adds PWM device driver for ZTE ZX family SoCs. The PWM controller
supports 4 devices with polarity configuration.The driver has been tested with pwm-regulator support to scale core
voltage via cpufreq.Signed-off-by: Shawn Guo
Signed-off-by: Thierry Reding -
This adds support for the third (optional) pwm cell to specify the
polarity, which is needed by display backlights for example.Signed-off-by: Stefan Wahren
Reviewed-by: Eric Anholt
Signed-off-by: Thierry Reding
18 Aug, 2017
7 commits
-
The rk3328 SoC supports atomic update, we could lock the configuration
of period and duty at first, after unlock is configured, the period and
duty are effective at the same time.If the polarity, period and duty need to be configured together,
the way for atomic update is "configure lock and old polarity" ->
"configure period and duty" -> "configure unlock and new polarity".Signed-off-by: David Wu
Acked-by: Rob Herring
Signed-off-by: Thierry Reding -
Just use the same PWM ops for each IP, and get rid of the ops in struct
rockchip_pwm_data, but still define the three different instances of the
struct to use common interface for each IP.Signed-off-by: David Wu
Signed-off-by: Thierry Reding -
It is usually possible to configure the polarity, cycle and duty all at
once, so that the polarity and cycle and duty are applied atomically.
Move it from rockchip_pwm_set_enable() into rockchip_pwm_config(), as
well as prepare for the next atomic update commit.Signed-off-by: David Wu
Signed-off-by: Thierry Reding -
Drop the custom hook of pwm_enable() and implement pwm_apply_v1() and
pwm_apply_v2() instead.Signed-off-by: David Wu
Signed-off-by: Thierry Reding -
It seems the rockchip_pwm_config() always returns the result 0, so
remove the judge.Signed-off-by: David Wu
Acked-by: Boris Brezillon
Signed-off-by: Thierry Reding -
New PWM module provides two individual clocks for APB clock and function
clock.Signed-off-by: David Wu
Acked-by: Rob Herring
Signed-off-by: Thierry Reding -
Remove support for the SH7372 (SH-Mobile AP4) from the renesas-tpu
driver.Commit edf4100906044225 ("ARM: shmobile: sh7372 dtsi: Remove Legacy
file") removed this SoC from the kernel in v4.1.Acked-by: Geert Uytterhoeven
Signed-off-by: Simon Horman
Signed-off-by: Thierry Reding
25 Jul, 2017
3 commits
-
Undo preparation of a clock source if vt8500_pwm_probe() is not
successful.Signed-off-by: Arvind Yadav
Signed-off-by: Thierry Reding -
The function
static void pca9685_set_sleep_mode(struct pca9685 *pca, int sleep)
takes the chip in and out of sleep mode, depending on the value of
sleep, which is interpreted as a boolean.To clarify that 'int sleep' is a boolean and not a sleep delay,
change the function interface to:
static void pca9685_set_sleep_mode(struct pca9685 *pca, bool enable)Suggested-by: Andy Shevchenko
Signed-off-by: Sven Van Asbroeck
Reviewed-by: Andy Shevchenko
Signed-off-by: Thierry Reding -
Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.Signed-off-by: Rob Herring
Cc: Thierry Reding
Cc: Carlo Caione
Cc: Kevin Hilman
Cc: linux-pwm@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Acked-by: Neil Armstrong
Signed-off-by: Thierry Reding
14 Jul, 2017
1 commit
-
…ierry.reding/linux-pwm
Pull pwm updates from Thierry Reding:
"This release cycle's changes include mostly updates and cleanups to
existing drivers along with a few cleanups to the core, documentation
and device tree bindings"* tag 'pwm/for-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
pwm: cros-ec: Fix transposed param settings
pwm: meson: Improve PWM calculation precision
dt-bindings: pwm: meson: Add compatible for gxbb ao PWMs
pwm: meson: Add compatible for the gxbb ao PWMs
pwm: sun4i: Drop legacy callbacks
pwm: sun4i: Switch to atomic PWM
pwm: sun4i: Improve hardware read out
pwm: hibvt: Constify hibvt_pwm_ops
pwm: Silently error out on EPROBE_DEFER
pwm: Standardize document format
pwm: bfin: Remove unneeded error message
dt-bindings: pwm: Update STM32 timers clock names
dt-bindings: pwm: Add R-Car M3-W device tree bindings
pwm: tegra: Set maximum pwm clock source per SoC tapeout
06 Jul, 2017
5 commits
-
The __cros_ec_pwm_get_duty() routine was transposing the insize and
outsize fields when calling cros_ec_cmd_xfer_status().The original code worked without error due to size of the two particular
parameter blocks passed to cros_ec_cmd_xfer_status(), so this change is
not fixing an actual runtime problem, just correcting the calling usage.Signed-off-by: Nick Vaccaro
Reviewed-by: Brian Norris
Signed-off-by: Thierry Reding -
When using input clocks with high rates, such as clk81 (166MHz), the
fin_ns = NSEC_PER_SEC / fin_freq can introduce a significant error.Ex: fin_freq = 166666667, NSEC_PER_SEC = 1000000000
fin_ns = 5,9999999which is, of course, rounded down to 5. This introduces an error of ~20%
on the period requested from the PWM.This patch uses ps instead of ns (and 64 bit integers) to perform the
calculation. This should give a good enough precision.Fixes: 211ed630753d ("pwm: Add support for Meson PWM Controller")
Signed-off-by: Jerome Brunet
Acked-by: Neil Armstrong
Signed-off-by: Thierry Redingsquash! pwm: meson: Improve pwm calculation precision
-
On the gxbb (and gxl) family, the PWMs of the AO domain require a
specific compatible because the possible input clocks are different
from the EE PWMs input clocks.Since the number of possible input clocks is also different, the
'num_parents' field is added to all the Meson PWM data.Acked-by: Neil Armstrong
Signed-off-by: Jerome Brunet
Reviewed-by: Kevin Hilman
Signed-off-by: Thierry Reding -
Remove the legacy callbacks .enable(), .disable(), .set_polarity() and
.config().Signed-off-by: Alexandre Belloni
Acked-by: Chen-Yu Tsai
Acked-by: Maxime Ripard
Signed-off-by: Thierry Reding