当前位置:网站首页>一点点读懂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)
边栏推荐
- typeScript-promise
- 【C - 基本概念】
- 今天是七夕,来看看程序员的土味情话。
- 【论文笔记KDD2021】MixGCF: An Improved Training Method for Graph Neural Network-based Recommender Systems
- 老叶的三束玫瑰
- Community Sharing|Tencent Overseas Games builds game security operation capabilities based on JumpServer
- 限制tensorflow使用Cpu核数
- 测试薪资这么高?刚毕业20K,仅需3.5个月
- Shell编程之循环语句与函数的使用
- 三个多月、40余场面试浓缩为6000字
猜你喜欢
随机推荐
Service Mesh落地路径
Reconfigure the ffmpeg plugin in chrome
赶紧进来!!!教你C语言实现扫雷小游戏(文章最后有源码!!!)
【字符串函数内功修炼】strlen + strstr + strtok + strerror(三)
PID控制器改进笔记之七:改进PID控制器之防超调设定
社区分享|腾讯海外游戏基于JumpServer构建游戏安全运营能力
【转载】kill掉垃圾进程(在资源管理器占用的情况下)
仪表板展示 | DataEase看中国:数据呈现中国资本市场
The Record of Reminding myself
【游戏建模模型制作全流程】ZBrush蜥蜴模型雕刻教程
Shell expect 实战案例
ANT1.7下载以及配置方法
基于事实的讨论
Qt中的常用控件
【无标题】
使用cpolar优化树莓派上的网页(1)
shell选择结构(if)
学生管理系统架构设计
【云原生 · Kubernetes】Kubernetes运维
promise详解
![单片机原理[一] 学好单片机必会的五张图](/img/65/cac34bee5470ae85288d4366d8d957.jpg)








