TouchPanel--Qcom DRM休眠唤醒通知链的注册及回调流程

本文详细介绍了在高通平台中如何根据显示屏的状态调整设备的工作状态,重点讲解了设备的dtsi属性设置、内核中的通知机制以及在DRM面板中的应用。通过`of_drm_find_panel`查找匹配的DRM面板,并利用`drm_panel_notifier_call_chain`进行休眠唤醒的回调操作。
摘要由CSDN通过智能技术生成

移动设备的休眠唤醒功能,为了省电而生,当然,你也可以在休眠的时候做一些差异化的功能。下面就介绍如何在高通平台中根据显示屏的状态,修改设备的工作状态。本文内容参考自sm6350, kernel 4.19

1:设备的dtsi属性设置示例:
xxx-qrd.dtst
&qupv3_se8_i2c {
#address-cells = <1>;
#size-cells = <0>;

status = "ok";
qcom,i2c-touch-active = "focaltech,fts";

focaltech@38 {
    compatible = "focaltech,fts";
            ...
    panel = <&dsi_rm692d7_visionox_amoled_cmd>;
};

};

2:内核公共数据结构
notifier.h
typedef int (*notifier_fn_t)(struct notifier_block *nb,
unsigned long action, void *data);

struct notifier_block {
notifier_fn_t notifier_call;
struct notifier_block __rcu *next;
int priority;
};

struct blocking_notifier_head {
struct rw_semaphore rwsem;
struct notifier_block __rcu *head;
};

3:高通私有数据结构和函数,及相关显示驱动
drm_panel.h
/**

  • struct drm_panel - DRM panel object

  • @drm: DRM device owning the panel

  • @connector: DRM connector that the panel is attached to

  • @dev: parent device of the panel

  • @funcs: operations that can be performed on the panel

  • @list: panel entry in registry

  • @nh: panel notifie

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值