Merge branches 'for-4.20/upstream-fixes', 'for-4.21/core', 'for-4.21/hid-asus', ...
[linux-2.6-block.git] / drivers / pwm / pwm-lpss.h
index 7a4238ad1fcb1f25390032019170759c6666ae83..3236be835bd9c948b929cd066ae74feaff2eed73 100644 (file)
 #include <linux/device.h>
 #include <linux/pwm.h>
 
-struct pwm_lpss_chip;
+#define MAX_PWMS                       4
+
+struct pwm_lpss_chip {
+       struct pwm_chip chip;
+       void __iomem *regs;
+       const struct pwm_lpss_boardinfo *info;
+       u32 saved_ctrl[MAX_PWMS];
+};
 
 struct pwm_lpss_boardinfo {
        unsigned long clk_rate;
        unsigned int npwm;
        unsigned long base_unit_bits;
        bool bypass;
+       /*
+        * On some devices the _PS0/_PS3 AML code of the GPU (GFX0) device
+        * messes with the PWM0 controllers state,
+        */
+       bool other_devices_aml_touches_pwm_regs;
 };
 
 struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r,