From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andi Shyti <andi.shyti@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Jan Dabros <jsd@semihalf.com>,
Narasimhan.V@amd.com, Borislav Petkov <bp@alien8.de>,
Kim Phillips <kim.phillips@amd.com>,
Mario Limonciello <mario.limonciello@amd.com>
Subject: [PATCH v1 5/7] i2c: designware: Always provide device ID tables
Date: Fri, 16 Aug 2024 20:02:03 +0300 [thread overview]
Message-ID: <20240816171225.3506844-6-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20240816171225.3506844-1-andriy.shevchenko@linux.intel.com>
There is no need to have ugly ifdeffery and additional macros
for the device ID tables. Always provide them. Since we touch
the ACPI table, make it sorted by ID.
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/i2c/busses/i2c-designware-platdrv.c | 36 ++++++++++++++++-----
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 9ce74a8be43a..905557c7dfa4 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -149,14 +149,6 @@ static int dw_i2c_of_configure(struct platform_device *pdev)
return 0;
}
-
-static const struct of_device_id dw_i2c_of_match[] = {
- { .compatible = "snps,designware-i2c", },
- { .compatible = "mscc,ocelot-i2c", .data = (void *)MODEL_MSCC_OCELOT },
- { .compatible = "baikal,bt1-sys-i2c", .data = (void *)MODEL_BAIKAL_BT1 },
- {}
-};
-MODULE_DEVICE_TABLE(of, dw_i2c_of_match);
#else
static int bt1_i2c_request_regs(struct dw_i2c_dev *dev)
{
@@ -477,6 +469,34 @@ static const struct dev_pm_ops dw_i2c_dev_pm_ops = {
RUNTIME_PM_OPS(dw_i2c_plat_runtime_suspend, dw_i2c_plat_runtime_resume, NULL)
};
+static const struct of_device_id dw_i2c_of_match[] = {
+ { .compatible = "snps,designware-i2c", },
+ { .compatible = "mscc,ocelot-i2c", .data = (void *)MODEL_MSCC_OCELOT },
+ { .compatible = "baikal,bt1-sys-i2c", .data = (void *)MODEL_BAIKAL_BT1 },
+ {}
+};
+MODULE_DEVICE_TABLE(of, dw_i2c_of_match);
+
+static const struct acpi_device_id dw_i2c_acpi_match[] = {
+ { "80860F41", ACCESS_NO_IRQ_SUSPEND },
+ { "808622C1", ACCESS_NO_IRQ_SUSPEND },
+ { "AMD0010", ACCESS_INTR_MASK },
+ { "AMDI0010", ACCESS_INTR_MASK },
+ { "AMDI0019", ACCESS_INTR_MASK | ARBITRATION_SEMAPHORE },
+ { "AMDI0510", 0 },
+ { "APMC0D0F", 0 },
+ { "HISI02A1", 0 },
+ { "HISI02A2", 0 },
+ { "HISI02A3", 0 },
+ { "HYGO0010", ACCESS_INTR_MASK },
+ { "INT33C2", 0 },
+ { "INT33C3", 0 },
+ { "INT3432", 0 },
+ { "INT3433", 0 },
+ {}
+};
+MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
+
static const struct platform_device_id dw_i2c_platform_ids[] = {
{ "i2c_designware" },
{}
--
2.43.0.rc1.1336.g36b5255a03ac
next prev parent reply other threads:[~2024-08-16 17:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-16 17:01 [PATCH v1 0/7] i2c: designware: Cleanups (part 1) Andy Shevchenko
2024-08-16 17:01 ` [PATCH v1 1/7] i2c: designware: Replace a while-loop by for-loop Andy Shevchenko
2024-08-16 17:02 ` [PATCH v1 2/7] i2c: designware: Let PCI core to take care about interrupt vectors Andy Shevchenko
2024-08-16 17:02 ` [PATCH v1 3/7] i2c: designware: Add missing 'c' into PCI IDs variable name Andy Shevchenko
2024-08-16 17:02 ` [PATCH v1 4/7] i2c: designware: Unify terminator in device ID tables Andy Shevchenko
2024-08-16 17:02 ` Andy Shevchenko [this message]
2024-08-16 17:02 ` [PATCH v1 6/7] i2c: designware: Drop return value from i2c_dw_acpi_configure() Andy Shevchenko
2024-08-16 17:02 ` [PATCH v1 7/7] i2c: designware: Drop return value from dw_i2c_of_configure() Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240816171225.3506844-6-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=Narasimhan.V@amd.com \
--cc=andi.shyti@kernel.org \
--cc=bp@alien8.de \
--cc=jarkko.nikula@linux.intel.com \
--cc=jsd@semihalf.com \
--cc=kim.phillips@amd.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=mika.westerberg@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox