- 04 Mar, 2024 1 commit
-
-
Dong Aisheng authored
The following commit abf6569d ("pwm: imx-tpm: Make use of devm_pwmchip_alloc() function") introduced an issue that accessing registers without clock which results in the following boot crash on MX7ULP platform. Fixed it by enabling clock properly. Unhandled fault: external abort on non-linefetch (0x1008) at 0xf0978004 [f0978004] *pgd=64009811, *pte=40250653, *ppte=40250453 Internal error: : 1008 [#1] SMP ARM Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.8.0-rc6-next-20240301 #18 Hardware name: Freescale i.MX7ULP (Device Tree) PC is at pwm_imx_tpm_probe+0x1c/0xd8 LR is at __devm_ioremap_resource+0xf8/0x1dc pc : [<c0629e58>] lr : [<c0562d4c>] psr: 80000053 sp : f0825e10 ip : 00000000 fp : 00000000 r10: c148f8c0 r9 : c41fc338 r8 : c164b000 r7 : 00000000 r6 : c406b400 r5 : c406b410 r4 : f0978000 r3 : 00000005 r2 : 00000000 r1 : a0000053 r0 : f0978000 Flags: Nzcv IRQs on FIQs off Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 6000406a DAC: 00000051 ... Call trace: pwm_imx_tpm_probe from platform_probe+0x58/0xb0 platform_probe from really_probe+0xc4/0x2e0 really_probe from __driver_probe_device+0x84/0x19c __driver_probe_device from driver_probe_device+0x2c/0x104 driver_probe_device from __driver_attach+0x90/0x170 __driver_attach from bus_for_each_dev+0x7c/0xd0 bus_for_each_dev from bus_add_driver+0xc4/0x1cc bus_add_driver from driver_register+0x7c/0x114 driver_register from do_one_initcall+0x58/0x270 do_one_initcall from kernel_init_freeable+0x170/0x218 kernel_init_freeable from kernel_init+0x14/0x140 kernel_init from ret_from_fork+0x14/0x20 Fixes: abf6569d ("pwm: imx-tpm: Make use of devm_pwmchip_alloc() function") Signed-off-by:
Dong Aisheng <aisheng.dong@nxp.com> Link: https://lore.kernel.org/r/20240304102929.893542-1-aisheng.dong@nxp.comSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
- 02 Mar, 2024 3 commits
-
-
Jerome Brunet authored
Meson8 pwm type always has 4 input clocks. Some inputs may be grounded, like in the AO domain of some SoCs. Drop the parent number parameter and make this is constant. This is also done to make the addition of generic meson8 compatible easier. Signed-off-by:
Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20240221151154.26452-4-jbrunet@baylibre.comSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Jerome Brunet authored
The binding that is used up to now describe which input the PWM channel multiplexer should pick among its possible parents, which are hardcoded in the driver. This isn't a good binding in the sense that it should describe hardware but not usage. Add a new binding deprecating the old one that uses clocks in a better way and how clocks are usually used today: The list of clocks describe the inputs of the PWM block as they are realised in hardware. So deprecate the old bindings and introduce a compatible per SoC family to replace these. Signed-off-by:
Jerome Brunet <jbrunet@baylibre.com> Reviewed-by:
Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20240221151154.26452-3-jbrunet@baylibre.comSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Jerome Brunet authored
s4 has been added to the compatible list while converting the Amlogic PWM binding documentation from txt to yaml. However, on the s4, the clock bindings have different meaning compared to the previous SoCs. On the previous SoCs the clock bindings used to describe which input the PWM channel multiplexer should pick among its possible parents. This is very much tied to the driver implementation, instead of describing the HW for what it is. When support for the Amlogic PWM was first added, how to deal with clocks through DT was not as clear as it nowadays. The Linux driver now ignores this DT setting, but still relies on the hard-coded list of clock sources. On the s4, the input multiplexer is gone. The clock bindings actually describe the clock as it exists, not a setting. The property has a different meaning, even if it is still 2 clocks and it would pass the check when support is actually added. Also the s4 cannot work if the clocks are not provided, so the property is no longer optional. Finally, for once it makes sense to see the input as being numbered somehow. No need to bother with clock-names on the s4 type of PWM. Fixes: 43a1c4ff ("dt-bindings: pwm: Convert Amlogic Meson PWM binding") Reviewed-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20240221151154.26452-2-jbrunet@baylibre.comSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
- 26 Feb, 2024 3 commits
-
-
Raag Jadav authored
Simplify error handling in ->probe() function using dev_err_probe() helper and while at it, drop error codes from the message to prevent duplication. Signed-off-by:
Raag Jadav <raag.jadav@intel.com> Tested-by:
Jarkko Nikula <jarkko.nikula@linux.intel.com> Link: https://lore.kernel.org/r/20240219033835.11369-5-raag.jadav@intel.comSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Raag Jadav authored
Intel Elkhart Lake PSE includes two instances of PWM as a single PCI function with 8 channels each. Add support for the remaining channels. Signed-off-by:
Raag Jadav <raag.jadav@intel.com> Tested-by:
Jarkko Nikula <jarkko.nikula@linux.intel.com> Tested-by:
Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com> Link: https://lore.kernel.org/r/20240219033835.11369-4-raag.jadav@intel.comSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Raag Jadav authored
pcim_iomap_table() fails only if pcim_iomap_regions() fails. No need to check for failure if the latter is already successful. Suggested-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Raag Jadav <raag.jadav@intel.com> Tested-by:
Jarkko Nikula <jarkko.nikula@linux.intel.com> Link: https://lore.kernel.org/r/20240219033835.11369-3-raag.jadav@intel.comSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
- 22 Feb, 2024 33 commits
-
-
Uwe Kleine-König authored
This prepares the greybus pwm driver to further changes of the pwm core outlined in the commit introducing pwmchip_alloc(). There is no intended semantical change and the driver should behave as before. Reviewed-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/3206ab7f49c2c1704ea69446f3b7a7d1e71200fa.1707900770.git.u.kleine-koenig@pengutronix.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
With a later patch it becomes necessary to already now the number of PWM lines when pwmc is allocated. So make the function not use pwmc but a plain connection and return the number of lines instead of storing it in pwmc. This allows to get rid of the pwm_max member. Reviewed-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/3efd84ac03e7dc288f20b0de20b142b6404cb1fa.1707900770.git.u.kleine-koenig@pengutronix.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
The driver never calls gb_connection_get_data(). If there was another caller (say the greybus core) it cannot use the value because the type of pwmc (= struct gb_pwm_chip) is only defined in the pwm driver. So drop the call to gb_connection_set_data(). Reviewed-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/bd2759c325c295f3d9f990609d97eb83a8ca88b8.1707900770.git.u.kleine-koenig@pengutronix.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
The pwm framework already asserts to only pass a hwpwm value (= which) less than npwm (= pwmc->pwm_max + 1). So there is no need to recheck this condition. Drop the respective checks. Reviewed-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/e003bc5e8e66f27f2b8fdc525a536d865888cffe.1707900770.git.u.kleine-koenig@pengutronix.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/7e7517527b825a18ca10cb0faa837577d4f0ec8a.1707900770.git.u.kleine-koenig@pengutronix.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
This prepares the driver for further changes that will make it harder to determine the pwm_chip from a given gb_pwm_chip. To just not have to do that, rework gb_pwm_activate_operation(), gb_pwm_deactivate_operation(), gb_pwm_config_operation(), gb_pwm_set_polarity_operation(), gb_pwm_enable_operation() and gb_pwm_disable_operation() to take a pwm_chip. Also use the pwm_chip as driver data instead of the gb_pwm_chip. Reviewed-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/ef9b346d5bab508d4ded81cf115bf244938d04f1.1707900770.git.u.kleine-koenig@pengutronix.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
This prepares the pwm sub-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:
Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/0be073477092eeccaac6c021cf07e38fc30c74fc.1707900770.git.u.kleine-koenig@pengutronix.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
This prepares the pwm driver of the ti-sn65dsi86 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:
Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/a56cbaf049f5f23c0e0fe36b0799dd20189675e0.1707900770.git.u.kleine-koenig@pengutronix.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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. Acked-by:
Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/10a8d55110fc48a4759e65cc19556858587e94cc.1707900770.git.u.kleine-koenig@pengutronix.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
This prepares the pwm sub-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:
Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/2edc3adbb2c40b76b3b3dac82de82f3036bec1d5.1707900770.git.u.kleine-koenig@pengutronix.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-