mirror of
https://github.com/LineageOS/android_kernel_samsung_msm8226.git
synced 2026-10-06 00:01:01 +02:00
The PMIC 8841 v2 that comes with msm8974 v2 is capable of doing phase switching on ganged regulators. Enable this feature for v2. Change-Id: I21826f4cf7be332f5ab7621325fa6cbe6aa2ea95 Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
60 lines
1.9 KiB
C
60 lines
1.9 KiB
C
/* Copyright (c) 2012-2013, The Linux Foundation. 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 __KRAIT_REGULATOR_H__
|
|
#define __KRAIT_REGULATOR_H__
|
|
|
|
#define KRAIT_REGULATOR_DRIVER_NAME "krait-power-regulator"
|
|
#define KRAIT_PDN_DRIVER_NAME "krait-pdn"
|
|
|
|
/**
|
|
* krait_power_init - driver initialization function
|
|
*
|
|
* This function registers the krait-power-regulator platform driver. This
|
|
* should be called from appropriate initialization code. Returns 0 on
|
|
* success and error on failure.
|
|
*/
|
|
|
|
#ifdef CONFIG_ARCH_MSM8974
|
|
int __init krait_power_init(void);
|
|
void secondary_cpu_hs_init(void *base_ptr);
|
|
|
|
/**
|
|
* krait_power_mdd_enable - function to turn on/off MDD. Turning off MDD
|
|
* turns off badngap reference for LDO. If
|
|
* a core is running on a LDO, requests to
|
|
* turn off MDD will not be honoured
|
|
* @on: boolean to indicate whether to turn MDD on/off
|
|
*
|
|
* CONTEXT: Can be called in interrupt context, only when the core
|
|
* is about to go to idle, this guarantees that there are no
|
|
* frequency changes on that cpu happening. Note if going from off
|
|
* to on mode there will be settling delays
|
|
*
|
|
* RETURNS: -EINVAL if MDD cannot be turned off
|
|
*/
|
|
int krait_power_mdd_enable(int cpu_num, bool on);
|
|
#else
|
|
static inline int __init krait_power_init(void)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
static inline void secondary_cpu_hs_init(void *base_ptr) {}
|
|
static inline int krait_power_mdd_enable(int cpu_num, bool on)
|
|
{
|
|
return -EINVAL;
|
|
}
|
|
#endif
|
|
|
|
#endif
|