.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Intel Low Power Subsystem PWM controller driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2014, Intel Corporation |
---|
5 | 6 | * |
---|
6 | 7 | * 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. |
---|
11 | 8 | */ |
---|
12 | 9 | |
---|
13 | 10 | #ifndef __PWM_LPSS_H |
---|
.. | .. |
---|
16 | 13 | #include <linux/device.h> |
---|
17 | 14 | #include <linux/pwm.h> |
---|
18 | 15 | |
---|
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 | +}; |
---|
20 | 23 | |
---|
21 | 24 | struct pwm_lpss_boardinfo { |
---|
22 | 25 | unsigned long clk_rate; |
---|
23 | 26 | unsigned int npwm; |
---|
24 | 27 | unsigned long base_unit_bits; |
---|
25 | 28 | 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; |
---|
26 | 34 | }; |
---|
27 | 35 | |
---|
28 | 36 | struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r, |
---|
29 | 37 | const struct pwm_lpss_boardinfo *info); |
---|
30 | 38 | 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); |
---|
33 | 39 | |
---|
34 | 40 | #endif /* __PWM_LPSS_H */ |
---|