aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2015-10-20 09:53:06 -0400
committerThierry Reding <thierry.reding@gmail.com>2015-11-06 08:26:28 -0500
commit87219cb47e5ccfb932177e960c495d475bc16add (patch)
treeba076fff85c674fe96778b6e5fc33bebe602218a
parent4e11f5acb25b0b8eb937c726ade319b988fe3664 (diff)
pwm: lpss: Support all four PWMs on Intel Broxton
Intel Broxton has similar PWM than Intel Braswell but instead of one it has four PWMs included in one PCI/ACPI device. This patch adds support for all the four PWMs and changes the PCI part of the driver to use 'pwm_lpss_bxt_info' instead. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-rw-r--r--drivers/pwm/pwm-lpss-pci.c4
-rw-r--r--drivers/pwm/pwm-lpss.c7
-rw-r--r--drivers/pwm/pwm-lpss.h1
3 files changed, 10 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-lpss-pci.c b/drivers/pwm/pwm-lpss-pci.c
index 45042c1b2046..6432a0b97701 100644
--- a/drivers/pwm/pwm-lpss-pci.c
+++ b/drivers/pwm/pwm-lpss-pci.c
@@ -44,10 +44,10 @@ static void pwm_lpss_remove_pci(struct pci_dev *pdev)
44} 44}
45 45
46static const struct pci_device_id pwm_lpss_pci_ids[] = { 46static const struct pci_device_id pwm_lpss_pci_ids[] = {
47 { PCI_VDEVICE(INTEL, 0x0ac8), (unsigned long)&pwm_lpss_bsw_info}, 47 { PCI_VDEVICE(INTEL, 0x0ac8), (unsigned long)&pwm_lpss_bxt_info},
48 { PCI_VDEVICE(INTEL, 0x0f08), (unsigned long)&pwm_lpss_byt_info}, 48 { PCI_VDEVICE(INTEL, 0x0f08), (unsigned long)&pwm_lpss_byt_info},
49 { PCI_VDEVICE(INTEL, 0x0f09), (unsigned long)&pwm_lpss_byt_info}, 49 { PCI_VDEVICE(INTEL, 0x0f09), (unsigned long)&pwm_lpss_byt_info},
50 { PCI_VDEVICE(INTEL, 0x1ac8), (unsigned long)&pwm_lpss_bsw_info}, 50 { PCI_VDEVICE(INTEL, 0x1ac8), (unsigned long)&pwm_lpss_bxt_info},
51 { PCI_VDEVICE(INTEL, 0x2288), (unsigned long)&pwm_lpss_bsw_info}, 51 { PCI_VDEVICE(INTEL, 0x2288), (unsigned long)&pwm_lpss_bsw_info},
52 { PCI_VDEVICE(INTEL, 0x2289), (unsigned long)&pwm_lpss_bsw_info}, 52 { PCI_VDEVICE(INTEL, 0x2289), (unsigned long)&pwm_lpss_bsw_info},
53 { }, 53 { },
diff --git a/drivers/pwm/pwm-lpss.c b/drivers/pwm/pwm-lpss.c
index e7392bdfdd18..df03b50f20dd 100644
--- a/drivers/pwm/pwm-lpss.c
+++ b/drivers/pwm/pwm-lpss.c
@@ -52,6 +52,13 @@ const struct pwm_lpss_boardinfo pwm_lpss_bsw_info = {
52}; 52};
53EXPORT_SYMBOL_GPL(pwm_lpss_bsw_info); 53EXPORT_SYMBOL_GPL(pwm_lpss_bsw_info);
54 54
55/* Broxton */
56const struct pwm_lpss_boardinfo pwm_lpss_bxt_info = {
57 .clk_rate = 19200000,
58 .npwm = 4,
59};
60EXPORT_SYMBOL_GPL(pwm_lpss_bxt_info);
61
55static inline struct pwm_lpss_chip *to_lpwm(struct pwm_chip *chip) 62static inline struct pwm_lpss_chip *to_lpwm(struct pwm_chip *chip)
56{ 63{
57 return container_of(chip, struct pwm_lpss_chip, chip); 64 return container_of(chip, struct pwm_lpss_chip, chip);
diff --git a/drivers/pwm/pwm-lpss.h b/drivers/pwm/pwm-lpss.h
index 180438368e0a..e8cf337ae1d1 100644
--- a/drivers/pwm/pwm-lpss.h
+++ b/drivers/pwm/pwm-lpss.h
@@ -25,6 +25,7 @@ struct pwm_lpss_boardinfo {
25 25
26extern const struct pwm_lpss_boardinfo pwm_lpss_byt_info; 26extern const struct pwm_lpss_boardinfo pwm_lpss_byt_info;
27extern const struct pwm_lpss_boardinfo pwm_lpss_bsw_info; 27extern const struct pwm_lpss_boardinfo pwm_lpss_bsw_info;
28extern const struct pwm_lpss_boardinfo pwm_lpss_bxt_info;
28 29
29struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r, 30struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r,
30 const struct pwm_lpss_boardinfo *info); 31 const struct pwm_lpss_boardinfo *info);