extcon_set_state_sync(bcdev->extcon, bcdev->usb_prev_mode, 0); bcdev->usb_prev_mode = EXTCON_NONE; qti_typec_partner_unregister(bcdev->typec_class); } break; } }typec线插入(device模式)是触发的通知流程(ADP上的switch开关在C口侧):1...
extcon_set_state_sync()设置一个exton的状态,并通过uevent通知用户空间: extcon_set_state_sync ->is_extcon_changed ->extcon_set_state ->extcon_sync ->kobject_uevent_env--获取name/state属性,以KOBJ_CHANGE动作发送uevent到用户空间。 extcon属性配置函数: intextcon_set_property(structextcon_dev *edev,...
return extcon_sync(edev, id); } EXPORT_SYMBOL_GPL(extcon_set_state_sync); /** * extcon_get_property() - Get the property value of an external connector.* @edev: the extcon device * @id: the unique id indicating an external connector * @prop: the property id indica...
This patch uses the resource-managed extcon API for extcon_register_notifier() and replaces the deprecated extcon API as following: - extcon_get_cable_state_() -> extcon_get_state() - extcon_set_cable_state_() -> extcon_set_state_sync() Acked-by: Kishon Vijay Abraham I <kishon@ti....
extcon_set_state_sync(dp->extcon,EXTCON_DISP_DP, true); cdn_dp_handle_plugged_change(dp, true); out: mutex_unlock(&dp->lock); } Expand All@@ -658,7 +667,8 @@ static void cdn_dp_encoder_disable(struct drm_encoder *encoder) ...
extcon_set_state_sync:适用于需要立即通知其他驱动或模块状态变化的场景[](https://www.cnblogs.com/bigfish0506/p/16268527.htm。 extcon_set_state:适用于只需更新状态,而不需要立即通知其他模块的场景。 以上是extcon-usb-gpio.c的实现,类似地,TypeC驱动也可以注册extcon device,通过extcon_set_state_sync...
usb_irq_handler函数里会queue work,这个work对应的处理函数如下图。通过extcon_set_state_sync函数通知其他驱动,只要有驱动注册了相应的notifier,就会被通知到。 以上是extcon-usb-gpio.c的实现,类似地,TypeC驱动也可以注册extcon device,通过extcon_set_state_sync函数向其他驱动汇报状态,这里就不再重复地举例。
externintextcon_set_state_sync(structextcon_dev*edev,unsignedintid, boolstate); Expand DownExpand Up@@ -236,9 +236,9 @@ extern int extcon_set_property_capability(struct extcon_dev *edev, * for all supported external connectors of the extcon. ...
Development version of the Upstream MultiPath TCP Linux kernel 🐧 - extcon: Remove deprecated extcon_set/get_cable_state_() · multipath-tcp/mptcp_net-next@808ae8f
@@ -448,8 +448,19 @@ int extcon_sync(struct extcon_dev *edev, unsigned int id) spin_lock_irqsave(&edev->lock, flags); state = !!(edev->state & BIT(index)); /* * Call functions in a raw notifier chain for the specific one * external connector. */ raw_notifier_call_chain...