aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-lp3943.c
AgeCommit message (Collapse)Author
2020-12-29pwm: lp3943: Dynamically allocate PWM chip baseLokesh Vutla
[ Upstream commit 1f0f1e80fdd3aa9631f6c22cda4f8550cfcfcc3e ] When there are other PWM controllers enabled along with pwm-lp3943, pwm-lp3942 is failing to probe with -EEXIST error. This is because other PWM controllers are probed first and assigned PWM base 0 and pwm-lp3943 is requesting for 0 again. In order to avoid this, assign the chip base with -1, so that it is dynamically allocated. Fixes: af66b3c0934e ("pwm: Add LP3943 PWM driver") Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Uwe Kleine-König <u.kleine-könig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2017-01-04pwm: Remove .can_sleep from struct pwm_chipThierry Reding
All PWM devices have been marked as "might sleep" since v4.5, there is no longer a need to differentiate on a per-chip basis. Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
2014-10-20pwm: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-05-21pwm: lp3943: Set pwm_chip can_sleep flagAxel Lin
Read/write through I2C can sleep, thus set pwm_chip can_sleep flag. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
2014-02-26pwm: lp3943: Fix potential memory leak during requestChristian Engelmayer
Fix a memory leak in the lp3943_pwm_request_map() error handling path. Make sure already allocated pwm map memory is freed correctly. Detected by Coverity: CID 1162829. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Acked-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
2014-01-21pwm: Add LP3943 PWM driverMilo Kim
This is the other of the LP3943 MFD driver. LP3943 can be used as a PWM generator, up to 2 channels. * Two PWM generators supported * Supported PWM operations request, free, config, enable and disable * Pin assignment A driver data, 'pin_used' is checked when a PWM is requested. If the output pin is already assigned, then returns as failure. If the pin is available, 'pin_used' is set. When the PWM is not used anymore, then it is cleared. It is defined as unsigned long type for atomic bit operation APIs, but only LSB 16bits are used because LP3943 has 16 outputs. Signed-off-by: Milo Kim <milo.kim@ti.com> Acked-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>