bus: mhi: host: pci_generic: Add generic edl_trigger to allow devices to enter EDL...
authorQiang Yu <quic_qianyu@quicinc.com>
Wed, 24 Apr 2024 03:21:55 +0000 (11:21 +0800)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thu, 25 Apr 2024 14:55:45 +0000 (20:25 +0530)
commit48f98496b1de132f2e056605b5330209136066dc
treed8eb4217fea7d4ec6518e16e8843d91142cb8d13
parent553f94fc7667259e47a9318e9e5702c9a814d637
bus: mhi: host: pci_generic: Add generic edl_trigger to allow devices to enter EDL mode

Some of the MHI modems like SDX65 based ones are capable of entering the
EDL mode as per the standard triggering mechanism defined in the MHI spec
v1.2. So let's add a common mhi_pci_generic_edl_trigger() function that
triggers the EDL mode in the device when user writes to the
/sys/bus/mhi/devices/.../trigger_edl file.

As per the spec, the EDL mode can be triggered by writing a cookie to the
EDL doorbell register and then resetting the device.

Devices supporting this standard way of entering EDL mode can set the
mhi_pci_dev_info::edl_trigger flag.

Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/1713928915-18229-4-git-send-email-quic_qianyu@quicinc.com
[mani: reworded commit message]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/bus/mhi/host/pci_generic.c