RE: [PATCH] ufs: core: Add HID support
From: Avri Altman
Date: Fri Apr 18 2025 - 04:06:09 EST
> +What: /sys/bus/platform/drivers/ufshcd/*/hid_trigger
Maybe have those entries have their own hid directory?
Which will be created if (!hba->dev_info.hid_sup) ?
Snip
> 9614,6 +9619,8 @@ static int __ufshcd_wl_suspend(struct ufs_hba *hba,
> enum ufs_pm_op pm_op)
> req_link_state = UIC_LINK_OFF_STATE;
> }
>
> + if (hba->dev_info.hid_sup)
> + cancel_delayed_work_sync(&hba->ufs_hid_enable_work);
Is this mean that you need to re-initiate the hid worker, if not completed, on resume?
Then if you are polling the state from user-space anyway, maybe move the entire logic to user-space?
It will simplify your implementation and maybe you could give-up the worker altogether?
Thanks,
Avri