当前位置:网站首页>一点点读懂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)
边栏推荐
猜你喜欢
随机推荐
【模拟面试-10年工作】项目多一定是优势吗?
Redis理解
逆序对的数量
「津津乐道播客」#397 厂长来了:怎样用科技给法律赋能?
DREAMWEAVER8 部分问题解决方案
SQL Server 调用 WebService
SSM整合完整流程讲解
MQTT[一]基础知识介绍
后排乘客不系安全带?事故瞬间被甩出
【转载】kill掉垃圾进程(在资源管理器占用的情况下)
【3D建模制作技巧分享】Maya模型如何导入zbrush
使用cpolar优化树莓派上的网页(2)
Rt-thread [二] 系统初始化流程
【C - 基本概念】
Nacos配置中心之客户端长轮询
golang打开文件和读写文件
Autowired autowiring
shell选择结构(if)
论文解读(PPNP)《Predict then Propagate: Graph Neural Networks meet Personalized PageRank》
【组成原理 六 存储器类型】








