On Tue, May 04, 2021 at 03:25:35PM +0200, Uwe Kleine-König wrote: > 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. > > Signed-off-by: Uwe Kleine-König > --- > drivers/pwm/pwm-berlin.c | 37 ++++++------------------------------- > 1 file changed, 6 insertions(+), 31 deletions(-) This doesn't look like a worthwhile change to me. The per-PWM channel data was originally introduced to support exactly this type of use-case, so I don't see why we shouldn't keep using it here. Thierry