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 ...
随机推荐
- Promise的.then .catch
定义一个promise 调用promise 如果promise的状态为resolve 则 执行 .then 否则执行.catch 可以有多个.then 会按顺序执行 axios.post 可 ...
- ps p图
1. 常用快捷键 ctrl + 单击 选中图层ctrl + j 复制出拷贝的图层 Shift+Alt+S 保存ctrl + s 保存shift + ctrl + alt + s 保存为 web 格式图 ...
- split函数
b="aa,:bb:c,c"a1,a2,a3=b.split(":") #以:为分隔符,分成3个字符串
- MySQL学习(五)
查询数据的学习与练习 建立一个表 CREATE TABLE goods ( `goos_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `cat_ ...
- Ubuntu 追加组,用户,设置免sudo密码输入
1,以root权限执行groupadd命令创建dev组. sudo groupadd dev 2,用adduser命令创建bpuser用户,--ingroup指定用户加入dev组. sud ...
- 在linux中,我为什么不能安装VMware Tools?
在linux中,我为什么不能安装VMware Tools? 应该是操作不正确导致,以下为linux安装VMware Tools的方法. 1.在安装Linux的虚拟机中,单击“虚拟机”菜单下的“安装Vm ...
- python中的面向对象学习以及类的继承和继承顺序
继承 首先编写一串关于类的代码行: __author__ = "Yanfeixu" # class People: 经典类不用加(object) class People(obje ...
- c# DLL封装并调用
1.封装自己的dll: a.打开visual studio - 文件 - 新建 - 项目- 类库 - 名称MyTestDll: b.右键Class1.cs - 修改为 TestDll.cs; c.在里 ...
- (原创)PBS | SGE 智能任务投递系统monitor | python实现
之前看到过高手写的一个monitor,用python面向对象实现的,依赖几个核心的python包,drmaa,zodb,理论上来说解决了所有的任务投递问题. 但是在复杂的集群环境下还是会经常出问题,这 ...
- 【WPF】 Behavior
Hello,Behavior 引言 在看PDC-09大会的视频时,其中一篇讲利用Blend来扩展Silverlight元素的行 为,当时感觉很酷:在Blend中,将MouseDra ...