aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/9017-Add-support-to-instantiate-CCGx-UCSI-driver.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/9017-Add-support-to-instantiate-CCGx-UCSI-driver.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/9017-Add-support-to-instantiate-CCGx-UCSI-driver.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/9017-Add-support-to-instantiate-CCGx-UCSI-driver.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/9017-Add-support-to-instantiate-CCGx-UCSI-driver.patch
new file mode 100644
index 00000000..f4f38d6d
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/9017-Add-support-to-instantiate-CCGx-UCSI-driver.patch
@@ -0,0 +1,53 @@
+From 9b95c3693e24d59e531f15d6abbe7d165f4d887b Mon Sep 17 00:00:00 2001
+From: Sanket Goswami <Sanket.Goswami@amd.com>
+Date: Mon, 14 Mar 2022 14:04:18 +0530
+Subject: [PATCH 17/48] Add support to instantiate CCGx UCSI driver
+
+Add support to instantiate ucsi ccgx driver on some of AMD ASICs
+which utilize ACPI method for EC less platform.
+
+Co-developed-by: Nehal Bakulchandra Shah <Nehal-Bakulchandra.shah@amd.com>
+Signed-off-by: Nehal Bakulchandra Shah <Nehal-Bakulchandra.shah@amd.com>
+Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
+Change-Id: I941eb7ef226e833e29d29e90c2a3d828b91240ec
+---
+ drivers/usb/typec/ucsi/ucsi_ccg.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
+index 6db7c8ddd51c..4c90f9acd7fb 100644
+--- a/drivers/usb/typec/ucsi/ucsi_ccg.c
++++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
+@@ -1367,7 +1367,7 @@ static int ucsi_ccg_probe(struct i2c_client *client,
+ ucsi_set_drvdata(uc->ucsi, uc);
+
+ status = request_threaded_irq(client->irq, NULL, ccg_irq_handler,
+- IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
++ IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
+ dev_name(dev), uc);
+ if (status < 0) {
+ dev_err(uc->dev, "request_threaded_irq failed - %d\n", status);
+@@ -1418,6 +1418,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", 0},
++ {}
++};
++MODULE_DEVICE_TABLE(acpi, amd_i2c_ucsi_match);
++
+ static int ucsi_ccg_resume(struct device *dev)
+ {
+ struct i2c_client *client = to_i2c_client(dev);
+@@ -1459,6 +1465,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,
+--
+2.27.0
+