mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
71a224e616
For chip drivers that support both pwm and non-pwm modes would encounter compilation errors if the platform doesn't have support for pwm though the chip is programmed to work in non-pwm mode. Add __weak attributed pwm functions to avoid compilation issues in these scenarios. Change-Id: I6affff1ced9c84aefa3962b94780fd3e50ee1c35 Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org> (cherry picked from commit f056d9e5cfbd376a266c1db32c271d0f3ad0319b)
33 lines
670 B
C
33 lines
670 B
C
#ifndef __LINUX_PWM_H
|
|
#define __LINUX_PWM_H
|
|
|
|
struct pwm_device;
|
|
|
|
/* Add __weak functions to support PWM */
|
|
|
|
/*
|
|
* pwm_request - request a PWM device
|
|
*/
|
|
struct pwm_device __weak *pwm_request(int pwm_id, const char *label);
|
|
|
|
/*
|
|
* pwm_free - free a PWM device
|
|
*/
|
|
void __weak pwm_free(struct pwm_device *pwm);
|
|
|
|
/*
|
|
* pwm_config - change a PWM device configuration
|
|
*/
|
|
int __weak pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns);
|
|
|
|
/*
|
|
* pwm_enable - start a PWM output toggling
|
|
*/
|
|
int __weak pwm_enable(struct pwm_device *pwm);
|
|
|
|
/*
|
|
* pwm_disable - stop a PWM output toggling
|
|
*/
|
|
void __weak pwm_disable(struct pwm_device *pwm);
|
|
|
|
#endif /* __LINUX_PWM_H */
|