Re: [PATCH v6 7/7] bus: mhi: Expose DDR training data via controller sysfs
Manivannan Sadhasivam <[email protected]> Mon, 13 Jul 2026 19:08:39 +0200
| Newsgroups | dev.linux.lists.mhi,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <wkuia7mvgcwtemuib4abzjffrceekzheuyksqdzrykusxzvgxe@77ggixknltoc> |
On Mon, Jul 13, 2026 at 01:00:27PM +0530, Kishore Batta wrote: > > On 7/9/2026 12:27 PM, Manivannan Sadhasivam wrote: > > On Wed, Jul 01, 2026 at 04:07:41PM +0530, Kishore Batta wrote: > > > DDR training data captured during Sahara command mode needs to be > > > accessible to userspace so it can be persisted and reused on subsequent > > > boots. Currently, the training data is stored internally in the driver > > > but has no external visibility once the Sahara channel is torn down. > > > > > > Expose the captured DDR training data via a read-only binary sysfs > > > attribute on the MHI controller device: > > > > > > /sys/bus/mhi/devices/<mhi_cntrl>/ddr_training_data > > > > > > The sysfs read callback serves data directly from controller scoped storage > > > and protects access with the controller training data lock. The attribute > > > lifetime is tied to the controller device via devres, allowing the data to > > > remain readable after Sahara channel teardown and ensuring automatic > > > cleanup when controller device is removed. > > > > > If this training data is RO, then what is the use of exposing it to userspace? > > > > - Mani > > The userspace component will read this from sysfs and save it to a file > named mdmddr_0x<serial_no>.mbn. > You need to mention the exact file name for the read data. - Mani -- மணிவண்ணன் சதாசிவம்