summaryrefslogtreecommitdiff
path: root/src/drivers/i2c/tpm/chip.c
diff options
context:
space:
mode:
authorNaresh G Solanki <naresh.solanki@intel.com>2018-06-04 17:45:19 +0530
committerPatrick Georgi <pgeorgi@google.com>2018-06-06 10:27:24 +0000
commit69e9e715a644aef8db118a30dee3878c561b976a (patch)
treebe1ac5f32e7b0ac4aa33db4b2518b667bbd7191b /src/drivers/i2c/tpm/chip.c
parent5c61fa851fa4114ee2491d7d7319c8ab2071e9fb (diff)
downloadcoreboot-69e9e715a644aef8db118a30dee3878c561b976a.tar.xz
src/driver/i2c/{generic,hid,tpm,max}: Update device name based on devicetree.cb
Name i2c device structure based on that in devicetree.cb Now log looks like: I2C: 01:0a (WCOM Touchscreen) I2C: 03:13 (Realtek RT5663) I2C: 03:39 (SSM4567 Right Speaker Amp) I2C: 03:3a (SSM4567 Left Speaker Amp) BUG=None BRANCH=None TEST=Build & boot Soraka Change-Id: I5dbb66ab705cd8601b8b1dc94bc6ee9f181b7be2 Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com> Reviewed-on: https://review.coreboot.org/26830 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/drivers/i2c/tpm/chip.c')
-rw-r--r--src/drivers/i2c/tpm/chip.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/i2c/tpm/chip.c b/src/drivers/i2c/tpm/chip.c
index 2655b0da07..c2af071932 100644
--- a/src/drivers/i2c/tpm/chip.c
+++ b/src/drivers/i2c/tpm/chip.c
@@ -84,7 +84,13 @@ static struct device_operations i2c_tpm_ops = {
static void i2c_tpm_enable(struct device *dev)
{
+ struct drivers_i2c_tpm_config *config = dev->chip_info;
+
dev->ops = &i2c_tpm_ops;
+
+ if (config && config->desc) {
+ dev->name = config->desc;
+ }
}
struct chip_operations drivers_i2c_tpm_ops = {