summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-qpnp.c (follow)
Commit message (Collapse)AuthorAge
* pwm-qpnp: fix the uninitialized pwm mode issueyanyh22022-07-27
| | | | | | | | | | | | | | | | | | | If the led request the PWM mode and the initial mode is PWM when change the led pwm mode, it will fail to change pwm mode for no mode change with a uninitialized return code and cause the LED configuration failing Change-Id: I29ba3823fb7b4f0d1b2a0d9f22c464c94fbe9717 Signed-off-by: yanyh2 <yanyh2@lenovo.com> Reviewed-on: https://gerrit.mot.com/1072946 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Yeqing Wang <wangyq13@motorola.com> Reviewed-by: Coverity Analysis <coverity@motorola.com> Reviewed-by: Kenneth Kessler <kennykessler@motorola.com> Submit-Approved: Jira Key Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
* pwm: qpnp-pwm: add api for synchronous enable of pwmsScott Mertz2019-12-23
| | | | Change-Id: I29d8a2a3dc7adff734bdbbd0e9969323b86e461f
* pwm: pwm-qpnp: Fix the order of configuring PWM valueAnirudh Ghayal2019-05-15
| | | | | | | | The hardware expects the PWM MSB value to be written before LSB to avoid glitches in the output. Fix this. Change-Id: I048bdbd0c096a6d03501bdd5b1d2d4bb50d45dd7 Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
* pwm: pwm-qpnp: Enable glitch removal after PWM enabledFenglin Wu2017-11-08
| | | | | | | | | Enable glitch control after PWM enabled to remove the glitches on the PWM output. CRs-Fixed: 2134126 Change-Id: I910b26d997bd5e934119dce1ab518bb31ab5c9a5 Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
* pwm: pwm-qpnp: Fix uninitialized variable useFenglin Wu2017-09-27
| | | | | | | | | Fix uninitialized variable use which would cause unexpected return value. CRs-Fixed: 2070945 Change-Id: I874ec28904149061246fb4c2b24444a4c33e0116 Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
* pwm: pwm-qpnp: Re-enable PWM output after changing modeFenglin Wu2017-08-16
| | | | | | | | | | | | | | | | commit c8d3578f8b76 ("pwm: pwm-qpnp: Ignore changing period setting if it's not requested") had fixed an issue to avoid glitches seen in PWM output when the PWM period is not changed and the duty cycle alone is changed. However, that didn't fix the issue completely when the LPG channel operation mode might be configured differently even when the duty cycle is changed and the period is unchanged. This will lead to LPG channel getting configured to operate in a wrong mode. Fix this by enabling PWM output whenever there is a change in the mode for LPG channel requested by the client. CRs-Fixed: 2070945 Change-Id: Ida6145a7cb9016e9e9116fbcd6b8ba3f6c5b3bc1 Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
* pwm: pwm-qpnp: Ignore changing period setting if it's not requestedFenglin Wu2017-07-07
| | | | | | | | It's not necessary to reprogram PWM period setting if only changing PWM duty cycle. Change-Id: I366e17a5e2f18c09ab0850d00ec08a35e0f1cb9f Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
* pwm: qpnp: correct various coding style issuesDavid Collins2017-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct warnings flagged by checkpatch. In particular, modify the following: - Add 'const' to the type of a struct of_device_id variable. - Remove unnecessary out-of-memory error messages. - Change variables of type 'unsigned' to 'unsigned int'. - Correct minor whitespace inconsistencies. - Replace kzalloc() with kcalloc() for arrays. - Replace strncmp() with strcmp(). - Replace EXPORT_SYMBOL_GPL() with EXPORT_SYMBOL(). - Remove a macro which affects flow control. - Update the PWM_QPNP Kconfig entry and driver to use the name: 'Qualcomm Technologies, Inc.' - Correct the spelling of 'label'. Change-Id: I36cd39cec22a4e4ad5956e57643753841fedb4dc Signed-off-by: David Collins <collinsd@codeaurora.org>
* pwm: qpnp: Add support to read the LPG LUT size from device treeDevesh Jhunjhunwala2016-10-10
| | | | | | | | | | Add support to read the qcom,lpg-lut-size property from the device tree instead of using the value returned by the of_get_address API. CRs-Fixed: 1060896 Change-Id: I0f84baf29a141719dd44dabb67e9d599d9646d49 Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
* pwm: qpnp: Enable glitch removal selectivelySubbaraman Narayanamurthy2016-05-24
| | | | | | | | | | | | Currently, glitch removal is enabled by default when the PWM channel is configured. However, that adds delay to the PWM output which is undesirable for longer PWM period. Disable the glitch removal when PWM is configured and enable it after the PWM is enabled. CRs-Fixed: 1009283 Change-Id: Ibf4abb99e5e3e7aa9a9212b57094876f6ec6e9f0 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
* pwm: qpnp: configure PWM period during bootupSubbaraman Narayanamurthy2016-05-24
| | | | | | | | | | | | | | | Currently, PWM period is configured only when the client request to configure period explicitly. However, there are requirements to get it configured during bootup based upon the device tree configuration. Add support for it. While at it, add some pr_debug statements to the driver so that it can provide some useful log of PWM specific calculations runtime. CRs-Fixed: 984628 Change-Id: I50de4488c32ef78efec1587305c56ab06fb32fed Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
* pwm: qpnp: support DTEST configuration for PWM subtypeSubbaraman Narayanamurthy2016-05-24
| | | | | | | | | | | | | | | Currently, DTEST configuration is supported only based on the DTEST line and output values for LPG subtype. Though this will help configuring DTEST mode for PWM subtype, input validation has to be fixed for supporting the latter properly. Add support for that. Also, rename the "lpg-dtest-line" device tree property to "dtest-line" as this will apply for both LPG and PWM subtypes. CRs-Fixed: 949595 Change-Id: I96bf477a14bb135cf9196532cf4bf39a45c9ff77 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
* spmi_devices: change to platform_devicesAbhijeet Dharmapurikar2016-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change to using upstream spmi bus architecture. All the spmi devices, marked by spmi-dev-container, become platform devices. spmi-slave-container devices become spmi_devices each representing a slave. The read/write functions use regmap api's instead of calls to spmi_ext_register_read/write() implemented by the spmi bus. This regmap is instantiated per slave. The spmi bus helper functions like spmi_get_irq get changed to their platform bus equivalents. Change Kconfig files include * Remove dependence on OF_SPMI, MSM_QPNP_INT * There were few places where an earlier commit dcc2aedc80746acee589e4b47d3e6adf5d3ec253 missed adding dependence on SPMI along with MSM_SPMI. Fix them. * Add depends on ARCH_MSM. ARCH_MSM is used for internal builds. Change the nodes in DTSI files to confirm to the modified drivers. Update their binding docs to drop spmi-dev-container and spmi-slave-container; Finally update defconfig to use upstream SPMI. Change-Id: Ic85bff27c09c84b152cb38acbc3cadd05c0ec57a Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
* qpnp: Add snapshot of some qpnp, regulator and charger driversAbhijeet Dharmapurikar2016-03-01
This snapshot is taken as of msm-3.18 commit 9da4ddc (Merge "clk: msm: clock-gcc: Associate gfx rail voting with gfx3d branch") Change-Id: Idd2f467f1f1863a156d1757589dfe78158f0e43f Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>