]> www.infradead.org Git - users/hch/configfs.git/commit
pwm: berlin: Put per-channel config into driver data
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 5 Jul 2023 08:06:43 +0000 (10:06 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Fri, 13 Oct 2023 08:07:17 +0000 (10:07 +0200)
commit1b2af7bb7523a86d0ab1f1a5e8d65063d08c7856
tree1fa13e0ba8b99c36c48dbdebf78b718fe3175332
parent91a69d38cf97b195fef1a10ea53cf429aa134497
pwm: berlin: Put per-channel config into driver data

Instead of allocating extra data in .request() provide the needed memory
in struct berlin_pwm_chip. This reduces the number of allocations. A
side effect is that on suspend and resume the state for all four
channels is always saved and restored. This is easier (and probably
quicker) than looking up the matching pwm_device and checking its
PWMF_REQUESTED bit.

Link: https://lore.kernel.org/r/20230705080650.2353391-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>
drivers/pwm/pwm-berlin.c