Russell King | 1a189b9 | 2008-04-13 21:41:55 +0100 | [diff] [blame] | 1 | #ifndef __LINUX_PWM_H |
| 2 | #define __LINUX_PWM_H |
| 3 | |
| 4 | struct pwm_device; |
| 5 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 6 | /* Add __weak functions to support PWM */ |
| 7 | |
Russell King | 1a189b9 | 2008-04-13 21:41:55 +0100 | [diff] [blame] | 8 | /* |
| 9 | * pwm_request - request a PWM device |
| 10 | */ |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 11 | struct pwm_device __weak *pwm_request(int pwm_id, const char *label); |
Russell King | 1a189b9 | 2008-04-13 21:41:55 +0100 | [diff] [blame] | 12 | |
| 13 | /* |
| 14 | * pwm_free - free a PWM device |
| 15 | */ |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 16 | void __weak pwm_free(struct pwm_device *pwm); |
Russell King | 1a189b9 | 2008-04-13 21:41:55 +0100 | [diff] [blame] | 17 | |
| 18 | /* |
| 19 | * pwm_config - change a PWM device configuration |
| 20 | */ |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 21 | int __weak pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns); |
Russell King | 1a189b9 | 2008-04-13 21:41:55 +0100 | [diff] [blame] | 22 | |
| 23 | /* |
| 24 | * pwm_enable - start a PWM output toggling |
| 25 | */ |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 26 | int __weak pwm_enable(struct pwm_device *pwm); |
Russell King | 1a189b9 | 2008-04-13 21:41:55 +0100 | [diff] [blame] | 27 | |
| 28 | /* |
| 29 | * pwm_disable - stop a PWM output toggling |
| 30 | */ |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 31 | void __weak pwm_disable(struct pwm_device *pwm); |
Russell King | 1a189b9 | 2008-04-13 21:41:55 +0100 | [diff] [blame] | 32 | |
Mark Vels | 5243ef8 | 2009-01-18 18:42:45 +0100 | [diff] [blame] | 33 | #endif /* __LINUX_PWM_H */ |