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 ...
随机推荐
- 【java】Comparator的用法
文章转载自: http://blog.csdn.net/u012250875/article/details/55126531 1.为什么写? comparator 是javase中的接口,位于jav ...
- vue2总结
1.ref可跨页面取.vue文件的所有内容: <!--echart图自定义公用模板--> <echar-tem ref="echar"> </echa ...
- (转)C# Where关键词的用法
where(泛型类型约束) where关键词一个最重要的用法就是在泛型的声明.定义中做出约束. 约束又分为接口约束.基类约束.构造函数约束.函数方法的约束,我们慢慢介绍. 接口约束 顾名思义,泛型参数 ...
- 雷林鹏分享:XML 实例
XML 实例 这些例子演示了 XML 文件.XML 格式化和 XML 转换(XSLT). 还演示了与 XML 一起使用的 JavaScript(AJAX). 查看 XML 文件 查看一个简单的 XML ...
- 解释变量(Explanatory Variable)
转自:http://www.statisticshowto.com/explanatory-variable/ What is an Explanatory Variable? An explanat ...
- 基于windows使用fabric将gitlab的文件远程同步到服务器(本地)
# -*- coding: utf-8 -*- from fabric.api import env, run, local, put from fabric.operations import su ...
- 什么是EOS(不一样的角度看柚子)
是时候给写写EOS了,现在EOS主网已经上线,尽管我个人不是很喜欢EOS项目(不过也一直在关注EOS),但是不可否认EOS这个争议性很大的项目给区块链世界带来的变化. 写在前面 阅读本文前,如果了解过 ...
- ubuntu14.04+MatlabR2014a+caffe
一.下载matlab 1 sudo mkdir /media/matlab 2 sudo mount -o loop [path]MATHWORKS_R2014A.iso /media/matlab ...
- 02linux 基本命令
系统环境变量的设置 以nginx为例: 方式一: ~/.bash_profile 这是个人的 /etc/profile 为系统的环境变量 vim /etc/profile.d/nginx.sh #在 ...
- python基础之循环语句,格式化输出以及编码
1.while循环语句 1.1 常见的几种结构 1. while+判断条件 循环体 2. while+判断条件 循环体 else 语句 tips:while循环如果满足条件的话,会一直循环循环体 ...