Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2825578pxv; Mon, 12 Jul 2021 02:53:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPMIr3W+5QLwIxnNCFUs84k42QHoMCyOQ61EkZwKFh+bzfS8uc9uaa9zhbKkaCxzH5pjWX X-Received: by 2002:a92:d990:: with SMTP id r16mr2249080iln.204.1626083592453; Mon, 12 Jul 2021 02:53:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626083592; cv=none; d=google.com; s=arc-20160816; b=jxeJfTr8hEIWrwmJqJSj/p+mJ+s5GuD7RP0oFtuL3S0n24Kqq0mCFgBSK8yZxXvP6p ym/+NDQ7ybn30Z4KGGET0uCt3KXseZ8QFKfbZOFqiolpvz+4dCpYp3NGSVeK6ZMBisvB 9IwNFnylE3ol5Y34BVVo3XEozBSOXOqb6C6lE9VFnnSjqdNNdaBznr+83haZBis3KKIU 6sNtpLn8vHJWXbJoxOmbAhWOlHK2aOOs9MRB6lDs+3JbKl2BvkRoAceiuV9knq3mFEjo iJVjFpTeeeBLIqc93Rs44wSN8JqhQwC4yjVtrtnKsLJHGg1DE0PxElAYOBzVcjAehcB+ p5Jw== 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=CnYhi+EvI/fiUacPtNrknus4UYAqGUw1rMx6giezZlcTlWw0S/2V8T26ZM8voyCwTI nDcwUyWlBlmW9zvximfysLrW/T2Rz28QO/BVc3XmtjSq9XRBf2gPpALFFnD46SXW1lQ2 UUfKXYbKA+ojWOH87rL0mYuQm8RnMLaAOOJ2IXTLe9Kc6rqFxeMW61JgO5BEaVDAjzJK pT2Y48gzGVHE7JKsEoujg4Bch81KlDuU6QZSrI65GO/fHEWbdjNQp5eWYVuAIA6bwWOA C2p8TdP0gfIDxazVsnPRSuDASN0+4GLLw6UJmMoBykTdSJS9Xzk/JFuoQn4Zbcfu9kTD Izdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h7UuH0YU; 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 a5si16572994ioq.24.2021.07.12.02.53.01; Mon, 12 Jul 2021 02:53:12 -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=h7UuH0YU; 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 S240191AbhGLGuw (ORCPT + 99 others); Mon, 12 Jul 2021 02:50:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:34936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237984AbhGLGjs (ORCPT ); Mon, 12 Jul 2021 02:39:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5A5CC611CB; Mon, 12 Jul 2021 06:35:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626071758; bh=I8wdIfFGfFwk8ZHmzi/UfXFOalguRc+26UAZKv1x+2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h7UuH0YUKpfc8RiQGKO19i4Rr4Xu2zPHXlqzC7VZBmTXwnGYubbdMShBYZxG9Hcws szIphbkm3JZwEnMKywKXgANpkYUWNlZiPWNjWJEw9tVaBCV8orPfdsePpiOlKV4pn7 Us0ulwkofC2OFwxgHwn4LNkDrh9ZHU3S6bKurGt4= 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.10 200/593] tpm_tis_spi: add missing SPI device ID entries Date: Mon, 12 Jul 2021 08:06:00 +0200 Message-Id: <20210712060905.025811362@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060843.180606720@linuxfoundation.org> References: <20210712060843.180606720@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