summaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-lpss.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-11-02 14:22:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-11-02 14:22:45 -0400
commitfcc37f76a995cc08546b88b83f9bb5da11307a0b (patch)
treefcb04dbf8d476070dbaadc5cbd72106e6ec0a2b6 /drivers/pwm/pwm-lpss.h
parent0b21f21ae0d746b385a827aceb84cb26c551eb94 (diff)
parent2153bbc12f77fb2203276befc0f0dddbfb023bb1 (diff)
Merge tag 'pwm/for-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
Pull pwm updates from Thierry Reding: "This series contains a number of improvements to existing drivers, such as LPSS. Some drivers, such as renesas-tpu and rcar get support for more SoC generations. To round things off this fixes an issue with the sysfs interface" * tag 'pwm/for-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: lpss: Only set update bit if we are actually changing the settings pwm: lpss: Force runtime-resume on suspend on Cherry Trail pwm: Enable TI ECAP driver for ARCH_K3 dt-bindings: pwm: tiecap: Add TI AM654 SoC specific compatible dt-bindings: pwm: rcar: Add r8a774a1 support pwm: Send a uevent on the pwmchip device upon channel sysfs (un)export Revert "pwm: Set class for exported channels in sysfs" dt-bindings: pwm: renesas-tpu: Document r8a7744 support dt-bindings: pwm: rcar: Add r8a7744 support dt-bindings: pwm: renesas: tpu: Document R8A779{7|8}0 bindings dt-bindings: pwm: renesas: pwm-rcar: Document R8A779{7|8}0 bindings dt-bindings: pwm: renesas: tpu: Fix "compatible" prop description pwm: Use SPDX identifier for Renesas drivers pwm: lpss: Add get_state callback pwm: lpss: Release runtime-pm reference from the driver's remove callback pwm: lpss: Check PWM powerstate after resume on Cherry Trail devices pwm: lpss: Move struct pwm_lpss_chip definition to the header file pwm: lpss: Add ACPI HID for second PWM controller on Cherry Trail devices ACPI / PM: Export acpi_device_get_power() for use by modular build drivers pwm: tegra: Remove gratuituous blank line
Diffstat (limited to 'drivers/pwm/pwm-lpss.h')
-rw-r--r--drivers/pwm/pwm-lpss.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-lpss.h b/drivers/pwm/pwm-lpss.h
index 7a4238ad1fcb..3236be835bd9 100644
--- a/drivers/pwm/pwm-lpss.h
+++ b/drivers/pwm/pwm-lpss.h
@@ -16,13 +16,25 @@
16#include <linux/device.h> 16#include <linux/device.h>
17#include <linux/pwm.h> 17#include <linux/pwm.h>
18 18
19struct pwm_lpss_chip; 19#define MAX_PWMS 4
20
21struct pwm_lpss_chip {
22 struct pwm_chip chip;
23 void __iomem *regs;
24 const struct pwm_lpss_boardinfo *info;
25 u32 saved_ctrl[MAX_PWMS];
26};
20 27
21struct pwm_lpss_boardinfo { 28struct pwm_lpss_boardinfo {
22 unsigned long clk_rate; 29 unsigned long clk_rate;
23 unsigned int npwm; 30 unsigned int npwm;
24 unsigned long base_unit_bits; 31 unsigned long base_unit_bits;
25 bool bypass; 32 bool bypass;
33 /*
34 * On some devices the _PS0/_PS3 AML code of the GPU (GFX0) device
35 * messes with the PWM0 controllers state,
36 */
37 bool other_devices_aml_touches_pwm_regs;
26}; 38};
27 39
28struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r, 40struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r,