hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/pwm/pwm-lpss.h
....@@ -1,13 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Intel Low Power Subsystem PWM controller driver
34 *
45 * Copyright (C) 2014, Intel Corporation
56 *
67 * Derived from the original pwm-lpss.c
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
118 */
129
1310 #ifndef __PWM_LPSS_H
....@@ -16,19 +13,28 @@
1613 #include <linux/device.h>
1714 #include <linux/pwm.h>
1815
19
-struct pwm_lpss_chip;
16
+#define MAX_PWMS 4
17
+
18
+struct pwm_lpss_chip {
19
+ struct pwm_chip chip;
20
+ void __iomem *regs;
21
+ const struct pwm_lpss_boardinfo *info;
22
+};
2023
2124 struct pwm_lpss_boardinfo {
2225 unsigned long clk_rate;
2326 unsigned int npwm;
2427 unsigned long base_unit_bits;
2528 bool bypass;
29
+ /*
30
+ * On some devices the _PS0/_PS3 AML code of the GPU (GFX0) device
31
+ * messes with the PWM0 controllers state,
32
+ */
33
+ bool other_devices_aml_touches_pwm_regs;
2634 };
2735
2836 struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r,
2937 const struct pwm_lpss_boardinfo *info);
3038 int pwm_lpss_remove(struct pwm_lpss_chip *lpwm);
31
-int pwm_lpss_suspend(struct device *dev);
32
-int pwm_lpss_resume(struct device *dev);
3339
3440 #endif /* __PWM_LPSS_H */