Uwe Kleine-König
dda59d2424
pwm: xilinx: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-xilinx 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.
Link: https://lore.kernel.org/r/7cbc32771e94103b8c1c817cfdd613d7a2fc01b9.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:28 +01:00
Uwe Kleine-König
4caa211522
pwm: xilinx: Prepare removing pwm_chip from driver data
...
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct xilinx_pwm_device. Use the pwm_chip as driver
data instead of the xilinx_pwm_device to get access to the pwm_chip in
xilinx_pwm_remove() without using xilinx_pwm->chip.
Link: https://lore.kernel.org/r/738b9929c1d13bde64050f8bbc4ce8d85f58cc7a.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:27 +01:00
Uwe Kleine-König
ae8635e99c
pwm: vt8500: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-vt8500 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_vt8500_chip() helper macro to a static inline to
get some type safety.
Link: https://lore.kernel.org/r/b203c4448db23ebad1165b7bce43ac41468c4e89.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:27 +01:00
Uwe Kleine-König
68e34b3e66
pwm: vt8500: 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.
Link: https://lore.kernel.org/r/c3c45a08f2ccb8bb13b4042c73f93064876586eb.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:27 +01:00
Uwe Kleine-König
9767db3337
pwm: vt8500: Introduce a local pwm_chip variable in .probe()
...
This simplifies converting the driver to pwmchip_alloc() as there is only
a single code line left that makes use of struct vt8500_chip::chip.
Link: https://lore.kernel.org/r/7d903b608609d46cf1ee1e06530f516f42af1ebb.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:27 +01:00
Uwe Kleine-König
58803adcb7
pwm: vt8500: 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 vt8500_chip. To just not have to do
that, rework vt8500_pwm_busy_wait() to take a pwm_chip.
Link: https://lore.kernel.org/r/fb384c550b359e7707219f87872bcf36482875ff.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:27 +01:00
Uwe Kleine-König
7fe09324df
pwm: visconti: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-visconti 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.
Link: https://lore.kernel.org/r/24e779de69365686bb004742cd8f07cbda131212.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:27 +01:00
Uwe Kleine-König
b860648da1
pwm: twl-led: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-twl-led 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.
Link: https://lore.kernel.org/r/5bac90addb3a178ef958a2a524c6ec7e3eea3e6a.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:27 +01:00
Uwe Kleine-König
e3ad4f23f9
pwm: twl-led: 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.
Link: https://lore.kernel.org/r/43c35b7116a637501b51ac93ec24c00ea92ee1af.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:27 +01:00
Uwe Kleine-König
12fa8803b6
pwm: twl: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-twol 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.
Link: https://lore.kernel.org/r/c65e796d46df71cd8d0d0941921997b9501f1cb3.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:27 +01:00
Uwe Kleine-König
6a20d5ed0e
pwm: twl: 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.
Link: https://lore.kernel.org/r/f11beb6b3a398d1257219a635a78ed0b02263978.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:27 +01:00
Uwe Kleine-König
de830057d7
pwm: tiehrpwm: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-tiecap 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.
Link: https://lore.kernel.org/r/62fbac428cae0942f8e88234bf249537fcd890a3.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:26 +01:00
Uwe Kleine-König
e003a687aa
pwm: tiehrpwm: 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.
Link: https://lore.kernel.org/r/9badd116d0e26a5656b222c5b4adad7e111a53c7.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:26 +01:00
Uwe Kleine-König
4e1c8593e5
pwm: tiehrpwm: 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 ehrpwm_pwm_chip. To just not have to
do that, rework ehrpwm_pwm_save_context() and
ehrpwm_pwm_restore_context() take a pwm_chip. Also use the pwm_chip as
driver data instead of the ehrpwm_pwm_chip.
Link: https://lore.kernel.org/r/79052207cdf71f0882ae13fe1a192ef6f6dba35b.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:26 +01:00
Uwe Kleine-König
b514a1b29d
pwm: tiehrpwm: 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 ehrpwm_pwm_chip *ddata just obtained from
it. This also has the advantage of not using struct
ehrpwm_pwm_chip::chip any more which will be dropped soon.
Link: https://lore.kernel.org/r/b2b06a3aabf8c04969d59ddf7ba565b303855878.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:26 +01:00
Uwe Kleine-König
76b4accb7c
pwm: tiecap: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-tegra 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.
Link: https://lore.kernel.org/r/af7846109c0df225126c8e5cd186b89ace70afc0.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:26 +01:00
Uwe Kleine-König
ba60fbf92d
pwm: tiecap: 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.
Link: https://lore.kernel.org/r/ae92e06b49437ca7e768b1f8b405170e33948a70.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:26 +01:00
Uwe Kleine-König
02aa760d29
pwm: tiecap: 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 ecap_pwm_chip. To just not have to
do that, rework ecap_pwm_save_context() and ecap_pwm_restore_context
take a pwm_chip. Also use the pwm_chip as driver data instead of the
ecap_pwm_chip.
Link: https://lore.kernel.org/r/ed031f201ff52c6b298de2dc81b06aad3a0207f8.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:26 +01:00
Uwe Kleine-König
62f59c107a
pwm: tiecap: 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 ecap_pwm_chip *pc just obtained from
it. This also has the advantage of not using struct ecap_pwm_chip::chip
any more which will be dropped soon.
Link: https://lore.kernel.org/r/628f4b8c4ba1321075fc1dff70453a1c79ffb814.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:26 +01:00
Uwe Kleine-König
7550ebf04c
pwm: tegra: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-tegra 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.
Link: https://lore.kernel.org/r/8719be3d57b0b5cf575b312e5ff41fe0717e3a43.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:26 +01:00
Uwe Kleine-König
aa37f83f7b
pwm: tegra: Prepare removing pwm_chip from driver data
...
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct tegra_pwm_chip. Use the pwm_chip as driver
data instead of the tegra_pwm_chip to get access to the pwm_chip in
tegra_pwm_remove() without using pc->chip.
Link: https://lore.kernel.org/r/2813c63bf1317dee808f4c5c4a9411999f2d5746.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:26 +01:00
Uwe Kleine-König
b662c6e809
pwm: tegra: Drop duplicated tracking of the parent device
...
The pwmchip stores a pointer to the parent device, so there is no need
to store another copy in driver private data. Drop struct
tegra_pwm_chip::dev and use the pwm_chip's parent pointer instead.
Link: https://lore.kernel.org/r/225f4bfcb15fb69eb818ddb71d623157c447180a.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:25 +01:00
Uwe Kleine-König
11ee0a124c
pwm: sunplus: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-sunplus 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.
Link: https://lore.kernel.org/r/192be7e428eff17dd922c9c0d0d168225b89bb34.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:25 +01:00
Uwe Kleine-König
362e3f883d
pwm: sun4i: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-sun4i 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.
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/9d175b4e27878618cef2e75b6ecbf01ad5d18164.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:25 +01:00
Uwe Kleine-König
2eb3ff5f4c
pwm: sun4i: Consistently name driver data sun4ichip
...
The driver uses three different names for variables of type
sun4i_pwm_chip:
$ git grep 'struct sun4i_pwm_chip \*' v6.8-rc1 -- drivers/pwm/pwm-sun4i.c
v6.8-rc1:drivers/pwm/pwm-sun4i.c:static inline struct sun4i_pwm_chip *to_sun4i_pwm_chip(struct pwm_chip *chip)
v6.8-rc1:drivers/pwm/pwm-sun4i.c:static inline u32 sun4i_pwm_readl(struct sun4i_pwm_chip *chip,
v6.8-rc1:drivers/pwm/pwm-sun4i.c:static inline void sun4i_pwm_writel(struct sun4i_pwm_chip *chip,
v6.8-rc1:drivers/pwm/pwm-sun4i.c: struct sun4i_pwm_chip *sun4i_pwm = to_sun4i_pwm_chip(chip);
v6.8-rc1:drivers/pwm/pwm-sun4i.c:static int sun4i_pwm_calculate(struct sun4i_pwm_chip *sun4i_pwm,
v6.8-rc1:drivers/pwm/pwm-sun4i.c: struct sun4i_pwm_chip *sun4i_pwm = to_sun4i_pwm_chip(chip);
v6.8-rc1:drivers/pwm/pwm-sun4i.c: struct sun4i_pwm_chip *sun4ichip;
v6.8-rc1:drivers/pwm/pwm-sun4i.c: struct sun4i_pwm_chip *sun4ichip = platform_get_drvdata(pdev);
"chip" is usually reserved for variables of type struct pwm_chip. So
pick sun4ichip as common name which better matches the type name than
sun4i_pwm.
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/705f54a13b59fff50eaa345d8b1e0c691345b996.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:25 +01:00
Uwe Kleine-König
2d7224f49d
pwm: sun4i: Prepare removing pwm_chip from driver data
...
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct sun4i_pwm_chip. Use the pwm_chip as driver
data instead of the sun4i_pwm_chip to get access to the pwm_chip in
sun4i_pwm_remove() without using sun4ichip->chip.
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/f8e3fb96fe341ba0a4bed982aa731c5c7c355b83.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:25 +01:00
Uwe Kleine-König
d6ada1d4ca
pwm: sun4i: 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.
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/3ddaec73f3abefb45625d0a469026fa8d13da8c0.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:25 +01:00
Uwe Kleine-König
f20fb5c858
pwm: stmpe: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-stmpe 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.
Link: https://lore.kernel.org/r/7e3dbf3b70126038c0ba16331ca8c07cab575bd3.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:25 +01:00
Uwe Kleine-König
c3492db288
pwm: stmpe: 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.
Link: https://lore.kernel.org/r/2136fbdf9b1e6bac479b935b439e2be73a003b97.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:25 +01:00
Uwe Kleine-König
5d481e0742
pwm: stm32-lp: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-stm32-lp 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.
Link: https://lore.kernel.org/r/04af7b3d00bc932dd025200a3bf74527c29ca47a.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:25 +01:00
Uwe Kleine-König
0e89637a4f
pwm: stm32-lp: 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.
Link: https://lore.kernel.org/r/d79148ed49389c657b72df05758032be2b516ceb.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:24 +01:00
Uwe Kleine-König
8f5e2dcbe2
pwm: stm32-lp: Prepare removing pwm_chip from driver data
...
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct stm32_pwm_lp. Use the pwm_chip as driver
data instead of the stm32_pwm_lp to get access to the pwm_chip in
stm32_pwm_lp_suspend() without using priv->chip.
Link: https://lore.kernel.org/r/df47d1aff9b529c9a4762b6ba339a18cecba1497.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:24 +01:00
Uwe Kleine-König
3e4224a98b
pwm: stm32-lp: 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 stm32_pwm_lp *priv just obtained from
it. This also has the advantage of not using struct stm32_pwm_lp::chip
any more which will be dropped soon.
Link: https://lore.kernel.org/r/9ad2399e1a683a6344b12d7f70498393b8f8b9de.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:24 +01:00
Uwe Kleine-König
174821b7be
pwm: stm32: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-stm32 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.
Link: https://lore.kernel.org/r/59e5dfff2b878cc8590e286572672e4f10e35380.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:24 +01:00
Uwe Kleine-König
e315bf700b
pwm: stm32: Change prototype of helper that detects npwm to prepare further changes
...
When the stm32 pwm driver is converted to pwmchip_alloc(), the number of
available PWM lines must be known before the driver private data can be
allocated. So rework the helper function that determines this number to
not take the driver private data struct as input parameter.
Link: https://lore.kernel.org/r/13d4d3e90a9ee1bcd04674dfdc16f242615b8320.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:24 +01:00
Uwe Kleine-König
f29430710d
pwm: stm32: Prepare removing pwm_chip from driver data
...
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct stm32_pwm. Use the pwm_chip as driver
data instead of the stm32_pwm to get access to the pwm_chip in
stm32_pwm_suspend() without using priv->chip.
Link: https://lore.kernel.org/r/3db96cd915d9d8fc350a7193c0d55dd109b1f035.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:24 +01:00
Uwe Kleine-König
fbde128940
pwm: stm32: 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 stm32_pwm. To just not have to do
that, rework stm32_pwm_raw_capture() to take a pwm_chip.
Link: https://lore.kernel.org/r/33790c64563cb0434d7156d96f189c6037b3eb0b.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:24 +01:00
Uwe Kleine-König
da665d25f4
pwm: stm32: 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 stm32_pwm *priv just obtained from it. This
also has the advantage of not using struct stm32_pwm::chip any more
which will be dropped soon.
Link: https://lore.kernel.org/r/54ace92a3c02d22f15a79c7ecf00c29f28386a33.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:24 +01:00
Uwe Kleine-König
3f7dc7d863
pwm: sti: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-sti 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.
Link: https://lore.kernel.org/r/da6fbb5e98e988400e037b0d2ac0c1749822d702.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:22 +01:00
Uwe Kleine-König
54272761ce
pwm: sti: Prepare removing pwm_chip from driver data
...
This prepares the driver for further changes that will drop struct
pwm_chip chip from struct sti_pwm_chip. Use the pwm_chip as driver data
instead of the sti_pwm_chip to get access to the pwm_chip in
sti_pwm_remove() without using pc->chip.
Link: https://lore.kernel.org/r/56d53372aacff6871df4d6c6779c9dac94592696.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:21 +01:00
Uwe Kleine-König
f2075c0b1a
pwm: sprd: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-sprd 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.
Tested-by: Chunyan Zhang <zhang.lyra@gmail.com>
Link: https://lore.kernel.org/r/543213f44686ee72d8f88897bf2ca616e837ae44.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:39:10 +01:00
Uwe Kleine-König
aac1b805a6
pwm: sprd: Drop duplicated tracking of the parent device
...
The pwmchip stores a pointer to the parent device, so there is no need
to store another copy in driver private data. Drop struct
sprd_pwm_chip::dev and use the pwm_chip's parent pointer instead.
Tested-by: Chunyan Zhang <zhang.lyra@gmail.com>
Link: https://lore.kernel.org/r/f85771f4bf659c0fdee30cf117b87fd877bad5e4.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-22 14:38:54 +01:00
Uwe Kleine-König
0f14aca0dc
pwm: sprd: Rework how the available channels are counted
...
To be able to convert the sprd driver to pwmchip_alloc() the number of
PWM channels must be known when the driver private data is allocated. So
make sprd_pwm_clk_init() not take a struct sprd_pwm_chip. On the plus
side this allows to drop a member of said driver private data.
Reviewed-by: Chunyan Zhang <zhang.lyra@gmail.com>
Link: https://lore.kernel.org/r/682cbbafbfc4982383d66c3871bb9e52d4e03195.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:15 +01:00
Uwe Kleine-König
792bc12573
pwm: spear: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-spear 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.
Link: https://lore.kernel.org/r/c67e3f26435a8fa047ad6887803dbcb9c1e032ee.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:15 +01:00
Uwe Kleine-König
57014f0726
pwm: sl28cpld: Make use of devm_pwmchip_alloc() function
...
This prepares the pwm-sl28cpld 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.
Reviewed-by: Michael Walle <mwalle@kernel.org>
Link: https://lore.kernel.org/r/ee687086f7fc78264fac723f65ddc96cb7518c03.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:15 +01:00
Uwe Kleine-König
554d9acae4
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.
Link: https://lore.kernel.org/r/30a4cacafe2c323f2531dd1c1126f0bf0fe5e03c.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:15 +01:00
Uwe Kleine-König
c4f4af7d79
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.
Link: https://lore.kernel.org/r/170c3c61707992cbc57dce31f70c168fcd3dbe51.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:15 +01:00
Uwe Kleine-König
bb472da214
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.
Link: https://lore.kernel.org/r/b7b7985f4dc746f6a36c5048d428c4ed0a2d42dc.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:15 +01:00
Uwe Kleine-König
c63f0bbbc9
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.
Link: https://lore.kernel.org/r/78da5070d3ff5767da6f1c053d069c1e25229375.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:14 +01:00
Uwe Kleine-König
6727fdf748
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.
Link: https://lore.kernel.org/r/f188e68bdea8d5a24277a10c8c9a6350a9c246ac.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:14 +01:00
Uwe Kleine-König
f83c29f43d
pwm: samsung: Simplify using dev_err_probe()
...
dev_err_probe() simplifies and improves the idiom "emit error message +
return error code". Apply it accordingly.
Link: https://lore.kernel.org/r/27a55fc05eb13802c9eddc600d0460e279388999.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:14 +01:00
Uwe Kleine-König
ef2092b5af
pwm: samsung: Simplify by using devm functions in probe
...
With using devm_clk_get_enabled() and devm_pwmchip_add() the
.remove_new() callback can be dropped and an error path in .probe()
simplified.
Link: https://lore.kernel.org/r/d46ec625c14c460039082f74ec8ca3084b7c8e3a.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:14 +01:00
Uwe Kleine-König
87b63f73e2
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.
Link: https://lore.kernel.org/r/421ee291a065aeae7a1552f22da4173313e789ad.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:14 +01:00
Uwe Kleine-König
70efbf8891
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.
Link: https://lore.kernel.org/r/33ea7d7fbf3be4a542ae8aafa213470c5831487e.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:14 +01:00
Uwe Kleine-König
56696c1c04
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.
Link: https://lore.kernel.org/r/4e8400a42979b6be0b80dff5ae964d8e9d6232eb.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:14 +01:00
Uwe Kleine-König
a629a77e9d
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.
Link: https://lore.kernel.org/r/b05ffb9bcaf4ddb6305f8505715a5542805e3227.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:14 +01:00
Uwe Kleine-König
dfec83b4fe
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.
Link: https://lore.kernel.org/r/707f2aced94a235f244022f10202ce7730b1168b.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:14 +01:00
Uwe Kleine-König
27262029e9
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.
Link: https://lore.kernel.org/r/90e6b5d5215425f3a5ff4468ba8aedf3d387f812.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:14 +01:00
Uwe Kleine-König
2528428ec8
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.
Link: https://lore.kernel.org/r/61a3f48710e3e795beb2e496c8c673bbc0f6c932.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:14 +01:00
Uwe Kleine-König
77e94c37db
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.
Link: https://lore.kernel.org/r/301657442c578cc8d330ad2b07463d59fed4bff6.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:13 +01:00
Uwe Kleine-König
3a284e0eae
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.
Link: https://lore.kernel.org/r/aac4a9546b0f474d991144aa925c83cfa7abe2c0.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:13 +01:00
Uwe Kleine-König
f0d907605d
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.
Link: https://lore.kernel.org/r/a37a167364366b6cbe2dd299dce02731706213b2.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:13 +01:00
Uwe Kleine-König
aa1b9f1677
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.
Link: https://lore.kernel.org/r/e588e3ccdd0ac1c9c3f3a79b3e52112f83f9d71c.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:13 +01:00
Uwe Kleine-König
ba0c182e5f
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.
Link: https://lore.kernel.org/r/8b33a106c84517430d90ee4a8dcb878d0fc3bad5.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:13 +01:00
Uwe Kleine-König
05aa788c06
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.
Link: https://lore.kernel.org/r/4654a6438ab618574afc3bb73bf402df7c254ee2.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:13 +01:00
Uwe Kleine-König
fd20a3e1fc
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.
Link: https://lore.kernel.org/r/6758bcddb150f2c4353469937f1a68ecb87465ed.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:13 +01:00
Uwe Kleine-König
8aebd7225d
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.
Link: https://lore.kernel.org/r/bee8ae436a9dfb8539637cbb7269a208f787a62a.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:13 +01:00
Uwe Kleine-König
37e0f5800b
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.
Link: https://lore.kernel.org/r/4cb65adc92414a901dd3c0b8412de075196a3c54.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:13 +01:00
Uwe Kleine-König
20666a774d
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.
Link: https://lore.kernel.org/r/14b6ec2bdaa7050b9f49a69f35edef731fd84c25.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:13 +01:00
Uwe Kleine-König
da5a8c555c
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>
2024-02-19 11:04:12 +01:00
Uwe Kleine-König
f988b81963
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.
Link: https://lore.kernel.org/r/78d1448b0fd1136b010f629feffb9d89c853e472.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:12 +01:00
Uwe Kleine-König
623a9594b2
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.
Link: https://lore.kernel.org/r/809672026f3d583ba4fc4bd92b525951df172106.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:12 +01:00
Uwe Kleine-König
7fc81e231f
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.
Link: https://lore.kernel.org/r/6681ebd024c2b8b2315ca3da5cac612e5f433d63.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:12 +01:00
Uwe Kleine-König
8c01031abe
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.
Link: https://lore.kernel.org/r/c0c9d6cb3a6662268e660f4f6c89b32268ecf019.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:12 +01:00
Uwe Kleine-König
2ae7039fa7
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.
Link: https://lore.kernel.org/r/39203f3bfbf4e97654db78bdc7e0c9a2b72c1368.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:12 +01:00
Uwe Kleine-König
ad0828825e
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.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/a70bf253dc41c61d9b901423710c97f235e372c3.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:12 +01:00
Uwe Kleine-König
f580fa6c84
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.
Link: https://lore.kernel.org/r/93ba7ef22f8d26f17e64326249d5da54ab8014ea.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:12 +01:00
Uwe Kleine-König
f962b190fe
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.
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/c6660b655c1d4c9d79280030e24090a4a4c5dd8b.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:12 +01:00
Uwe Kleine-König
28ecf9bd5e
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.
Link: https://lore.kernel.org/r/6cc57880e910e6ffd8df15bc4a41c42fe9523293.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:12 +01:00
Uwe Kleine-König
e369035a98
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.
Link: https://lore.kernel.org/r/02d5f32001c4d0817fa79f5831cfd16b7e345f00.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:12 +01:00
Uwe Kleine-König
b647dcfde1
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.
Link: https://lore.kernel.org/r/157084e1dd464da0097edba880240868c1c0b27e.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:11 +01:00
Uwe Kleine-König
1c8090d7b3
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.
Link: https://lore.kernel.org/r/513b2037c00ebf2f3a69472f4b99adaf4fb40d83.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:11 +01:00
Uwe Kleine-König
f1b1e74731
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.
Link: https://lore.kernel.org/r/819996ee175bec0ab71acc385c78e7233617e136.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:11 +01:00
Uwe Kleine-König
05013062a8
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.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/b567ab5dd992e361eb884fa6c2cac11be9c7dde3.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:11 +01:00
Uwe Kleine-König
11265c637e
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.
Link: https://lore.kernel.org/r/25671b7562d96b67fd05b3fa6fc76538ddf5914f.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:11 +01:00
Uwe Kleine-König
0f83bfd80d
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.
Link: https://lore.kernel.org/r/77617ba84bed7807a05779109432a292dd79f72f.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:11 +01:00
Uwe Kleine-König
ac4b44cac5
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.
Link: https://lore.kernel.org/r/ef26238772ee9ca455a49e9b976a4f66654b26f7.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:11 +01:00
Uwe Kleine-König
1dc7dcba0b
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.
Link: https://lore.kernel.org/r/d480891340e927705843cd09e5777d4daaa6c9cc.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:11 +01:00
Uwe Kleine-König
6a79dc8342
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.
Link: https://lore.kernel.org/r/b7bf8c421ff754ec3e985ec6235f4ddd6e5e27a4.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:11 +01:00
Uwe Kleine-König
c60b92133f
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.
Link: https://lore.kernel.org/r/e4fb330c8dbf8fecd365afe3f8b33f8c7952eb38.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:11 +01:00
Uwe Kleine-König
8d1cdd2f2d
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.
Link: https://lore.kernel.org/r/427a719a24dd7ff5ebbac3e260a1773c094c7489.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:10 +01:00
Uwe Kleine-König
e637713989
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.
Link: https://lore.kernel.org/r/44a2d303bb511e49c6db8aaedd17986c3aedde44.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:10 +01:00
Uwe Kleine-König
15527ec252
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.
Link: https://lore.kernel.org/r/f65c27bf0a1f9ba4e5dbb115ff628860163ff8e0.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:10 +01:00
Uwe Kleine-König
5d0237a7b0
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.
Acked-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/14a081c097b4e7c7f346ca6557ece8d16ad5749d.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:10 +01:00
Uwe Kleine-König
4eeb33229c
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.
Link: https://lore.kernel.org/r/86b8a362f1e50c5b95c43e056d03ee5ca66d1641.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:10 +01:00
Uwe Kleine-König
cebf107de5
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.
Link: https://lore.kernel.org/r/83b826f0bf58b93f26d3bc30b1a957f84eedf41a.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:10 +01:00
Uwe Kleine-König
1b6691680b
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.
Link: https://lore.kernel.org/r/85cb0e73baadd76ede364abc4b57ee72000880e5.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:10 +01:00
Uwe Kleine-König
07b61160e4
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.
Link: https://lore.kernel.org/r/e6b1636c0d26d8bcb02a66b2963e2cc394014d76.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:10 +01:00
Uwe Kleine-König
8a18b97332
pwm: iqs620a: Create a wrapper for converting a pwm_chip to driver data
...
There is no semantic change. The new function just implements what was
open-coded twice in the driver before.
Link: https://lore.kernel.org/r/cc7ab547b4c4b79456b548aa72205bcf4476db8c.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:10 +01:00
Uwe Kleine-König
a1d81abc03
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.
Link: https://lore.kernel.org/r/3b2be81b046fe2213736ad37153131d5f4c859f5.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:10 +01:00
Uwe Kleine-König
abf6569d64
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.
Link: https://lore.kernel.org/r/5de5d53295fa445d58a79f83421dd3406166c3c6.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:10 +01:00
Uwe Kleine-König
dcef3929e0
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.
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/3da748c80e9bbe29e7c119190dbc4bd67d159f22.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:09 +01:00
Uwe Kleine-König
175f53a78c
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.
Link: https://lore.kernel.org/r/a8e3e3b3ea0684c9b289999c6f09eedbc2520f54.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:09 +01:00
Uwe Kleine-König
5911fc37c7
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.
Link: https://lore.kernel.org/r/c6995e0d281255a7514edf9f25a561302dcaf65f.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:09 +01:00
Uwe Kleine-König
12ca0c331a
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.
Link: https://lore.kernel.org/r/d99e00af2ff09cd3587d9a7c51dc8e0e13f85208.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:09 +01:00
Uwe Kleine-König
b097d28e33
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.
Link: https://lore.kernel.org/r/2ddf76d127f69eca7d9faa6475091e432e890ac9.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:09 +01:00
Uwe Kleine-König
2231f6fe83
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.
Link: https://lore.kernel.org/r/bbea7e6e4c5412c6b0773faa9f165b6311cd53b6.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:09 +01:00
Uwe Kleine-König
9bd3e889d2
pwm: img: Drop write-only variable from driver private data
...
struct img_pwm_chip::dev is only assigned to, but the member variable is
never used. So drop it.
Link: https://lore.kernel.org/r/7b7de753caa453c7fe591228c9a45d0baf8b5878.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:09 +01:00
Uwe Kleine-König
19248d867b
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.
Link: https://lore.kernel.org/r/7b12504b4128969bdc783bf2bff1ecc63b7c7bd4.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:09 +01:00
Uwe Kleine-König
c8cf591113
pwm: hibvt: Consistently name driver data hi_pwm_chip
...
The driver uses two different names for variables of type
hibvt_pwm_chip:
$ git grep 'struct hibvt_pwm_chip \*' v6.8-rc1 drivers/pwm/pwm-hibvt.c
v6.8-rc1:drivers/pwm/pwm-hibvt.c:static inline struct hibvt_pwm_chip *to_hibvt_pwm_chip(struct pwm_chip *chip)
v6.8-rc1:drivers/pwm/pwm-hibvt.c: struct hibvt_pwm_chip *hi_pwm_chip = to_hibvt_pwm_chip(chip);
v6.8-rc1:drivers/pwm/pwm-hibvt.c: struct hibvt_pwm_chip *hi_pwm_chip = to_hibvt_pwm_chip(chip);
v6.8-rc1:drivers/pwm/pwm-hibvt.c: struct hibvt_pwm_chip *hi_pwm_chip = to_hibvt_pwm_chip(chip);
v6.8-rc1:drivers/pwm/pwm-hibvt.c: struct hibvt_pwm_chip *hi_pwm_chip = to_hibvt_pwm_chip(chip);
v6.8-rc1:drivers/pwm/pwm-hibvt.c: struct hibvt_pwm_chip *hi_pwm_chip = to_hibvt_pwm_chip(chip);
v6.8-rc1:drivers/pwm/pwm-hibvt.c: struct hibvt_pwm_chip *hi_pwm_chip = to_hibvt_pwm_chip(chip);
v6.8-rc1:drivers/pwm/pwm-hibvt.c: struct hibvt_pwm_chip *pwm_chip;
v6.8-rc1:drivers/pwm/pwm-hibvt.c: struct hibvt_pwm_chip *pwm_chip;
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).
Link: https://lore.kernel.org/r/66ff5a9b00889ff0c576afc783424478fbbb9853.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:09 +01:00
Uwe Kleine-König
2e8d68c02e
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.
Link: https://lore.kernel.org/r/b3c75dea5b2944402b14944fdf71a5db0e26cbd7.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:09 +01:00
Uwe Kleine-König
097779f157
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.
Link: https://lore.kernel.org/r/2cf27e2929505c05f84501d6fce96f23eba03fc3.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:08 +01:00
Uwe Kleine-König
74836319c2
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.
Link: https://lore.kernel.org/r/131f976a8f876a88e2a940f5acf6aa1d81833b89.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:08 +01:00
Uwe Kleine-König
e80c1aa6ae
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.
Link: https://lore.kernel.org/r/5f0e88afe25d6a218032891a34f963980814b760.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:08 +01:00
Uwe Kleine-König
3f681ff7ba
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.
Link: https://lore.kernel.org/r/9420eeca1eb18fada4a15c897f60696b7b22b532.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:08 +01:00
Uwe Kleine-König
ecb4ec5ab8
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.
Link: https://lore.kernel.org/r/3bf56f20bc7f749e5a353cdcfad11dd1ba573381.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:08 +01:00
Uwe Kleine-König
4839f5a7c4
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.
Link: https://lore.kernel.org/r/5240ba82ac227e3723678041bd69b9c7a9e3db43.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:08 +01:00
Uwe Kleine-König
1647e5065b
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.
Link: https://lore.kernel.org/r/64e64a9a8644600d51b234ad9bcae951b5748998.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:04:08 +01:00
Uwe Kleine-König
aaa3cc29a7
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.
Link: https://lore.kernel.org/r/008ce5ab84b8e3baa3e81ab6d36dbb0e4be5c319.1707900770.git.u.kleine-koenig@pengutronix.de
Link: https://lore.kernel.org/r/20240219033835.11369-2-raag.jadav@intel.com
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-19 11:02:57 +01:00
Uwe Kleine-König
452be9421e
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.
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/b0afe9e25340f0a274ff3806687cf37a6cc31557.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:21 +01:00
Uwe Kleine-König
19a568a8d3
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.
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/486c40609bd9e339d7e5576e2501f63111b59b8b.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:21 +01:00
Uwe Kleine-König
7256c2e79b
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.
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/c0cfc75c1cba0f735555e0138387143ec101feb3.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:21 +01:00
Uwe Kleine-König
b1a80d5053
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.
Link: https://lore.kernel.org/r/bbe4896eabc240c678c66fabb6329f4e6cd04eda.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:21 +01:00
Uwe Kleine-König
5b86d1112b
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.
Link: https://lore.kernel.org/r/a41b62365295be9debd4a9aaa80ca87fca35b320.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:21 +01:00
Uwe Kleine-König
4709f38308
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.
Link: https://lore.kernel.org/r/66d55649e13526bbd95d7bfd1cacfa0beb9efd43.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:21 +01:00
Uwe Kleine-König
5412170f10
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.
Link: https://lore.kernel.org/r/334e633bb8e4c26dc59883b068466387769b65f9.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:21 +01:00
Uwe Kleine-König
8e87e3dcb2
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.
Link: https://lore.kernel.org/r/c02ccc955fe7a0aec7ce0ccaf5cd2bd902ae687f.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:20 +01:00
Uwe Kleine-König
fc6549a936
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.
Link: https://lore.kernel.org/r/cfbb7c571489ac3d9ca13835b3bd038aaca69638.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:20 +01:00
Uwe Kleine-König
f3d1efd083
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.
Link: https://lore.kernel.org/r/adf9cb04f5d84ae604e97d4dc0708ff3677d72d7.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:20 +01:00
Uwe Kleine-König
bf756bfd24
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.
Link: https://lore.kernel.org/r/52866502c96a80d1c30be003dc1f5a89a4d230cc.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:20 +01:00
Uwe Kleine-König
5874eaf869
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.
Link: https://lore.kernel.org/r/d2a0c5b664ef1bfd4719c645c069717d63fb4e65.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:20 +01:00
Uwe Kleine-König
e5c368b821
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.
Link: https://lore.kernel.org/r/b50fe94dc72af602e7061839b24f48af6e005ef8.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:20 +01:00
Uwe Kleine-König
2089ecaa49
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.
Link: https://lore.kernel.org/r/f0086ed37f30c4d25bf226e722f5ae52a73974d9.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:20 +01:00
Uwe Kleine-König
d502386c2b
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.
Link: https://lore.kernel.org/r/cdc6136b94f685c85a615e9e5ccbd7ebb2f91cfc.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:20 +01:00
Uwe Kleine-König
19c09ed094
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.
Link: https://lore.kernel.org/r/441489772bdfbb2cd206fd534b36c63e8c50843a.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:20 +01:00
Uwe Kleine-König
af184748c6
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.
Link: https://lore.kernel.org/r/c845e6c9d27c8a4037755b2ae702b0039947a3c1.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:20 +01:00
Uwe Kleine-König
dfab73eb28
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.
Link: https://lore.kernel.org/r/6a90083e9d1ab1c34422161593d6d7a669143217.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:20 +01:00
Uwe Kleine-König
44fe6578b8
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.
Link: https://lore.kernel.org/r/463d43cab01f97f3c4247c63cc08e76aa15684c4.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:19 +01:00
Uwe Kleine-König
93dcf8e00e
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.
Link: https://lore.kernel.org/r/4724c6a0f052160ac80ba5a3065c9470778b7457.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:19 +01:00
Uwe Kleine-König
0ba76822eb
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.
Link: https://lore.kernel.org/r/0e97342f15540c7330d405eaaf3e68baa8e1e488.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:19 +01:00
Uwe Kleine-König
8de8ccaca9
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.
Link: https://lore.kernel.org/r/f2a83af5660de461b4dcaf76929e9813bddfeff1.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:19 +01:00
Uwe Kleine-König
f9e4d438e1
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.
Link: https://lore.kernel.org/r/f8ca10033204111e4eb2e7a4dad0bd1f7586c735.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:19 +01:00
Uwe Kleine-König
cc2b5bc614
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.
Link: https://lore.kernel.org/r/c9a92f77760e401debfe0c9bfc086222f31fb3c4.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:19 +01:00
Uwe Kleine-König
5dd820cbfc
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.
Link: https://lore.kernel.org/r/34cf20a82ca07bb4ec0578b193daa5caed37825e.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:19 +01:00
Uwe Kleine-König
6357c2cd05
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.
Link: https://lore.kernel.org/r/9c952baafe7e53c482adf23215138724b61e376b.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:19 +01:00
Uwe Kleine-König
96af28dc44
pwm: ab8500: Introduce a local pwm_chip variable in .probe()
...
This simplifies converting the driver to pwmchip_alloc() as there is only
a single code line left that makes use of struct ab8500_pwm_chip::chip.
Link: https://lore.kernel.org/r/7fae4833b97728abc8bd400663fdd331c86a761b.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:19 +01:00
Uwe Kleine-König
ddabe9093c
pwm: ab8500: 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.
Link: https://lore.kernel.org/r/24028d8d0add621a0c054235e6281a05a83d8fb4.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:19 +01:00
Uwe Kleine-König
024913dbf9
pwm: Provide pwmchip_alloc() function and a devm variant of it
...
This function allocates a struct pwm_chip and driver data. Compared to
the status quo the split into pwm_chip and driver data is new, otherwise
it doesn't change anything relevant (yet).
The intention is that after all drivers are switched to use this
allocation function, its possible to add a struct device to struct
pwm_chip to properly track the latter's lifetime without touching all
drivers again. Proper lifetime tracking is a necessary precondition to
introduce character device support for PWMs (that implements atomic
setting and doesn't suffer from the sysfs overhead of the /sys/class/pwm
userspace support).
The new function pwmchip_priv() (obviously?) only works for chips
allocated with pwmchip_alloc().
Link: https://lore.kernel.org/r/9577d6053a5a52536057dc8654ff567181c2da82.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:59:15 +01:00
Uwe Kleine-König
4e59267c7a
pwm: Provide an inline function to get the parent device of a given chip
...
Currently a pwm_chip stores in its struct device *dev member a pointer
to the parent device. Preparing a change that embeds a full struct
device in struct pwm_chip, this accessor function should be used in all
drivers directly accessing chip->dev now. This way struct pwm_chip and
this new function can be changed without having to touch all drivers in
the same change set.
Make use of this function in the framework's core sources.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/cc30090d2f9762bed9854a55612144bccc910781.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:37:29 +01:00
Rafał Miłecki
eb58bf4afd
pwm: mediatek: add support for MT7988
...
MT7988 uses new registers layout just like MT7981 but it supports 8 PWM
interfaces.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240214140454.6438-2-zajec5@gmail.com
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2024-02-15 12:32:14 +01:00