From b360b11026705369f7ea51653f75dbe611322338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Date: Wed, 10 Nov 2021 18:17:07 +0100 Subject: mmc: core: allow to match the device tree to apply quirks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MMC subsystem provides a way to apply quirks when a device match some properties (VID, PID, etc...) Unfortunately, some SDIO devices do not comply with the SDIO specification and does not provide reliable VID/PID (eg. Silabs WF200). So, the drivers for these devices rely on device tree to identify the device. This patch allows the MMC to also rely on the device tree to apply a quirk. Signed-off-by: Jérôme Pouiller Signed-off-by: H. Nikolaus Schaller Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/9e68e3d23e62a78527aabc1281f89e15200c7d09.1636564631.git.hns@goldelico.com Signed-off-by: Ulf Hansson --- drivers/mmc/core/card.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/mmc/core/card.h') diff --git a/drivers/mmc/core/card.h b/drivers/mmc/core/card.h index 7bd392d55cfa..483e7f2f1039 100644 --- a/drivers/mmc/core/card.h +++ b/drivers/mmc/core/card.h @@ -59,6 +59,9 @@ struct mmc_fixup { /* for MMC cards */ unsigned int ext_csd_rev; + /* Match against functions declared in device tree */ + const char *of_compatible; + void (*vendor_fixup)(struct mmc_card *card, int data); int data; }; -- cgit v1.2.3