Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2847898pxv; Mon, 12 Jul 2021 03:27:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuZ9JhEhMG/OhIlMekiLvKWnFPNgrFvkhR1xBmNH7PVI34KNuFMukXcPyRTdoscGDuihiV X-Received: by 2002:a17:907:c1d:: with SMTP id ga29mr48550245ejc.284.1626085660951; Mon, 12 Jul 2021 03:27:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626085660; cv=none; d=google.com; s=arc-20160816; b=tWCscd8asWjoIoBkhQgvRCAwPQpo+78M+8l0S7N2rmvkMGmj4JWpz6/etncE71lJUP HS6UB71DBBILTEfYiLWvpz1uHYsuIyc/Ah5ZkkCOIGJZZlFdLvsQa5+ndROoaPFR32JG IIs/TGNtBeytkdXbtzRbcTchMqVabEwZLK+AvTYa00pzAgskEP5VMnIoyZUTPOtYu7DT 2n6Jgy8ZRCD83jTwjeKT5wCoQGE5Plq8WuD1giUB8ku7OosXGTNnFqdPZPEoGGBf+4xu jky9okI5xEGkuVdKG6Z7YL/WBWouy62pzdMvqrGfpMuAg83GeZH5uP1974SEEc+M84vz CX/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rPHzjqArooSgx/nXiXy1zsi6Wc+Dw1lpfZksieUdfCU=; b=RACIaia225Ub8M7QRTyNz8m38jAh5EPAidUq3VY31anPx1DoHQlxW/wjWtJMcVHGeV NTxDn72MkEEoy1Kgf6kl28bzAUxZ01BSCYOm1SW/nDxtnoAllV4HYLm5P3V7h6KRHjy6 QbdDVssTYYzzT0TT5XEQ+bsMZoD7s65jhExYBJw89NHwiJwpCXUTYMyJrabAP+q7VIjw nNU0rCnDf+DNvokLz6mtOqtnqu/uY5WItA2WTAH79yIUCMUjmWVNiF2kMHAVIdXcJ7iE uv4htJ0GtC+gf93GHSfLJAlfKvXRTHVpsoZdNoqHvekI94JtgUxHJdq+GytQtspD7brq 7LAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kvAhrQKR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hq18si6012581ejc.5.2021.07.12.03.27.17; Mon, 12 Jul 2021 03:27:40 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=kvAhrQKR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346820AbhGLHmk (ORCPT + 99 others); Mon, 12 Jul 2021 03:42:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:40614 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242314AbhGLHG3 (ORCPT ); Mon, 12 Jul 2021 03:06:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1BEF661154; Mon, 12 Jul 2021 07:03:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626073421; bh=I8wdIfFGfFwk8ZHmzi/UfXFOalguRc+26UAZKv1x+2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kvAhrQKRkjwGd6/qhM1EZELPx/H+AL/Vc0SMuGvexXHaZguQi771cJ595H0Mz6UpD r61/WgJSbT0axApimZ5WGIeeIC/uy3MKcEzO0Gfc99+3zi4qJPYPbiMsVfCaNkeuBJ aJy0ORa3EkaPNYBZjOBhycntafQLy+P55TJWyGk0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Wellbrock , Javier Martinez Canillas , Peter Robinson , Jarkko Sakkinen , Sasha Levin Subject: [PATCH 5.12 236/700] tpm_tis_spi: add missing SPI device ID entries Date: Mon, 12 Jul 2021 08:05:19 +0200 Message-Id: <20210712061000.306864149@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060924.797321836@linuxfoundation.org> References: <20210712060924.797321836@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Javier Martinez Canillas [ Upstream commit c46ed2281bbe4b84e6f3d4bdfb0e4e9ab813fa9d ] The SPI core always reports a "MODALIAS=spi:", even if the device was registered via OF. This means that this module won't auto-load if a DT has for example has a node with a compatible "infineon,slb9670" string. In that case kmod will expect a "MODALIAS=of:N*T*Cinfineon,slb9670" uevent but instead will get a "MODALIAS=spi:slb9670", which is not present in the kernel module aliases: $ modinfo drivers/char/tpm/tpm_tis_spi.ko | grep alias alias: of:N*T*Cgoogle,cr50C* alias: of:N*T*Cgoogle,cr50 alias: of:N*T*Ctcg,tpm_tis-spiC* alias: of:N*T*Ctcg,tpm_tis-spi alias: of:N*T*Cinfineon,slb9670C* alias: of:N*T*Cinfineon,slb9670 alias: of:N*T*Cst,st33htpm-spiC* alias: of:N*T*Cst,st33htpm-spi alias: spi:cr50 alias: spi:tpm_tis_spi alias: acpi*:SMO0768:* To workaround this issue, add in the SPI device ID table all the entries that are present in the OF device ID table. Reported-by: Alexander Wellbrock Signed-off-by: Javier Martinez Canillas Tested-by: Peter Robinson Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: Sasha Levin --- drivers/char/tpm/tpm_tis_spi_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/char/tpm/tpm_tis_spi_main.c b/drivers/char/tpm/tpm_tis_spi_main.c index 3856f6ebcb34..de4209003a44 100644 --- a/drivers/char/tpm/tpm_tis_spi_main.c +++ b/drivers/char/tpm/tpm_tis_spi_main.c @@ -260,6 +260,8 @@ static int tpm_tis_spi_remove(struct spi_device *dev) } static const struct spi_device_id tpm_tis_spi_id[] = { + { "st33htpm-spi", (unsigned long)tpm_tis_spi_probe }, + { "slb9670", (unsigned long)tpm_tis_spi_probe }, { "tpm_tis_spi", (unsigned long)tpm_tis_spi_probe }, { "cr50", (unsigned long)cr50_spi_probe }, {} -- 2.30.2