99d76ad598412a55a5aaccf11b4d88127a05e450
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-tiger / pwm_drvapi.h
1 /******************************************************************************
2  ** File Name:      pwm_drvapi.H                                                 *
3  ** Author:         Lin.liu                                                   *
4  ** DATE:           03/01/2004                                                *
5  ** Copyright:      2003 Spreatrum, Incoporated. All Rights Reserved.         *
6  ** Description:    This file defines the basic operation interfaces of       *
7  **                 PWM device.                                               *
8 *******************************************************************************
9
10  ******************************************************************************
11  **                        Edit History                                       *
12  ** ------------------------------------------------------------------------- *
13  ** DATE           NAME             DESCRIPTION                               *
14  ** 03/01/2004     Lin.liu          Create.                                   *
15  ******************************************************************************/
16 #ifndef _PWM_DRVAPI_H_
17 #define _PWM_DRVAPI_H_
18
19 typedef enum
20 {
21     PWMA_E = 0,
22     PWMB_E,
23     PWMC_E,
24     PWMD_E,
25     PWME_E,
26     PWMF_E,   
27     PWM_MAX
28 } PWM_PORT_ID_E;
29
30 typedef enum
31 {
32             XTL_E = 0,
33                 RTC_E
34 }PWM_CLK_SOURCE_E;
35
36 #define PWM_CTL_S_ONOFF 0x30 /*Set PWM ON/OFF*/
37 #define PWM_CTL_S_CLKSRC 0x31 /*Set CLK sorce*/
38 #define PWM_CTL_G_CLKSRC 0x32 /*Get CLK sorce*/
39
40
41 void PWM_Config (int pwm_num,  uint32  freq,  uint16  duty_cycle);
42 uint32 PWM_Ioctl (uint32 pwm_num, uint32 cmd, uint32 *arg);
43
44 #endif // _PWM_DRVAPI_H_