android_kernel_google_msm/include/linux/pwm.h
Mohan Pallaka 71a224e616 pwm: Add __weak attributed functions for pwm operations
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)
2013-02-25 11:40:21 -08:00

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 */