Re: [PATCH] scsi: ufs: rpmb: register and unregister the ufs_rpmb bus
From: Stanley Jhu
Date: Sun Sep 20 2026 - 13:07:28 EST
On Sun, 20 Sep 2026 17:50:18 +0300, Dmitry Baryshkov wrote:
> The ufs_rpmb bus isn't registered in the device framework, so any
> attempt to register RPMB devices on UFS will fail with:
>
> bus_add_device: cannot add device 'ufs_rpmb0' to unregistered bus 'ufs_rpmb'
> ufshcd-qcom 1d84000.ufshc: Failed to register UFS RPMB device 0
>
> Add module_init() / exit() functions to handle bus registration and
> unregistration.
We have an existing patch on the list addressing this from the opposite
direction (`[PATCH v5 3/3]`, Reviewed-by Bean Huo) [1]:
Since ufs_rpmb_bus_type declares no .match and no .probe and consumers
access RPMB devices via /sys/class/rpmb/, patch 3/3 drops
ufs_rpmb_bus_type (leaving ufs_rpmb->dev.bus NULL) rather than
registering an empty bus.
Could you take a look at [1] and let us know which approach you prefer?
[1] https://lore.kernel.org/linux-scsi/20260914144943.2571104-1-stanleyjhu@xxxxxxxxxx/