diff options
author | Liu Ying <Ying.Liu@freescale.com> | 2011-01-13 10:53:18 +0800 |
---|---|---|
committer | Liu Ying <Ying.Liu@freescale.com> | 2011-01-13 10:58:46 +0800 |
commit | 600bfa886f6c7245138e72153a6a26bb28284dac (patch) | |
tree | f79aef1c579cf33bdce7d38f9f6b584ff3b1d1b8 /include/asm-arm | |
parent | 427e23348e954642cc3d8706e3ab85017c7d4665 (diff) | |
download | u-boot-imx-600bfa886f6c7245138e72153a6a26bb28284dac.zip u-boot-imx-600bfa886f6c7245138e72153a6a26bb28284dac.tar.gz u-boot-imx-600bfa886f6c7245138e72153a6a26bb28284dac.tar.bz2 |
ENGR00137894-1 Add imx pwm driver support
This patch adds imx pwm driver support as
a misc device.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/imx_pwm.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/include/asm-arm/imx_pwm.h b/include/asm-arm/imx_pwm.h new file mode 100644 index 0000000..2e4a52a --- /dev/null +++ b/include/asm-arm/imx_pwm.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2011 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef __IMX_PWM_H__ +#define __IMX_PWM_H__ + +struct pwm_device { + unsigned long mmio_base; + unsigned int pwm_id; + int pwmo_invert; + void (*enable_pwm_pad)(void); + void (*disable_pwm_pad)(void); + void (*enable_pwm_clk)(void); + void (*disable_pwm_clk)(void); +}; + +int imx_pwm_config(struct pwm_device pwm, int duty_ns, int period_ns); +int imx_pwm_enable(struct pwm_device pwm); +int imx_pwm_disable(struct pwm_device pwm); + +#endif |