当前位置:网站首页>一点点读懂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)
边栏推荐
猜你喜欢

【3D建模制作技巧分享】Maya模型如何导入zbrush
![单片机原理[一] 学好单片机必会的五张图](/img/65/cac34bee5470ae85288d4366d8d957.jpg)
单片机原理[一] 学好单片机必会的五张图

中国的顶级黑客在国际上是一个什么样的水平?

SRv6网络的安全解决方案

未来我们还需要浏览器吗?(feat. 枫言枫语)

直播带货为农产品开拓销售渠道

自从新来了个字节20K出来的,就见识到了什么是天花板

【2020】【论文笔记】超表面:多功能和可编程——

【3D建模制作技巧分享】zbrush贴图映射小技巧

Community Sharing|Tencent Overseas Games builds game security operation capabilities based on JumpServer
随机推荐
【内存操作函数内功修炼】memcpy + memmove + memcmp + memset(四)
年薪40W测试工程师成长之路,你在哪个阶段?
One trick to cure pycharm DEBUG error UnicodeDecodeError: 'utf-8' codec can't decode
使用cpolar优化树莓派上的网页(1)
软件测试技术之如何编写测试用例(4)
湖仓一体电商项目(五):内网穿透工具-网云穿
Controller层代码这么写,简洁又优雅!
DREAMWEAVER8 part of the problem solution
【C - 基本概念】
质量管理大师爱德华·戴明博士经典的质量管理14条原则
2022年全网最全接口自动化测试框架搭建,没有之一
Service Mesh落地路径
祝福一路顺风
typeScript-promise
正则表达式绕过
后排乘客不系安全带?事故瞬间被甩出
力扣24-两两交换链表中的节点——链表
最温馨的家园
使用代理对象执行实现类目标方法异常
【转载】kill掉垃圾进程(在资源管理器占用的情况下)