Uwe Kleine-König [Wed, 14 Feb 2024 09:32:32 +0000 (10:32 +0100)]
pwm: sifive: Make use of devm_pwmchip_alloc() function
This prepares the pwm-sifive 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:31 +0000 (10:32 +0100)]
pwm: sifive: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:30 +0000 (10:32 +0100)]
pwm: sifive: Prepare removing pwm_chip from driver data
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct pwm_sifive_ddata. Use the pwm_chip as driver
data instead of the pwm_sifive_ddata to get access to the pwm_chip in
pwm_sifive_remove() without using ddata->chip. In the clock rate
notifier it's not possible to get the pwm_chip without adding a pointer
to this to struct pwm_sifive_ddata. Instead of that add a parent device
pointer which is all that is needed there.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:29 +0000 (10:32 +0100)]
pwm: sifive: Simplify code to determine the pwmchip's parent device
There is already a pointer to the pwmchip, make use of it directly
instead of using the struct pwm_sifive_ddata *ddata just obtained from
it. This also has the advantage of not using struct
pwm_sifive_ddata::chip any more which will be dropped soon.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:28 +0000 (10:32 +0100)]
pwm: samsung: Make use of devm_pwmchip_alloc() function
This prepares the pwm-samsung 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:25 +0000 (10:32 +0100)]
pwm: samsung: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:24 +0000 (10:32 +0100)]
pwm: samsung: Change prototype of helpers to prepare further changes
This prepares the driver for further changes that will make it harder to
determine the pwm_chip from a given samsung_pwm_chip. To just not have
to do that, rework pwm_samsung_calc_tin() and pwm_samsung_parse_dt take
a pwm_chip. Also use the pwm_chip as driver data instead of the
samsung_pwm_chip.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:23 +0000 (10:32 +0100)]
pwm: samsung: Simplify code to determine the pwmchip's parent device
There is already a pointer to the pwmchip, make use of it directly
instead of using the struct samsung_pwm_chip *our_chip just obtained
from it. This also has the advantage of not using struct
samsung_pwm_chip::chip any more which will be dropped soon.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:22 +0000 (10:32 +0100)]
pwm: rz-mtu3: Make use of devm_pwmchip_alloc() function
This prepares the pwm-rz-mtu3 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:21 +0000 (10:32 +0100)]
pwm: rz-mtu3: Prepare removing pwm_chip from driver data
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct rz_mtu3_pwm_chip. Use the pwm_chip as driver
data and devm callback parameter instead of the rz_mtu3_pwm_chip to get
access to the pwm_chip in various functions without using
rz_mtu3_pwm->chip.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:20 +0000 (10:32 +0100)]
pwm: rz-mtu3: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:19 +0000 (10:32 +0100)]
pwm: rockchip: Make use of devm_pwmchip_alloc() function
This prepares the pwm-rockchip 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:18 +0000 (10:32 +0100)]
pwm: rochchip: Prepare removing pwm_chip from driver data
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct rockchip_pwm_chip. Use the pwm_chip as driver
data instead of the rockchip_pwm_chip to get access to the pwm_chip in
rockchip_pwm_remove() without using pc->chip.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:17 +0000 (10:32 +0100)]
pwm: renesas-tpu: Make use of devm_pwmchip_alloc() function
This prepares the pwm-renesas-tpu 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_tpu_device() helper macro to a static inline to get
some type safety.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:16 +0000 (10:32 +0100)]
pwm: rcar: Make use of devm_pwmchip_alloc() function
This prepares the pwm-rcar 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:15 +0000 (10:32 +0100)]
pwm: rcar: Prepare removing pwm_chip from driver data
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct rcar_pwm_chip. Use the pwm_chip as driver
data instead of the rcar_pwm_chip to get access to the pwm_chip in
the .remove() callbacks without using rcar_pwm->chip.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:14 +0000 (10:32 +0100)]
pwm: rcar: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:13 +0000 (10:32 +0100)]
pwm: raspberrypi-poe: Make use of devm_pwmchip_alloc() function
This prepares the pwm-raspberrypi-poe 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:12 +0000 (10:32 +0100)]
pwm: raspberrypi-poe: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:11 +0000 (10:32 +0100)]
pwm: pxa: Make use of devm_pwmchip_alloc() function
This prepares the pwm-pxa 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:10 +0000 (10:32 +0100)]
pwm: pca9685: Make use of devm_pwmchip_alloc() function
This prepares the pwm-pca9685 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:09 +0000 (10:32 +0100)]
pwm: pca9685: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:08 +0000 (10:32 +0100)]
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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:07 +0000 (10:32 +0100)]
pwm: omap-dmtimer: Make use of devm_pwmchip_alloc() function
This prepares the pwm-omap-dmtimer 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:06 +0000 (10:32 +0100)]
pwm: omap-dmtimer: Prepare removing pwm_chip from driver data
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct pwm_omap_dmtimer_chip. Use the pwm_chip as
driver data instead of the pwm_omap_dmtimer_chip to get access to the
pwm_chip in pwm_omap_dmtimer_remove() without using omap->chip.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:05 +0000 (10:32 +0100)]
pwm: omap-dmtimer: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:04 +0000 (10:32 +0100)]
pwm: ntxec: Make use of devm_pwmchip_alloc() function
This prepares the pwm-ntxec 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:03 +0000 (10:32 +0100)]
pwm: mxs: Make use of devm_pwmchip_alloc() function
This prepares the pwm-mxs 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_mxs_pwm_chip() helper macro to a static inline to
get some type safety.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:02 +0000 (10:32 +0100)]
pwm: mtk-disp: Make use of devm_pwmchip_alloc() function
This prepares the pwm-mtk-disp 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:01 +0000 (10:32 +0100)]
pwm: mtk-disp: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:32:00 +0000 (10:32 +0100)]
pwm: microchip-core: Make use of devm_pwmchip_alloc() function
This prepares the pwm-microchip-core 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:59 +0000 (10:31 +0100)]
pwm: meson: Make use of devm_pwmchip_alloc() function
This prepares the pwm-meson 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:58 +0000 (10:31 +0100)]
pwm: meson: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:57 +0000 (10:31 +0100)]
pwm: meson: Change prototype of a few helpers to prepare further changes
This prepares the driver for further changes that will make it harder to
determine the pwm_chip from a given meson_pwm. To just not have to do
that, rework meson_pwm_calc(), meson_pwm_enable(), meson_pwm_disable()
and meson_pwm_init_channels() to take a pwm_chip.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:56 +0000 (10:31 +0100)]
pwm: mediatek: Make use of devm_pwmchip_alloc() function
This prepares the pwm-mediatek 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:55 +0000 (10:31 +0100)]
pwm: mediatek: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:54 +0000 (10:31 +0100)]
pwm: lpss-*: Make use of devm_pwmchip_alloc() function
This prepares the pwm-lpss drivers 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:53 +0000 (10:31 +0100)]
pwm: lpss-*: Don't set driver data
The drivers don't make use of driver data, neither in the variant
pci_get_drvdata() nor as platform_get_drvdata() nor as
dev_get_drvdata(). Drop setting driver data accordingly.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:52 +0000 (10:31 +0100)]
pwm: lpss: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:51 +0000 (10:31 +0100)]
pwm: lpc32xx: Make use of devm_pwmchip_alloc() function
This prepares the pwm-lpc32xx 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_lpc32xx_pwm_chip() helper macro to a static inline
to get some type safety.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:50 +0000 (10:31 +0100)]
pwm: lpc18xx-sct: Make use of devm_pwmchip_alloc() function
This prepares the pwm-lpc18xx-sct 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:49 +0000 (10:31 +0100)]
pwm: lpc18xx-sct: Prepare removing pwm_chip from driver data
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct lpc18xx_pwm_chip. Use the pwm_chip as driver
data instead of the lpc18xx_pwm_chip to get access to the pwm_chip in
lpc18xx_pwm_remove() without using lpc18xx_pwm->chip.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:48 +0000 (10:31 +0100)]
pwm: lpc18xx-sct: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:47 +0000 (10:31 +0100)]
pwm: lpc18xx-sct: Drop hardly used member from driver private data
The device pointer is only used once in lpc18xx_pwm_request(). There the
pwm_chip is available, too, which has a pointer to the same structure.
Replace the usage accordingly and drop the then write-only member
variable.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:46 +0000 (10:31 +0100)]
pwm: lp3943: Make use of devm_pwmchip_alloc() function
This prepares the pwm-lp3943 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:45 +0000 (10:31 +0100)]
pwm: keembay: Make use of devm_pwmchip_alloc() function
This prepares the pwm-keembay 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:44 +0000 (10:31 +0100)]
pwm: jz4740: Make use of devm_pwmchip_alloc() function
This prepares the pwm-jz4740 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:43 +0000 (10:31 +0100)]
pwm: jz4740: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:42 +0000 (10:31 +0100)]
pwm: jz4740: Change prototype of a helper to prepare further changes
This prepares the driver for further changes that will make it harder to
determine the pwm_chip from a given jz4740_pwm_chip. To just not have to
do that, rework jz4740_pwm_can_use_chn() to take a pwm_chip.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:41 +0000 (10:31 +0100)]
pwm: iqs620a: Make use of devm_pwmchip_alloc() function
This prepares the pwm-iqs620a 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:40 +0000 (10:31 +0100)]
pwm: iqs620a: Prepare removing pwm_chip from driver data
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct iqs620_pwm_private. The only two functions
that make use of struct iqs620_pwm_private::chip (apart from the probe
function that is handled later when converting to pwmchip_alloc()) only
use the chip's device pointer. Introduce such a pointer in driver data
and use that instead.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:38 +0000 (10:31 +0100)]
pwm: intel-lgm: Make use of devm_pwmchip_alloc() function
This prepares the pwm-intel-lgm 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:37 +0000 (10:31 +0100)]
pwm: imx-tpm: Make use of devm_pwmchip_alloc() function
This prepares the pwm-tmp 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:36 +0000 (10:31 +0100)]
pwm: imx27: Make use of devm_pwmchip_alloc() function
This prepares the pwm-imx27 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_pwm_imx27_chip() helper macro to a static inline to
get some type safety.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:35 +0000 (10:31 +0100)]
pwm: imx27: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:34 +0000 (10:31 +0100)]
pwm: imx1: Make use of devm_pwmchip_alloc() function
This prepares the pwm-imx1 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_pwm_imx1_chip() helper macro to a static inline to
get some type safety.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:33 +0000 (10:31 +0100)]
pwm: img: Make use of devm_pwmchip_alloc() function
This prepares the pwm-img 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:32 +0000 (10:31 +0100)]
pwm: img: Prepare removing pwm_chip from driver data
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct img_pwm_chip. Use the pwm_chip as driver data
instead of the img_pwm_chip to get access to the pwm_chip in
img_pwm_remove() and the PM callbacks without using imgchip->chip.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:31 +0000 (10:31 +0100)]
pwm: img: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:29 +0000 (10:31 +0100)]
pwm: hibvt: Make use of devm_pwmchip_alloc() function
This prepares the pwm-hibvt 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.
Most functions use "hi_pwm_chip" as name. Make use of this in the
remaining two functions (that used "pwm_chip" before, which isn't
optimal as this is a type name, too).
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:27 +0000 (10:31 +0100)]
pwm: fsl-ftm: Make use of devm_pwmchip_alloc() function
This prepares the pwm-fsl-ftm 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:26 +0000 (10:31 +0100)]
pwm: fsl-ftm: Prepare removing pwm_chip from driver data
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct fsl_pwm_chip. Use the pwm_chip as driver data
instead of the fsl_pwm_chip to get access to the pwm_chip in
fsl_pwm_suspend() and fsl_pwm_resume() without using fpc->chip.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:25 +0000 (10:31 +0100)]
pwm: fsl-ftm: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:24 +0000 (10:31 +0100)]
pwm: fsl-ftm: Change prototype of a helper to prepare further changes
This prepares the driver for further changes that will make it harder to
determine the pwm_chip from a given fsl_pwm_chip. To just not have to
do that, rework fsl_pwm_apply_config() to take a pwm_chip.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:23 +0000 (10:31 +0100)]
pwm: ep93xx: Make use of devm_pwmchip_alloc() function
This prepares the pwm-ep93xx 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:22 +0000 (10:31 +0100)]
pwm: ep93xx: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:21 +0000 (10:31 +0100)]
pwm: dwc-core: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:20 +0000 (10:31 +0100)]
pwm: dwc: Make use of devm_pwmchip_alloc() function
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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:19 +0000 (10:31 +0100)]
pwm: dwc: Prepare removing pwm_chip from driver data
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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:18 +0000 (10:31 +0100)]
pwm: cros-ec: Make use of devm_pwmchip_alloc() function
This prepares the pwm-cros-ec 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.
The probe function had to be changed a bit because the number of PWMs
must be determined before allocation of the pwm_chip and its private
data now.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:17 +0000 (10:31 +0100)]
pwm: cros-ec: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:16 +0000 (10:31 +0100)]
pwm: cros-ec: Change prototype of helpers to prepare further changes
pwm_chip allocation and registration is about to change. For that the
number of PWM devices must be known earlier in cros_ec_pwm_probe(). So
make cros_ec_pwm_get_duty() and cros_ec_num_pwms() independent of
struct cros_ec_pwm_device which is only available later.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:15 +0000 (10:31 +0100)]
pwm: crc: Make use of devm_pwmchip_alloc() function
This prepares the pwm-crc 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:14 +0000 (10:31 +0100)]
pwm: crc: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:13 +0000 (10:31 +0100)]
pwm: crc: Simplify code to determine the pwmchip's parent device
There is already a pointer to the pwmchip, make use of it directly
instead of using the struct crystalcove_pwm *crc_pwm just obtained from
it. This also has the advantage of not using struct
crystalcove_pwm::chip any more which will be dropped soon.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:12 +0000 (10:31 +0100)]
pwm: clps711x: Make use of devm_pwmchip_alloc() function
This prepares the pwm-clps711x 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:11 +0000 (10:31 +0100)]
pwm: clk: Make use of devm_pwmchip_alloc() function
This prepares the pwm-clk 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_pwm_clk_chip() helper macro to a static inline to
get some type safety.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:10 +0000 (10:31 +0100)]
pwm: clk: Prepare removing pwm_chip from driver data
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct pwm_clk_chip. Use the pwm_chip as driver data
instead of the pwm_clk_chip to get access to the pwm_chip in
pwm_clk_remove() without using pcchip->chip.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:09 +0000 (10:31 +0100)]
pwm: brcmstb: Make use of devm_pwmchip_alloc() function
This prepares the pwm-brcmstb 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:08 +0000 (10:31 +0100)]
pwm: berlin: Make use of devm_pwmchip_alloc() function
This prepares the pwm-berlin 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:07 +0000 (10:31 +0100)]
pwm: berlin: Prepare removing pwm_chip from driver data
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct berlin_pwm_chip. Use the pwm_chip as driver
data instead of the berlin_pwm_chip to get access to the pwm_chip in
berlin_pwm_suspend() and berlin_pwm_resume() without using bpc->chip.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:06 +0000 (10:31 +0100)]
pwm: bcm-kona: Make use of devm_pwmchip_alloc() function
This prepares the pwm-bcm-kona 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:05 +0000 (10:31 +0100)]
pwm: bcm-kona: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:04 +0000 (10:31 +0100)]
pwm: bcm-iproc: Make use of devm_pwmchip_alloc() function
This prepares the pwm-bcm-iproc 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:03 +0000 (10:31 +0100)]
pwm: bcm2835: Make use of devm_pwmchip_alloc() function
This prepares the pwm-bcm2835 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:02 +0000 (10:31 +0100)]
pwm: atmel-tcb: Make use of devm_pwmchip_alloc() function
This prepares the pwm-atmel-tcb 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:01 +0000 (10:31 +0100)]
pwm: atmel-tcb: Prepare removing pwm_chip from driver data
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct atmel_tcb_pwm_chip. Use the pwm_chip as driver
data instead of the atmel_tcb_pwm_chip to get access to the pwm_chip in
the .suspend() and .resume() callbacks and atmel_tcb_pwm_remove()
without using tcbpwm->chip.
Uwe Kleine-König [Wed, 14 Feb 2024 09:31:00 +0000 (10:31 +0100)]
pwm: atmel-tcb: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:30:59 +0000 (10:30 +0100)]
pwm: atmel-hlcdc: Make use of devm_pwmchip_alloc() function
This prepares the pwm-atmel-hlcdc 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:30:58 +0000 (10:30 +0100)]
pwm: atmel-hlcdc: Prepare removing pwm_chip from driver data
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct atmel_hlcdc_pwm. Use the pwm_chip as driver
data instead of the atmel_hlcdc_pwm to get access to the pwm_chip in
the .suspend() and .resume() callbacks and atmel_hlcdc_pwm_remove()
without using atmel->chip.
Uwe Kleine-König [Wed, 14 Feb 2024 09:30:57 +0000 (10:30 +0100)]
pwm: atmel: Make use of devm_pwmchip_alloc() function
This prepares the pwm-atmel 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:30:56 +0000 (10:30 +0100)]
pwm: atmel: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this
driver in the same commit as struct pwm_chip::dev, use the accessor
function provided for exactly this purpose.
Uwe Kleine-König [Wed, 14 Feb 2024 09:30:55 +0000 (10:30 +0100)]
pwm: atmel: Change prototype of a helper to prepare further changes
This prepares the driver for further changes that will make it harder to
determine the pwm_chip from a given atmel_pwm_chip. To just not have to
do that, rework atmel_pwm_enable_clk_if_on() to take a pwm_chip.
Uwe Kleine-König [Wed, 14 Feb 2024 09:30:54 +0000 (10:30 +0100)]
pwm: apple: Make use of devm_pwmchip_alloc() function
This prepares the pwm-apple 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.
Uwe Kleine-König [Wed, 14 Feb 2024 09:30:53 +0000 (10:30 +0100)]
pwm: ab8500: Make use of devm_pwmchip_alloc() function
This prepares the pwm-ab8500 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.