Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp254899pxb; Mon, 8 Nov 2021 13:06:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLQnpsHWwJwo4k/hvHnVWK1PV+jW74fZYJu9fOmKiwPhauz/K7dxIbJA4d8eS7TUl13fUv X-Received: by 2002:a92:d152:: with SMTP id t18mr1516160ilg.199.1636405600433; Mon, 08 Nov 2021 13:06:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636405600; cv=none; d=google.com; s=arc-20160816; b=qp7lXB/1qat0RvvWLdOvYPK/NFIHpne8ATugdyo1oSStK1/k9YGHRgAFwt3JH4Qcqf AwdB6sDjaN4xVAKLq0bgeWiZUGlBgQJjGVKhPALaIZzy9jb3CMfrgl6gnnLhLq/7ssHk Sf4TU+xhLQPzRPpzPVTYvIKCW3/LdQ2+ZcjmxTYWHBAHQ/y/C9b0sk7OWnfYo6ZxuZoE J+I/UItB4e7pZwxyUcecXVvjw81BVcIkdBme4ZJxKfDkKkHqeujrDV/tc0RgT/ecQ2+G YsurlC4a5omCyR+FJEwpS5NYNTODVIL8bd2jN0Bqu283bjhTBQW9aiGPZA1rAcQYCpPJ S/Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=9gQJ+8te3UTuKnqS6mILMU9387N1gvJoGGc2kbCSpSg=; b=JnP8eH6YWBk8K9wWFfwSfSBx3iHSWI0QbI8Ll9L83sMHQPD/bxFN/DLxYFapsJQr+p YMhodo1mlEXNomx4BBU+iiAFFzZNhoVJ8WxrgE178NjvTq4zu7h4ANeUU8XozHudDUgJ EZOBuZbc3i1N70OGmKeIkfCIxWdM32fe5T4haEUEq0DDcgkHtJ0WuA9BtFk+8bE2Hgy+ WhzRfvrpHYq46rgCMk9gQKsXEwR+d4VebGJsm2kN9tXY4TxErb14wTd5+R58cvNYuZvQ HWlkQ4TxjfgZ3gX36r4V0UZWH0XYvBgve492AuRp2S/8kEorhybXvdVQ93YsH78bdePo Pbxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=kQxTpR2g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k12si33813730iov.104.2021.11.08.13.06.26; Mon, 08 Nov 2021 13:06:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=kQxTpR2g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239325AbhKHQE2 (ORCPT + 99 others); Mon, 8 Nov 2021 11:04:28 -0500 Received: from mo4-p02-ob.smtp.rzone.de ([81.169.146.168]:33174 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231401AbhKHQE1 (ORCPT ); Mon, 8 Nov 2021 11:04:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1636387265; s=strato-dkim-0002; d=goldelico.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject:Cc:Date: From:Subject:Sender; bh=9gQJ+8te3UTuKnqS6mILMU9387N1gvJoGGc2kbCSpSg=; b=kQxTpR2gkUA0NJfVP+/JA3dsuAnOcRfp60ou2InoBhpk+vi8drLHJvdIrmtVr2qEqs FrkfytFlRZ0vaAie1KQh3f1vLoquSA2+7epVFblqlytpMYlIG2WiWATKOEfs2edlQ+Nz SlqfaVtt/DGt/CE94vbpom8CvJCCYLhN7FmOqUUvetSeYOLf0pN935hG3SyxYCh0hRP0 6PzHP+vKuQcnAqsJOpspjQDAS8c5F1A8r3NmlM4iwFpHs0QkeYASanXh8yK2lrsM6Z1M sE/6wOZFgRvKAe+KVGi1Xk0khy5q1J2J+Vetevqrlfy5zjhKyS+HmOTGN0vmgM9uNpH+ JjNA== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj7gpw91N5y2S3gMZ+" X-RZG-CLASS-ID: mo00 Received: from imac.fritz.box by smtp.strato.de (RZmta 47.34.1 DYNA|AUTH) with ESMTPSA id 902c63xA8G12LY8 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Mon, 8 Nov 2021 17:01:02 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: [RFC v4 2/6] mmc: core: allow to match the device tree to apply quirks From: "H. Nikolaus Schaller" In-Reply-To: <10252914.21crK1JNra@pc-42> Date: Mon, 8 Nov 2021 17:01:01 +0100 Cc: Avri Altman , Shawn Lin , Linus Walleij , Tony Lindgren , Bean Huo , =?utf-8?Q?Gra=C5=BEvydas_Ignotas?= , linux-mmc@vger.kernel.org, linux-kernel , Discussions about the Letux Kernel , kernel@pyra-handheld.com Content-Transfer-Encoding: quoted-printable Message-Id: <8874B3D3-E2D1-4743-B9B6-F2FD3EB4033F@goldelico.com> References: <7121F069-56C7-402C-BA82-A922B1A36587@goldelico.com> <10252914.21crK1JNra@pc-42> To: =?utf-8?B?SsOpcsO0bWUgUG91aWxsZXI=?= , Ulf Hansson X-Mailer: Apple Mail (2.3445.104.21) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Am 08.11.2021 um 16:34 schrieb J=C3=A9r=C3=B4me Pouiller = : >=20 > On Monday 8 November 2021 16:00:02 CET Ulf Hansson wrote: >> On Sat, 6 Nov 2021 at 15:31, H. Nikolaus Schaller = wrote: >>>=20 >>> Hi J=C3=A9r=C3=B4me, >>>=20 >>>> Am 05.11.2021 um 15:27 schrieb J=C3=A9r=C3=B4me Pouiller = : >>>>=20 >>>> On Friday 5 November 2021 10:05:47 CET H. Nikolaus Schaller wrote: >>>>> From: J=C3=A9r=C3=B4me Pouiller >>>>>=20 >>>>> MMC subsystem provides a way to apply quirks when a device match = some >>>>> properties (VID, PID, etc...) Unfortunately, some SDIO devices = does not >>>>> comply with the SDIO specification and does not provide reliable = VID/PID >>>>> (eg. Silabs WF200). >>>>>=20 >>>>> So, the drivers for these devices rely on device tree to identify = the >>>>> device. >>>>>=20 >>>>> This patch allows the MMC to also rely on the device tree to apply = a >>>>> quirk. >>>>>=20 >>>>> Signed-off-by: J=C3=A9r=C3=B4me Pouiller = >=20 > [...] >=20 >>>>> --- >>>>> drivers/mmc/core/card.h | 3 +++ >>>>> drivers/mmc/core/quirks.h | 17 +++++++++++++++++ >>>>> 2 files changed, 20 insertions(+) >>>>>=20 >>>>> +static inline bool mmc_fixup_of_compatible_match(struct mmc_card = *card, >>>>> + const char *const = *compat_list) >>=20 >> After a second thought, I am not sure we really need a list of >> compatibles here. The quirks we may want to apply should be specific >> per device and most likely not shared among a family of devices, = don't >> you think? >=20 > Indeed. I dislike to have to declare a list of compatible device (see=20= > wl1251_compatible_list in patch 5) outside of the fixup list. >=20 > If I have several devices, I prefer to copy-paste a few lines in the=20= > mmc_fixup list (for the WFX driver, I have 4 devices to declare). Agreed. It makes the macro easier to use. BR and thanks, Nikolaus=