- 02 Nov, 2017 1 commit
-
-
Greg Kroah-Hartman authored
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 <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by:
Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by:
Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 04 Sep, 2017 2 commits
-
-
Fabrice Gasnier authored
Add support for single PWM channel on Low-Power Timer, that can be found on some STM32 platforms. Signed-off-by:
Fabrice Gasnier <fabrice.gasnier@st.com> Acked-by:
Thierry Reding <thierry.reding@gmail.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Wolfram Sang authored
include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Acked-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by:
Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by:
Mark Brown <broonie@kernel.org> Acked-by:
Sebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by:
Jonathan Cameron <jic23@kernel.org> Acked-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by:
Kishon Vijay Abraham I <kishon@ti.com> Acked-by:
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by:
Thierry Reding <thierry.reding@gmail.com> Acked-by:
Tony Lindgren <tony@atomide.com> Acked-by:
Daniel Thompson <daniel.thompson@linaro.org> Acked-by:
Linus Walleij <linus.walleij@linaro.org> Acked-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
- 21 Aug, 2017 17 commits
-
-
Bartlomiej Zolnierkiewicz authored
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 <b.zolnierkie@samsung.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Bartlomiej Zolnierkiewicz authored
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 <b.zolnierkie@samsung.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Zhi Mao authored
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 <zhi.mao@mediatek.com> Acked-by:
John Crispin <john@phrozen.org> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Zhi Mao authored
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 <zhi.mao@mediatek.com> Acked-by:
John Crispin <john@phrozen.org> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Zhi Mao authored
In original code, the PWM output frequency is not correct when set bit<3>=1 to PWMCON register. Signed-off-by:
Zhi Mao <zhi.mao@mediatek.com> Reviewed-by:
Matthias Brugger <matthias.bgg@gmail.com> Acked-by:
John Crispin <john@phrozen.org> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Zhi Mao authored
Fix a copy/paste error that sneaked into the Kconfig description of the Mediatek PWM driver. Signed-off-by:
Zhi Mao <zhi.mao@mediatek.com> Acked-by:
John Crispin <john@phrozen.org> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Philipp Zabel authored
Commit a53e35db ("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 <thierry.reding@gmail.com> Cc: Jonathan Hunter <jonathanh@nvidia.com> Cc: linux-pwm@vger.kernel.org Cc: linux-tegra@vger.kernel.org Signed-off-by:
Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Philipp Zabel authored
Commit a53e35db ("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 <thierry.reding@gmail.com> Cc: linux-pwm@vger.kernel.org Signed-off-by:
Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Thierry Reding authored
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 <thierry.reding@gmail.com>
-
Thierry Reding authored
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 <thierry.reding@gmail.com>
-
Thierry Reding authored
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 <thierry.reding@gmail.com>
-
Thierry Reding authored
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 <thierry.reding@gmail.com>
-
Johan Hovold authored
Make sure to unprepare the clock before returning on late probe errors. Fixes: b388f15f ("pwm: pwm-tiehrpwm: Use clk_enable/disable instead clk_prepare/unprepare.") Signed-off-by:
Johan Hovold <johan@kernel.org> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Johan Hovold authored
Remove unbalanced RPM put at driver unbind which resulted in a negative usage count. Fixes: 19891b20 ("pwm: pwm-tiehrpwm: PWM driver support for EHRPWM") Signed-off-by:
Johan Hovold <johan@kernel.org> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Vignesh R authored
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 <vigneshr@ti.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Shawn Guo authored
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 <shawn.guo@linaro.org> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Stefan Wahren authored
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 <stefan.wahren@i2se.com> Reviewed-by:
Eric Anholt <eric@anholt.net> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
- 18 Aug, 2017 7 commits
-
-
David Wu authored
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 <david.wu@rock-chips.com> Acked-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
David Wu authored
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 <david.wu@rock-chips.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
David Wu authored
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 <david.wu@rock-chips.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
David Wu authored
Drop the custom hook of pwm_enable() and implement pwm_apply_v1() and pwm_apply_v2() instead. Signed-off-by:
David Wu <david.wu@rock-chips.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
David Wu authored
It seems the rockchip_pwm_config() always returns the result 0, so remove the judge. Signed-off-by:
David Wu <david.wu@rock-chips.com> Acked-by:
Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
David Wu authored
New PWM module provides two individual clocks for APB clock and function clock. Signed-off-by:
David Wu <david.wu@rock-chips.com> Acked-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Simon Horman authored
Remove support for the SH7372 (SH-Mobile AP4) from the renesas-tpu driver. Commit edf41009 ("ARM: shmobile: sh7372 dtsi: Remove Legacy file") removed this SoC from the kernel in v4.1. Acked-by:
Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by:
Simon Horman <horms+renesas@verge.net.au> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
- 25 Jul, 2017 3 commits
-
-
Arvind Yadav authored
Undo preparation of a clock source if vt8500_pwm_probe() is not successful. Signed-off-by:
Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Sven Van Asbroeck authored
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 <andriy.shevchenko@linux.intel.com> Signed-off-by:
Sven Van Asbroeck <thesven73@gmail.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Rob Herring authored
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 <robh@kernel.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Carlo Caione <carlo@caione.org> Cc: Kevin Hilman <khilman@baylibre.com> Cc: linux-pwm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Acked-by:
Neil Armstrong <narmstrong@baylibre.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
- 06 Jul, 2017 9 commits
-
-
Nick Vaccaro authored
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 <nvaccaro@chromium.org> Reviewed-by:
Brian Norris <briannorris@chromium.org> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Jerome Brunet authored
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,9999999 which 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: 211ed630 ("pwm: Add support for Meson PWM Controller") Signed-off-by:
Jerome Brunet <jbrunet@baylibre.com> Acked-by:
Neil Armstrong <narmstrong@baylibre.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com> squash! pwm: meson: Improve pwm calculation precision
-
Jerome Brunet authored
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 <narmstrong@baylibre.com> Signed-off-by:
Jerome Brunet <jbrunet@baylibre.com> Reviewed-by:
Kevin Hilman <khilman@baylibre.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Alexandre Belloni authored
Remove the legacy callbacks .enable(), .disable(), .set_polarity() and .config(). Signed-off-by:
Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by:
Chen-Yu Tsai <wens@csie.org> Acked-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Alexandre Belloni authored
Switch the driver to atomic PWM. This makes it easier to wait a proper amount of time when changing the duty cycle before disabling the channel (main use case is switching the duty cycle to 0 before disabling). Signed-off-by:
Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Alexandre Belloni authored
Implement .get_state instead of only reading the polarity at probe time. This allows to get the proper state, period and duty cycle. Signed-off-by:
Alexandre Belloni <alexandre.belloni@free-electrons.com> Reviewed-by:
Chen-Yu Tsai <wens@csie.org> Acked-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Arvind Yadav authored
File size before: text data bss dec hex filename 1510 296 0 1806 70e drivers/pwm/pwm-hibvt.o File size After adding 'const': text data bss dec hex filename 1606 192 0 1798 706 drivers/pwm/pwm-hibvt.o Signed-off-by:
Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Jerome Brunet authored
In of_pwm_get(), if we fail to get the PWM chip due to probe deferal, we shouldn't print an error message. Just be silent in this case. Signed-off-by:
Jerome Brunet <jbrunet@baylibre.com> Reviewed-by:
Andreas Färber <afaerber@suse.de> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
Markus Elfring authored
Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdfSigned-off-by:
Markus Elfring <elfring@users.sourceforge.net> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-
- 13 Jun, 2017 1 commit
-
-
Laxman Dewangan authored
The PWM hardware IP is taped-out with different maximum frequency on different SoCs. From HW team: Before Tegra186, it is 48 MHz. In Tegra186, it is 102 MHz. Add support to limit the clock source frequency to the maximum IP supported frequency. Provide these values via SoC chipdata. Signed-off-by:
Laxman Dewangan <ldewangan@nvidia.com> Acked-by:
Jon Hunter <jonathanh@nvidia.com> Signed-off-by:
Thierry Reding <thierry.reding@gmail.com>
-