Linux电源管理-Linux regulator framework概述
前言
问题
Linux Regulator Framework
machine
struct regulator_init_data {
const char *supply_regulator; /* or NULL for system supply */
struct regulation_constraints constraints;
int num_consumer_supplies;
struct regulator_consumer_supply *consumer_supplies;
/* optional regulator machine specific init */
int (*regulator_init)(void *driver_data);
void *driver_data; /* core does not touch this */
};
struct regulation_constraints {
const char *name;
/* voltage output range (inclusive) - for voltage control */
int min_uV;
int max_uV;
int uV_offset;
/* current output range (inclusive) - for current control */
int min_uA;
int max_uA;
/* valid regulator operating modes for this machine */
unsigned int valid_modes_mask;
/* valid operations for regulator on this machine */
unsigned int valid_ops_mask;
/* regulator input voltage - only if supply is another regulator */
int input_uV;
/* regulator suspend states for global PMIC STANDBY/HIBERNATE */
struct regulator_state state_disk;
struct regulator_state state_mem;
struct regulator_state state_standby;
suspend_state_t initial_state; /* suspend state to set at init */
/* mode to set on startup */
unsigned int initial_mode;
unsigned int ramp_delay;
unsigned int enable_time;
/* constraint flags */
unsigned always_on:; /* regulator never off when system is on */
unsigned boot_on:; /* bootloader/firmware enabled regulator */
unsigned apply_uV:; /* apply uV constraint if min == max */
unsigned ramp_disable:; /* disable ramp delay */
};
#define REGULATOR_MODE_NORMAL 0x2 //正常模式,大多数驱动都使用这种模式
#define REGULATOR_MODE_IDLE 0x4 //设备在idle状态,regulator给设备提供服务
#define REGULATOR_MODE_STANDBY 0x8 //设备在standby状态,regulator给设备提供服务
#define REGULATOR_CHANGE_CURRENT 0x2 //该regulator可以改变电流
#define REGULATOR_CHANGE_MODE 0x4 //该regulator可以改变mode
#define REGULATOR_CHANGE_STATUS 0x8 //该regulator可以改变状态,也就是enable/disable power
#define REGULATOR_CHANGE_DRMS 0x10 //该regulator可以动态该变mode
#define REGULATOR_CHANGE_BYPASS 0x20 //该regulator支持bypass mode
.input_uV: 表示该regulator的input是另一个regulator。
.apply_uV: 当min_uV=max_uV的时候时使用。
Linux电源管理-Linux regulator framework概述的更多相关文章
- Linux电源管理(7)_Wakeup events framework【转】
转自:http://www.wowotech.net/pm_subsystem/wakeup_events_framework.html 1. 前言 本文继续“Linux电源管理(6)_Generi ...
- Linux电源管理(7)_Wakeup events framework
1. 前言 本文继续"Linux电源管理(6)_Generic PM之Suspend功能"中有关suspend同步以及PM wakeup的话题.这个话题,是近几年Linux ker ...
- Linux电源管理(1)-整体架构【转】
本文转载自:http://www.wowotech.net/pm_subsystem/pm_architecture.html 1. 前言 在这个世界中,任何系统的运转都需要能量.如树木依靠光能生长, ...
- Linux电源管理(9)_wakelocks【转】
1. 前言 wakelocks是一个有故事的功能. wakelocks最初出现在Android为linux kernel打的一个补丁集上,该补丁集实现了一个名称为"wakelocks&quo ...
- Linux电源管理_autosleep--(五)【转】
本文转载自:https://blog.csdn.net/wlsfling/article/details/46005409 1. 前言 Autosleep也是从Android wakelocks补丁集 ...
- Linux电源管理(2)-Generic PM基本概念和软件架构【转】
本文转载自:http://www.wowotech.net/pm_subsystem/generic_pm_architecture.html 1. 前言 这里的Generic PM,是蜗蜗自己起的名 ...
- linux电源管理系列(一)
本系列将逐步介绍linux电源管理相关的知识,涉及到常见电源管理机制.linux电源管理机制.linux驱动中有关电源管理的相关接口.内核文档中关于Linux电源管理架构文档的分析.以下将以此来介绍相 ...
- ARM linux电源管理——Cortex A系列CPU(32位)睡眠和唤醒的底层汇编实现
ARM linux电源管理——Cortex A系列CPU(32位)睡眠和唤醒的底层汇编实现 承接 http://www.wowotech.net/pm_subsystem/suspend_and_re ...
- Linux电源管理(5)_Hibernate和Sleep功能介绍【转】
本文转载自:http://www.wowotech.net/pm_subsystem/std_str_func.html 1. 前言 Hibernate和Sleep两个功能是Linux Generic ...
随机推荐
- aar的使用(module或者library)
引入: 1. android studio正常的module引用aar文件需要配置如下: ① 在module的build.gradle的android节点下 repositories { flatDi ...
- input 输入值的监听 禁止输入特殊字符
1.input 输入值的监听 //用于监听input的值变化(input的值产生变化才会触发事件) (function ($) { $.fn.watch = function (callback) ...
- qt.network.ssl: QSslSocket: cannot call unresolved function SSLv23_client_method
使用Qt编写程序访问知乎官网,程序报错 qt.network.ssl: QSslSocket: cannot call unresolved function SSLv23_client_method ...
- Java面试题基础知识(收集)
1.集合类:list和Set比较,各自的子类比较(Arraylist,Vector,inkedLIst,HashSet,TreeSet) List:存入元素有序,元素可以重复,允许null值得存在,主 ...
- 【转载】HTML5 Audio/Video 标签,属性,方法,事件汇总
<audio> 标签属性: src:音乐的URL preload:预加载 autoplay:自动播放 loop:循环播放 controls:浏览器自带的控制条 Html代码 <au ...
- Program Option Modifiers
Some option are 'boolean' and control behavior that can be turned on or off. --column-names option d ...
- Ubuntu下安装Google浏览器
和其他软件一样,比较常用的安装方法. 1.下载deb包对于谷歌Chrome32位版本,使用如下链接:wget https://dl.google.com/linux/direct/google-chr ...
- 记一次RAID阵列的迁移经历
xu言: 最近,某电信机房因为空调漏水问题导致了我司的Dell R430 服务器的主板及CPU不同程度受损.服务器已经不能正常开机.但是,又基于把服务器的数据需要最短时间进行恢复.抱着试试看的心里进行 ...
- Lab 3-1
Analyze the malware found in the file Lab03-01.exe using basic dynamic analysis tools. Questions and ...
- android--------自定义控件 之 属性篇
上篇介绍了自定义控件的一个简单案例,本篇文章主要介绍如何给自定义控件自定义一些属性. Android 中使用自定义属性的一般步骤: 定义declare-styleable,添加attr 使用Typed ...