当前位置:网站首页>一点点读懂regulator(二)
一点点读懂regulator(二)
2022-08-04 22:50:00 【szembed】
目录
本章我们介绍Regulator Driver Interface相关接口使用。The regulator driver interface相对简单,旨在允许Regulator Driver向核心框架注册其服务。代码实现在regulator/core.c中
1、Registration
驱动程序可以通过调用以下接口注册调节器:
struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
const struct regulator_config *config);
This will register the regulator’s capabilities and operations to the regulator core.
Regulators可以通过调用以下接口来unregister:
void regulator_unregister(struct regulator_dev *rdev);
2、Regulator Events
Regulators可以通过调用以下接口向consumer drivers发送事件(例如过热、欠压等):
int regulator_notifier_call_chain(struct regulator_dev *rdev,
unsigned long event, void *data);
要想被regulator_notifier_call_chain调用到,则需要相关模块来注册notifier_call_chain才行。core.c同样提供了注册和去注册接口
int regulator_register_notifier(struct regulator *regulator,
struct notifier_block *nb)
int regulator_unregister_notifier(struct regulator *regulator,
struct notifier_block *nb)
边栏推荐
- 【游戏建模模型制作全流程】在ZBrush中雕刻恶魔城男性角色模型
- 【项目实战】仿照Room实现简单管理系统
- promise详解
- MySQL的JSON 数据类型1
- 力扣19-删除链表的倒数第 N 个结点——链表
- 【论文笔记KDD2021】MixGCF: An Improved Training Method for Graph Neural Network-based Recommender Systems
- 【3D建模制作技巧分享】Maya模型如何导入zbrush
- PID控制器改进笔记之七:改进PID控制器之防超调设定
- typeScript-promise
- DREAMWEAVER8 part of the problem solution
猜你喜欢
随机推荐
历史上的今天:PHP公开发布;iPhone 4 问世;万维网之父诞生
Rt-thread [二] 系统初始化流程
If you can't get your heart, use "distributed lock" to lock your people
Leaflets of three bouquet of roses
【2020】【论文笔记】超表面:多功能和可编程——
Jbpm3.2 开发HelloWorld (简单请假流程)客户端
One trick to cure pycharm DEBUG error UnicodeDecodeError: 'utf-8' codec can't decode
基于事实的讨论
特征工程资料汇总
DREAMWEAVER8 部分问题解决方案
【无标题】
2022/8/4 树上差分+线段树
Ts——项目实战应用enum枚举
后排乘客不系安全带?事故瞬间被甩出
The Record of Reminding myself
Rt-thread [三] link.lds链接脚本详解
【TCP/IP 四 IP 网际协议】
轮播图动态渲染
从“草原牛”到“数字牛”:蒙牛的数字化转型之道
3D激光SLAM:LeGO-LOAM---两步优化的帧间里程计及代码分析









