pwm: pca9685: Prepare removing pwm_chip from driver data
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 14 Feb 2024 09:32:08 +0000 (10:32 +0100)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 19 Feb 2024 10:04:12 +0000 (11:04 +0100)
commitda5a8c555c52e36040c7ccea6a9136349eb16f18
tree21b44782aac9ca975a72f4977c28923d01790130
parentf988b8196322b11c9b49c8df56aa4fada8a6b96a
pwm: pca9685: Prepare removing pwm_chip from driver data

This prepares the driver for further changes that will drop struct
pwm_chip chip from struct pca9685. Use the pwm_chip as i2c client data
and gpiochip data instead of the pca9685 to get access to the
pwm_chip in pca9685_pwm_remove(), pca9685_pwm_runtime_suspend(),
pca9685_pwm_runtime_resume(), pca9685_pwm_gpio_request() and the gpio
callbacks without using pca->chip. Also the prototype for various helper
functions is changed to take a pwm_chip instead of a pca9685 for the
same reason.

Link: https://lore.kernel.org/r/e87b378545cee15a52f0d410fcceebf671ab90e0.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
drivers/pwm/pwm-pca9685.c