summaryrefslogtreecommitdiff
path: root/src/drivers/i2c/generic/generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/i2c/generic/generic.c')
-rw-r--r--src/drivers/i2c/generic/generic.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c
index 46fff4ac6d..7f1ce16fea 100644
--- a/src/drivers/i2c/generic/generic.c
+++ b/src/drivers/i2c/generic/generic.c
@@ -217,6 +217,11 @@ static void i2c_generic_enable(struct device *dev)
}
dev->ops = &i2c_generic_ops;
+
+ /* Name the device as per description provided in devicetree */
+ if (config && config->desc) {
+ dev->name = config->desc;
+ }
}
struct chip_operations drivers_i2c_generic_ops = {