Files
kernel-tenderloin-3.0/arch/arm/mach-msm/include/mach/msm_xo.h
Matt Wagantall ed90b00389 msm_xo: Make clock users vote on CXO_CLK instead of buffers
Users of internal MSM clocks derived from CXO should vote on the
CXO_CLK RPM resource rather than just the XO buffer resource. Voting
on CXO_CLK ensures the entire clock tree from the PMIC through to the
MSM clock controller is running, whereas voting for the buffer does
not guarantee the clock will not be gated off within the MPM.

Change-Id: I18199603bcd3ed2833409cb894536fa41711b3bb
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2011-12-20 16:30:38 -08:00

59 lines
1.5 KiB
C

/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* 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 __MACH_MSM_XO_H
#define __MACH_MSM_XO_H
enum msm_xo_ids {
MSM_XO_TCXO_D0,
MSM_XO_TCXO_D1,
MSM_XO_TCXO_A0,
MSM_XO_TCXO_A1,
MSM_XO_TCXO_A2,
MSM_XO_CORE,
MSM_XO_PXO,
MSM_XO_CXO,
NUM_MSM_XO_IDS
};
enum msm_xo_modes {
MSM_XO_MODE_OFF,
MSM_XO_MODE_PIN_CTRL,
MSM_XO_MODE_ON,
NUM_MSM_XO_MODES
};
struct msm_xo_voter;
#ifdef CONFIG_MSM_XO
struct msm_xo_voter *msm_xo_get(enum msm_xo_ids xo_id, const char *voter);
void msm_xo_put(struct msm_xo_voter *xo_voter);
int msm_xo_mode_vote(struct msm_xo_voter *xo_voter, enum msm_xo_modes xo_mode);
int __init msm_xo_init(void);
#else
static inline struct msm_xo_voter *msm_xo_get(enum msm_xo_ids xo_id,
const char *voter)
{
return NULL;
}
static inline void msm_xo_put(struct msm_xo_voter *xo_voter) { }
static inline int msm_xo_mode_vote(struct msm_xo_voter *xo_voter,
enum msm_xo_modes xo_mode)
{
return 0;
}
static inline int msm_xo_init(void) { return 0; }
#endif /* CONFIG_MSM_XO */
#endif