aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/intel_i2c.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-16 21:20:15 -0700
committerSimon Glass <sjg@chromium.org>2020-12-18 20:32:21 -0700
commit16df99324663fd3f88cb5e1ce241ee3f9f9ddacd (patch)
tree7f07261d469a4e588ef182be3b12a9817d010e5c /drivers/i2c/intel_i2c.c
parent5c5800225501dc18eff71ecf4e5e45d0309f40ca (diff)
i2c: Update for new sequence numbers
Use the new sequence number in all cases. Drop the logic to check for a valid number in designware_i2c, since it will always be valid. Also drop the numbering in the uclass, since we can rely on driver model giving us the right sequence numbers. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/i2c/intel_i2c.c')
-rw-r--r--drivers/i2c/intel_i2c.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/i2c/intel_i2c.c b/drivers/i2c/intel_i2c.c
index c92074a619..52f7a528ef 100644
--- a/drivers/i2c/intel_i2c.c
+++ b/drivers/i2c/intel_i2c.c
@@ -269,21 +269,11 @@ static int intel_i2c_probe(struct udevice *dev)
static int intel_i2c_bind(struct udevice *dev)
{
- static int num_cards __attribute__ ((section(".data")));
char name[20];
/* Create a unique device name for PCI type devices */
if (device_is_on_pci_bus(dev)) {
- /*
- * ToDo:
- * Setting req_seq in the driver is probably not recommended.
- * But without a DT alias the number is not configured. And
- * using this driver is impossible for PCIe I2C devices.
- * This can be removed, once a better (correct) way for this
- * is found and implemented.
- */
- dev->req_seq = num_cards;
- sprintf(name, "intel_i2c#%u", num_cards++);
+ sprintf(name, "intel_i2c#%u", dev_seq(dev));
device_set_name(dev, name);
}