History log of /linux-master/drivers/pwm/pwm-ntxec.c
Revision Date Author Comments
# 8c01031a 14-Feb-2024 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

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>


# 384461ab 04-Aug-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

pwm: Manage owner assignment implicitly for drivers

Instead of requiring each driver to care for assigning the owner member
of struct pwm_ops, handle that implicitly using a macro. Note that the
owner member has to be moved to struct pwm_chip, as the ops structure
usually lives in read-only memory and so cannot be modified.

The upside is that new low level drivers cannot forget the assignment and
save one line each. The pwm-crc driver didn't assign .owner, that's not
a problem in practice though as the driver cannot be compiled as a
module.

Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> # Intel LPSS
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> # pwm-{bcm,brcm}*.c
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> # sun4i
Acked-by: Andi Shyti <andi.shyti@kernel.org>
Acked-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp> # pwm-visconti
Acked-by: Heiko Stuebner <heiko@sntech.de> # pwm-rockchip
Acked-by: Michael Walle <michael@walle.cc> # pwm-sl28cpld
Acked-by: Neil Armstrong <neil.armstrong@linaro.org> # pwm-meson
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230804142707.412137-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>


# 387c74e5 18-Jul-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

pwm: ntxec: Use device_set_of_node_from_dev()

Compared to overwriting pdev->dev.of_node directly, this takes care of
reference counting. It also prevents that the parent device matches this
driver. See commit 9b22c17a3cc5 ("of: Check 'of_node_reused' flag on
of_match_device()") for further details.

Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>


# 250b4ca0 18-Jul-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

pwm: ntxec: Drop a write-only variable from driver data

.dev is assigned in .probe() and never read. So it serves no purpose and
can be removed.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>


# 9c3fac7a 07-Jul-2021 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

pwm: ntxec: Simplify using devm_pwmchip_add()

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>


# 97966ade 07-Jul-2021 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

pwm: ntxec: Drop useless assignment to struct pwmchip::base

Since commit f9a8ee8c8bcd ("pwm: Always allocate PWM chip base ID
dynamically") there is no effect any more for assigning this variable.
When the patch resulting in f9a8ee8c8bcd was created, this driver didn't
exist yet, so this was missed.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>


# 9fc0486f 24-Jan-2021 Jonathan Neuschäfer <j.neuschaefer@gmx.net>

pwm: ntxec: Add driver for PWM function in Netronix EC

The Netronix EC provides a PWM output which is used for the backlight
on some ebook readers. This patches adds a driver for the PWM output.

The .get_state callback is not implemented, because the PWM state can't
be read back from the hardware.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>