diff options
author | Hans de Goede <hdegoede@redhat.com> | 2018-10-12 06:12:26 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2018-10-12 06:31:01 -0400 |
commit | 9dc419b6c7e4bb67c0966758c1e4c9a9c9a4309d (patch) | |
tree | 25514e4ff65a58bababed218d30770048f9b46a0 | |
parent | 1688c8717118f37191d824862a006c8373d261de (diff) |
pwm: lpss: Move struct pwm_lpss_chip definition to the header file
Move struct pwm_lpss_chip definition from pwm-lpss.c to pwm-lpss.h,
so that the pci/platform drivers can access the info member
(struct pwm_lpss_boardinfo *).
This is a preparation patch for adding platform specific quirks, which
the drivers need access to, to pwm_lpss_boardinfo.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-rw-r--r-- | drivers/pwm/pwm-lpss.c | 9 | ||||
-rw-r--r-- | drivers/pwm/pwm-lpss.h | 9 |
2 files changed, 8 insertions, 10 deletions
diff --git a/drivers/pwm/pwm-lpss.c b/drivers/pwm/pwm-lpss.c index 4721a264bac2..e602835fd6de 100644 --- a/drivers/pwm/pwm-lpss.c +++ b/drivers/pwm/pwm-lpss.c | |||
@@ -32,15 +32,6 @@ | |||
32 | /* Size of each PWM register space if multiple */ | 32 | /* Size of each PWM register space if multiple */ |
33 | #define PWM_SIZE 0x400 | 33 | #define PWM_SIZE 0x400 |
34 | 34 | ||
35 | #define MAX_PWMS 4 | ||
36 | |||
37 | struct pwm_lpss_chip { | ||
38 | struct pwm_chip chip; | ||
39 | void __iomem *regs; | ||
40 | const struct pwm_lpss_boardinfo *info; | ||
41 | u32 saved_ctrl[MAX_PWMS]; | ||
42 | }; | ||
43 | |||
44 | static inline struct pwm_lpss_chip *to_lpwm(struct pwm_chip *chip) | 35 | static inline struct pwm_lpss_chip *to_lpwm(struct pwm_chip *chip) |
45 | { | 36 | { |
46 | return container_of(chip, struct pwm_lpss_chip, chip); | 37 | return container_of(chip, struct pwm_lpss_chip, chip); |
diff --git a/drivers/pwm/pwm-lpss.h b/drivers/pwm/pwm-lpss.h index 7a4238ad1fcb..8f029ed263af 100644 --- a/drivers/pwm/pwm-lpss.h +++ b/drivers/pwm/pwm-lpss.h | |||
@@ -16,7 +16,14 @@ | |||
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/pwm.h> | 17 | #include <linux/pwm.h> |
18 | 18 | ||
19 | struct pwm_lpss_chip; | 19 | #define MAX_PWMS 4 |
20 | |||
21 | struct 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 | ||
21 | struct pwm_lpss_boardinfo { | 28 | struct pwm_lpss_boardinfo { |
22 | unsigned long clk_rate; | 29 | unsigned long clk_rate; |