diff options
| author | Raag Jadav <[email protected]> | 2024-04-15 07:40:51 +0000 |
|---|---|---|
| committer | Uwe Kleine-König <[email protected]> | 2024-04-15 15:28:13 +0000 |
| commit | a2ac1cbc5397eb4e400efa66c3337886d9a63026 (patch) | |
| tree | 88f9862d058ad7b8a56f6e0c2c07412575360af5 /drivers/pwm/pwm-dwc.h | |
| parent | pwm: Fix setting period with #pwm-cells = <1> and of_pwm_single_xlate() (diff) | |
| download | kernel-a2ac1cbc5397eb4e400efa66c3337886d9a63026.tar.gz kernel-a2ac1cbc5397eb4e400efa66c3337886d9a63026.zip | |
pwm: dwc: allow suspend/resume for 16 channels
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]>
Diffstat (limited to 'drivers/pwm/pwm-dwc.h')
| -rw-r--r-- | drivers/pwm/pwm-dwc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-dwc.h b/drivers/pwm/pwm-dwc.h index a8b074841ae8..c6e2df5a6122 100644 --- a/drivers/pwm/pwm-dwc.h +++ b/drivers/pwm/pwm-dwc.h @@ -38,6 +38,12 @@ struct dwc_pwm_info { unsigned int size; }; +struct dwc_pwm_drvdata { + const struct dwc_pwm_info *info; + void __iomem *io_base; + struct pwm_chip *chips[]; +}; + struct dwc_pwm_ctx { u32 cnt; u32 cnt2; |
