summaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-dwc-core.c
diff options
context:
space:
mode:
authorRaag Jadav <raag.jadav@intel.com>2024-04-15 09:40:51 +0200
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2024-04-15 17:28:13 +0200
commita2ac1cbc5397eb4e400efa66c3337886d9a63026 (patch)
tree88f9862d058ad7b8a56f6e0c2c07412575360af5 /drivers/pwm/pwm-dwc-core.c
parentpwm: Fix setting period with #pwm-cells = <1> and of_pwm_single_xlate() (diff)
downloadlinux-a2ac1cbc5397eb4e400efa66c3337886d9a63026.tar.xz
linux-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 <raag.jadav@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240415074051.14681-1-raag.jadav@intel.com Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'drivers/pwm/pwm-dwc-core.c')
-rw-r--r--drivers/pwm/pwm-dwc-core.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-dwc-core.c b/drivers/pwm/pwm-dwc-core.c
index 043736972cb9..c8425493b95d 100644
--- a/drivers/pwm/pwm-dwc-core.c
+++ b/drivers/pwm/pwm-dwc-core.c
@@ -172,7 +172,6 @@ struct pwm_chip *dwc_pwm_alloc(struct device *dev)
dwc->clk_ns = 10;
chip->ops = &dwc_pwm_ops;
- dev_set_drvdata(dev, chip);
return chip;
}
EXPORT_SYMBOL_GPL(dwc_pwm_alloc);