当前位置:网站首页>一点点读懂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)
边栏推荐
猜你喜欢
【论文笔记KDD2021】MixGCF: An Improved Training Method for Graph Neural Network-based Recommender Systems
Deep Learning RNN Architecture Analysis
重新配置chrome中ffmpeg插件
【2020】【论文笔记】超表面:多功能和可编程——
enumerate()函数
xss总结
【3D建模制作技巧分享】ZBrush模型制作流程:地精
使用代理对象执行实现类目标方法异常
文献阅读十——Detect Rumors on Twitter by Promoting Information Campaigns with Generative Adversarial Learn
【3D建模制作技巧分享】ZBrush如何设置笔刷快捷键
随机推荐
Rt-thread [二] 系统初始化流程
【游戏建模模型制作全流程】在ZBrush中雕刻恶魔城男性角色模型
DREAMWEAVER8 部分问题解决方案
今天又做了三个梦,其中一个梦梦里的我还有意识会思考?
养殖虚拟仿真软件提供高沉浸式的虚拟场景互动操作体验学习
基于内容的图像检索系统设计与实现--颜色信息--纹理信息--形状信息--PHASH--SHFT特征点的综合检测项目,包含简易版与完整版的源码及数据!
未来我们还需要浏览器吗?(feat. 枫言枫语)
Latex快速插入作者ORCID
深度学习 RNN架构解析
【字符串函数内功修炼】strlen + strstr + strtok + strerror(三)
Both synchronized and ReentrantLock are smooth, because they are reentrant locks, and a thread will not deadlock if it takes the lock multiple times. We need reentrant locks
【字符串函数内功修炼】strncpy + strncat + strncmp(二)
【无标题】
边缘检测——(纯享版)
【内存操作函数内功修炼】memcpy + memmove + memcmp + memset(四)
老叶的三束玫瑰
逆序对的数量
Service Mesh落地路径
Using ngrok to optimize web pages on raspberry pi (2)
SRv6网络的安全解决方案