blob: e0c8c3fd5f49066379b555292c0883277a052b04 [file] [log] [blame]
Russell King1a189b92008-04-13 21:41:55 +01001#ifndef __LINUX_PWM_H
2#define __LINUX_PWM_H
3
4struct pwm_device;
5
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07006/* Add __weak functions to support PWM */
7
Russell King1a189b92008-04-13 21:41:55 +01008/*
9 * pwm_request - request a PWM device
10 */
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070011struct pwm_device __weak *pwm_request(int pwm_id, const char *label);
Russell King1a189b92008-04-13 21:41:55 +010012
13/*
14 * pwm_free - free a PWM device
15 */
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070016void __weak pwm_free(struct pwm_device *pwm);
Russell King1a189b92008-04-13 21:41:55 +010017
18/*
19 * pwm_config - change a PWM device configuration
20 */
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070021int __weak pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns);
Russell King1a189b92008-04-13 21:41:55 +010022
23/*
24 * pwm_enable - start a PWM output toggling
25 */
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070026int __weak pwm_enable(struct pwm_device *pwm);
Russell King1a189b92008-04-13 21:41:55 +010027
28/*
29 * pwm_disable - stop a PWM output toggling
30 */
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070031void __weak pwm_disable(struct pwm_device *pwm);
Russell King1a189b92008-04-13 21:41:55 +010032
Mark Vels5243ef82009-01-18 18:42:45 +010033#endif /* __LINUX_PWM_H */