summaryrefslogtreecommitdiff
path: root/drivers/usb/typec/ucsi/ucsi_ccg.c
diff options
context:
space:
mode:
authorSanket Goswami <Sanket.Goswami@amd.com>2022-05-26 12:03:05 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-10 11:54:08 +0200
commit5fd6c4f0a649c956b2c50c18e0da765b7f5e3eff (patch)
tree2ec73684ecef0fd51a304c63d111a6087fca43a6 /drivers/usb/typec/ucsi/ucsi_ccg.c
parent5767f40053ebf599e47d688e65b259d0b6f3227a (diff)
ucsi_ccg: ACPI based I2c client enumeration for AMD ASICs
Some of the AMD platforms have Cypress CCGX PD controller connected to system I2C i.e designware I2C controller. Added support to enumerate the CCGX client by adding ACPI ID to the firmware. Suggested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Link: https://lore.kernel.org/r/20220526063305.3144352-3-Sanket.Goswami@amd.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/ucsi/ucsi_ccg.c')
-rw-r--r--drivers/usb/typec/ucsi/ucsi_ccg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
index 0707a7156299..5c0bf48be766 100644
--- a/drivers/usb/typec/ucsi/ucsi_ccg.c
+++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
@@ -1423,6 +1423,12 @@ static const struct i2c_device_id ucsi_ccg_device_id[] = {
};
MODULE_DEVICE_TABLE(i2c, ucsi_ccg_device_id);
+static const struct acpi_device_id amd_i2c_ucsi_match[] = {
+ {"AMDI0042"},
+ {}
+};
+MODULE_DEVICE_TABLE(acpi, amd_i2c_ucsi_match);
+
static int ucsi_ccg_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
@@ -1464,6 +1470,7 @@ static struct i2c_driver ucsi_ccg_driver = {
.name = "ucsi_ccg",
.pm = &ucsi_ccg_pm,
.dev_groups = ucsi_ccg_groups,
+ .acpi_match_table = amd_i2c_ucsi_match,
},
.probe = ucsi_ccg_probe,
.remove = ucsi_ccg_remove,