From patchwork Thu Sep 23 17:00:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 514543 Delivered-To: patch@linaro.org Received: by 2002:a17:906:f46:0:0:0:0 with SMTP id h6csp448507ejj; Thu, 23 Sep 2021 10:04:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSCZI3H1WYZp5IOFb8rKqPXtdGFAorDfpnjDPyHX+tD28D/rrXffJJg9/nHfOANEuJKJ4A X-Received: by 2002:a05:6e02:1ba9:: with SMTP id n9mr4573583ili.204.1632416475035; Thu, 23 Sep 2021 10:01:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632416475; cv=none; d=google.com; s=arc-20160816; b=Gj5R2g3xQOprNrsStlNon1gnL1garNa42OHeNh6+mDi2vWS82JK9Lrvr/5N869j8oE eb3k8G/OykHeFjVcXdKLSHKx63kTlpyGgWuyA21c5iU4ERv5fJdh5yR20I3hBh6+BiV4 fxJJV3vZgLAbPvm9ee79wNBn5BC1MxJVeju8SQbNDjMkKnKUOf5VIiTG/g5m7twIaOnB oYyotr+COmOTBAHIYq8tW/TZjOJ9YBdZI8LknpaGOA3uPz9hiBkvSPR2O+ZUhA5/goaW EaG8SBzAb99pjDtAkRTqmZ0SvJYblPSj/kJMVM6vw0xYA9JvDR/gDmpDQ1JFmc0Sh+Jr x+Sw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=2V+UniUMbz3/3KKiSwgJLrWR4OKexh8dq8u3YU0aJqM=; b=YDSYtHrDnb2dPa+xkpuIZ4i3E9itFfjk50rprvLkWg38Ze3Or+BvRmn3DcfRh8Amg8 v+OkdeOSYEIzzOfVHcwr8UHrc93zvLrvaQhlIt+WDSUkpixzYT+sYgZo4+CkNpE8Xvsc OkOnkm9Xw445wpijp4y5ODadOuEXuZuiDRP33JcA295J5NTvkTRAbv7zv5ltSreVmK/V eYgPPCxn/U3In3DifKT7X6Rz/LHOPLSpsLY5lNWvH++CXOzwjrk5c65AkCqd6wOH91T7 GCiyfFMX70WKM3E5WjwM2E728tHY7PQnaFb6ia3HL9TRU9bjLI6ZNoGYt7lFphHnq9BC xx2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=R10LQqEa; spf=pass (google.com: domain of linux-spi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n21si6696865ioh.16.2021.09.23.10.01.12; Thu, 23 Sep 2021 10:01:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-spi-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=@kernel.org header.s=k20201202 header.b=R10LQqEa; spf=pass (google.com: domain of linux-spi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233396AbhIWRCm (ORCPT + 1 other); Thu, 23 Sep 2021 13:02:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:39016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238281AbhIWRCl (ORCPT ); Thu, 23 Sep 2021 13:02:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9242961090; Thu, 23 Sep 2021 17:01:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632416470; bh=Gz2IEtNQRa4ifNPpLyMX2FJc7Zul20qJymz0QcFJg58=; h=From:To:Cc:Subject:Date:From; b=R10LQqEaLZaSLuC53lQWi4MVjwjqOaPZupWT83krKvHTTtujQd8lpTlKQ7EFtQ2eO o6KTGmzvKShAPo62b0t7wylFFXyGKlRf+yNTHrpfW4WLd9Zsdm/JCg2AtwP0nzo7Bd 7iD/OS7iGLYXB2Q3Kpvrfclbin44SJYm7RLya7ddmbTEilj8QTBzKNKij9sp2RxQaE NguFteyqbCbp5Mg/P42Dw1Bd4enlwOaQ0Ll6gtOgtsqI2x/sGlsN0QYuZURC+mEgUc /gSoMDEgze3XD59Gl9xPkXggahfv6819sx7sT88Bt3zj5Yq4Im1RdZ1CzXpt3+CKzP iREAD0K0IZ5tA== From: Mark Brown To: linux-spi@vger.kernel.org Cc: Mark Brown , patches@opensource.cirrus.com Subject: [PATCH] spi: spidev: Add SPI ID table Date: Thu, 23 Sep 2021 18:00:23 +0100 Message-Id: <20210923170023.1683-1-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1554; h=from:subject; bh=Gz2IEtNQRa4ifNPpLyMX2FJc7Zul20qJymz0QcFJg58=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBhTLKYNCCkgntivleIv3cugP/IW3J6YiRsKyB+wm6W 0OR9vfiJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYUyymAAKCRAk1otyXVSH0ELRB/ oDYYYguXJ0W+7BbGGL3SI1i7K57mbDV1I2LXxBsN5I5yGgI1+TlQpOqyyKNCIKr8ZSFH8G7aAFJ5Lu 5eQLUnYHuxG7S4LyxAmOp1MdG8TTQhPMAi4VyzE4SCZ2Ef02Z101c8O/dXlIrVK9x2k0gYKpIWBk8w 2s6Ky25WiTQY/6p+TcVDKno/XQZ221m/2oGWRg09wl9Qa0QHwsUJKMrEDG1BgEsCBB11Vk6DNGy3Fa 1d+487iZ/9WbMY/9W/nVuWpXU8J/Ln9+kxPH2Va9N/Qh7EVqA8/HtmRMImmUqi10RFPkA5mJvdKFNB YgzgoYMwqqSLr9Adk53RzXtsp9120P X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Currently autoloading for SPI devices does not use the DT ID table, it uses SPI modalises. Supporting OF modalises is going to be difficult if not impractical, an attempt was made but has been reverted, so ensure that module autoloading works for this driver by adding an id_table listing the SPI IDs for everything. Fixes: 96c8395e2166 ("spi: Revert modalias changes") Signed-off-by: Mark Brown Cc: patches@opensource.cirrus.com --- drivers/spi/spidev.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -- 2.20.1 diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 6dc29ce3b4bf..79c22fc8b0a4 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -673,6 +673,19 @@ static const struct file_operations spidev_fops = { static struct class *spidev_class; +static const struct spi_device_id spidev_spi_ids[] = { + { .name = "dh2228fv" }, + { .name = "ltc2488" }, + { .name = "sx1301" }, + { .name = "bk4" }, + { .name = "dhcom-board" }, + { .name = "m53cpld" }, + { .name = "spi-petra" }, + { .name = "spi-authenta" }, + {}, +}; +MODULE_DEVICE_TABLE(of, spidev_dt_ids); + #ifdef CONFIG_OF static const struct of_device_id spidev_dt_ids[] = { { .compatible = "rohm,dh2228fv" }, @@ -818,6 +831,7 @@ static struct spi_driver spidev_spi_driver = { }, .probe = spidev_probe, .remove = spidev_remove, + .id_table = spidev_spi_ids, /* NOTE: suspend/resume methods are not necessary here. * We don't do anything except pass the requests to/from