diff mbox series

[1/3] scsi: ufs: ufs-qcom: add fixup_dev_quirks vops

Message ID 20240820123756.24590-2-quic_mapa@quicinc.com
State New
Headers show
Series add fixup_dev_quirks vops for ufs-qcom | expand

Commit Message

Manish Pandey Aug. 20, 2024, 12:37 p.m. UTC
Add fixup_dev_quirk vops in QCOM UFS platforms and provide an initial
vendor-specific device quirk table to add UFS device specific quirks
which are enabled only for specified UFS devices.

Signed-off-by: Manish Pandey <quic_mapa@quicinc.com>
---
 drivers/ufs/host/ufs-qcom.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Bart Van Assche Aug. 20, 2024, 9:32 p.m. UTC | #1
On 8/20/24 5:37 AM, Manish Pandey wrote:
> +static struct ufs_dev_quirk ufs_qcom_dev_fixups[] = {
> +	/* add UFS device specific quirks */
> +	{}
> +};

Please change the comment into /* UFS device-specific quirks */ and move
it above the array definition. I think that's the style followed by
kernel code.

Thanks,

Bart.
diff mbox series

Patch

diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 810e637047d0..290558843ca5 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -834,6 +834,16 @@  static int ufs_qcom_apply_dev_quirks(struct ufs_hba *hba)
 	return err;
 }
 
+static struct ufs_dev_quirk ufs_qcom_dev_fixups[] = {
+	/* add UFS device specific quirks */
+	{}
+};
+
+static void ufs_qcom_fixup_dev_quirks(struct ufs_hba *hba)
+{
+	ufshcd_fixup_dev_quirks(hba, ufs_qcom_dev_fixups);
+}
+
 static u32 ufs_qcom_get_ufs_hci_version(struct ufs_hba *hba)
 {
 	return ufshci_version(2, 0);
@@ -1798,6 +1808,7 @@  static const struct ufs_hba_variant_ops ufs_hba_qcom_vops = {
 	.link_startup_notify    = ufs_qcom_link_startup_notify,
 	.pwr_change_notify	= ufs_qcom_pwr_change_notify,
 	.apply_dev_quirks	= ufs_qcom_apply_dev_quirks,
+	.fixup_dev_quirks       = ufs_qcom_fixup_dev_quirks,
 	.suspend		= ufs_qcom_suspend,
 	.resume			= ufs_qcom_resume,
 	.dbg_register_dump	= ufs_qcom_dump_dbg_regs,