I’m developing a UFS pstore-blk backend for a Qualcomm-based device. The driver successfully implements pstore-blk operations and the panic_write
functionality. However, it only works when the device is not in a power saving mode.
When the device is in a power saving mode, even reading a UFS register using the driver is not possible. The device simply freezes. This suggests that the device might be unclocked in these low-power states.
In order to wake up the device, I tried to follow the logic of the ufshcd_resume
function but it calls some kernel api that is not suitable for the atomic context:
ufshcd_hba_vreg_set_hpm
ufshcd_setup_hba_vreg
ufshcd_toggle_vreg
ufshcd_enable_vreg
regulator_enable /* <= cannot be called in the atomic context */
Given the potential lack of clock during power save modes, what are recommended approaches to wake up a UFS device in an atomic context on a Qualcomm device? The goal is to ensure successful panic_write
even during power saving modes.
The kernel Im working with is 4.19.157
Anton is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.