aboutsummaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-dwc.h
AgeCommit message (Collapse)AuthorFilesLines
2024-04-15pwm: dwc: allow suspend/resume for 16 channelsRaag Jadav1-0/+6
With 16 channel pwm support, we're registering two instances of pwm_chip with 8 channels each. We need to update PM functions to use both instances of pwm_chip during power state transitions. Introduce struct dwc_pwm_drvdata and use it as driver_data, which will maintain both instances of pwm_chip along with dwc_pwm_info and allow us to use them inside suspend/resume handles. Fixes: ebf2c89eb95e ("pwm: dwc: Add 16 channel support for Intel Elkhart Lake") Signed-off-by: Raag Jadav <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]>
2024-02-26pwm: dwc: Add 16 channel support for Intel Elkhart LakeRaag Jadav1-0/+5
Intel Elkhart Lake PSE includes two instances of PWM as a single PCI function with 8 channels each. Add support for the remaining channels. Signed-off-by: Raag Jadav <[email protected]> Tested-by: Jarkko Nikula <[email protected]> Tested-by: Lakshmi Sowjanya D <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]>
2024-02-19pwm: dwc: Make use of devm_pwmchip_alloc() functionUwe Kleine-König1-2/+5
This prepares the pwm-dwc driver to further changes of the pwm core outlined in the commit introducing devm_pwmchip_alloc(). There is no intended semantical change and the driver should behave as before. Also convert the to_dwc_pwm() helper macro to a static inline to get some type safety. Link: https://lore.kernel.org/r/64e64a9a8644600d51b234ad9bcae951b5748998.1707900770.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König <[email protected]>
2024-02-19pwm: dwc: Prepare removing pwm_chip from driver dataUwe Kleine-König1-1/+1
This prepares the driver for further changes that will drop struct pwm_chip chip from struct dwc_pwm. Use the pwm_chip as driver data and return value of dwc_pwm_alloc() instead of the dwc_pwm to get access to the pwm_chip in dwc_pwm_probe() and dwc_pwm_suspend() without using dwc->chip. Thanks to Raag Jadav for providing a hunk of this patch that Uwe missed during creation of this patch. Link: https://lore.kernel.org/r/008ce5ab84b8e3baa3e81ab6d36dbb0e4be5c319.1707900770.git.u.kleine-koenig@pengutronix.de Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]>
2023-10-13pwm: dwc: make timer clock configurableBen Dooks1-1/+1
Add a configurable clock base rate for the pwm as when being built for non-PCI the block may be sourced from an internal clock. Signed-off-by: Ben Dooks <[email protected]> Reviewed-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2023-10-13pwm: dwc: split pci out of core driverBen Dooks1-0/+60
Moving towards adding non-pci support for the driver, move the pci parts out of the core into their own module. This is partly due to the module_driver() code only being allowed once in a module and also to avoid a number of #ifdef if we build a single file in a system without pci support. Signed-off-by: Ben Dooks <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>