2008-09-09 11:04:14 -07:00
/* arch/arm/mach-msm/clock.h
*
* Copyright ( C ) 2007 Google , Inc .
2013-06-17 10:43:19 -07:00
* Copyright ( c ) 2007 - 2012 , The Linux Foundation . All rights reserved .
2008-09-09 11:04:14 -07:00
*
* This software is licensed under the terms of the GNU General Public
* License version 2 , as published by the Free Software Foundation , and
* may be copied , distributed , and modified under those terms .
*
* 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 .
*
*/
# ifndef __ARCH_ARM_MACH_MSM_CLOCK_H
# define __ARCH_ARM_MACH_MSM_CLOCK_H
2013-06-17 10:43:19 -07:00
# include <linux/clk-provider.h>
2010-05-12 13:43:28 -07:00
# include <mach/clk.h>
2008-09-09 11:04:14 -07:00
# define CLK_FIRST_AVAILABLE_FLAG 0x00000100
2010-05-12 13:43:28 -07:00
# define CLKFLAG_AUTO_OFF 0x00000200
# define CLKFLAG_MIN 0x00000400
# define CLKFLAG_MAX 0x00000800
# define OFF CLKFLAG_AUTO_OFF
# define CLK_MIN CLKFLAG_MIN
# define CLK_MAX CLKFLAG_MAX
# define CLK_MINMAX (CLK_MIN | CLK_MAX)
2008-09-09 11:04:14 -07:00
2013-06-17 10:43:19 -07:00
struct msm_clk {
int ( * reset ) ( struct clk_hw * hw , enum clk_reset_action action ) ;
struct clk_hw hw ;
} ;
2011-01-26 16:20:54 -08:00
2013-06-17 10:43:19 -07:00
static inline struct msm_clk * to_msm_clk ( struct clk_hw * hw )
{
return container_of ( hw , struct msm_clk , hw ) ;
}
2013-06-17 10:43:18 -07:00
2008-09-09 11:04:14 -07:00
# endif