1 /*******************************************************************************
2 * mt6575_pwm.h PWM Drvier
4 * Copyright (c) 2010, Media Teck.inc
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public Licence,
8 * version 2, as publish by the Free Software Foundation.
10 * This program is distributed and in hope it will be useful, but WITHOUT
11 * ANY WARRNTY; without even the implied warranty of MERCHANTABITLITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 ********************************************************************************
17 * Author : Chagnlei Gao (changlei.gao@mediatek.com)
18 ********************************************************************************
24 #include <mach/mt_typedefs.h>
25 #include <mach/mt_pwm_hal.h>
27 struct pwm_easy_config
{
35 struct pwm_spec_config
{
45 struct _PWM_OLDMODE_REGS
{
55 struct _PWM_MODE_FIFO_REGS
{
58 U32 STOP_BITPOS_VALUE
;
68 struct _PWM_MODE_MEMORY_REGS {
71 U32 STOP_BITPOS_VALUE;
78 }PWM_MODE_MEMORY_REGS;
81 struct _PWM_MODE_RANDOM_REGS {
84 U32 STOP_BITPOS_VALUE;
94 }PWM_MODE_RANDOM_REGS;
97 struct _PWM_MODE_DELAY_REGS {
98 //U32 ENABLE_DELAY_VALUE;
100 U32 PWM3_DELAY_CLK; //0: block clock source, 1: block/1625 clock source
105 }PWM_MODE_DELAY_REGS;
110 S32
pwm_set_easy_config(struct pwm_easy_config
*conf
);
111 S32
pwm_set_spec_config(struct pwm_spec_config
*conf
);
113 void mt_pwm_dump_regs(void);
114 void mt_pwm_disable(U32 pwm_no
, BOOL pmic_pad
);
116 /*----------3dLCM support-----------*/
117 void mt_set_pwm_3dlcm_enable(BOOL enable
);
119 set "pwm_no" inversion of pwm base or not
121 void mt_set_pwm_3dlcm_inv(U32 pwm_no
, BOOL inv
);
122 //void mt_set_pwm_3dlcm_base(U32 pwm_no);
124 //void mt_pwm_26M_clk_enable(U32 enable);