- 19 Feb, 2024 6 commits
-
-
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 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.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.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/3bf56f20bc7f749e5a353cdcfad11dd1ba573381.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/5240ba82ac227e3723678041bd69b9c7a9e3db43.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-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.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 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.comSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
- 15 Feb, 2024 34 commits
-
-
Uwe Kleine-König authored
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.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: Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/486c40609bd9e339d7e5576e2501f63111b59b8b.1707900770.git.u.kleine-koenig@pengutronix.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.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/a41b62365295be9debd4a9aaa80ca87fca35b320.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 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.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.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 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.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.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 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.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.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/f0086ed37f30c4d25bf226e722f5ae52a73974d9.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-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.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.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 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.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/463d43cab01f97f3c4247c63cc08e76aa15684c4.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-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.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 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.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.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/f8ca10033204111e4eb2e7a4dad0bd1f7586c735.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 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.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.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 ab8500_pwm_chip::chip. Link: https://lore.kernel.org/r/7fae4833b97728abc8bd400663fdd331c86a761b.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/24028d8d0add621a0c054235e6281a05a83d8fb4.1707900770.git.u.kleine-koenig@pengutronix.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
These functions are useful to store and query driver private data depending on the pwm_chip. After struct pwm_chip got its own struct device, this can make use of dev_get_drvdata() and dev_set_drvdata() on that device. These functions are required already now to convert drivers to pwmchip_alloc() which must happen before changing pwm_chip::dev. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/67514cdf29d29bd8b4ad8d44fac87f6ae6dca1e5.1707900770.git.u.kleine-koenig@pengutronix.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Uwe Kleine-König authored
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.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Rafał Miłecki authored
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.comSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Rafał Miłecki authored
MT7988 has on-SoC controller that can control up to 8 PWM interfaces. It differs from blocks on other SoCs (amount of PWMs & registers) so it needs its own compatible string. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20240214140454.6438-1-zajec5@gmail.comSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
Raag Jadav authored
Now that we're setting driver_data using dev_set_drvdata(), we can use dev_get_drvdata() for accessing it. Signed-off-by: Raag Jadav <raag.jadav@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240212130247.9985-6-raag.jadav@intel.comSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-