diff mbox series

[U-Boot,v4,05/34] w1: identify devices with w1-eeprom uclass

Message ID 1537256157-18001-6-git-send-email-eugen.hristev@microchip.com
State Accepted
Delegated to: Tom Rini
Headers show
Series Add support for 1wire protocol and 1wire eeproms | expand

Commit Message

Eugen Hristev Sept. 18, 2018, 7:35 a.m. UTC
When a new device is discovered, this may be a w1 eeprom device.
Attempt to find the proper node and driver from the w1-eeprom subsystem.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
---
 drivers/w1/w1-uclass.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Tom Rini Sept. 29, 2018, 3:44 p.m. UTC | #1
On Tue, Sep 18, 2018 at 10:35:28AM +0300, Eugen Hristev wrote:

> When a new device is discovered, this may be a w1 eeprom device.
> Attempt to find the proper node and driver from the w1-eeprom subsystem.
> 
> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c
index 44759fe..aecf7fe 100644
--- a/drivers/w1/w1-uclass.c
+++ b/drivers/w1/w1-uclass.c
@@ -13,6 +13,7 @@ 
 #include <common.h>
 #include <dm.h>
 #include <w1.h>
+#include <w1-eeprom.h>
 
 #include <dm/device-internal.h>
 
@@ -98,6 +99,9 @@  static int w1_enumerate(struct udevice *bus)
 
 			debug("%s: Detected new device 0x%llx (family 0x%x)\n",
 			      bus->name, rn, (u8)(rn & 0xff));
+
+			/* attempt to register as w1-eeprom device */
+			w1_eeprom_register_new_device(rn);
 		}
 	}