summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/sys/dev/iicbus/rtems-i2c.c
diff options
context:
space:
mode:
authorG S Niteesh Babu <niteesh.gs@gmail.com>2021-04-19 23:32:43 +0530
committerChristian Mauderer <oss@c-mauderer.de>2021-04-22 18:45:50 +0200
commit5251e0c8164c5fbd01a5c6b4133373926f354eea (patch)
treeffcb262f2820b0e2a8fe93e645c24817411db7ec /rtemsbsd/sys/dev/iicbus/rtems-i2c.c
parentst-sdmmc: Handle short not cache aligned buffers (diff)
downloadrtems-libbsd-5251e0c8164c5fbd01a5c6b4133373926f354eea.tar.bz2
iicbus/rtems-i2c.c: Add rtems,path as an additional bus path
Adds "rtems,path" as an additional bus path for the i2c driver. Previously the bus path was provided in "rtems,i2c-path" property only.
Diffstat (limited to 'rtemsbsd/sys/dev/iicbus/rtems-i2c.c')
-rw-r--r--rtemsbsd/sys/dev/iicbus/rtems-i2c.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/rtemsbsd/sys/dev/iicbus/rtems-i2c.c b/rtemsbsd/sys/dev/iicbus/rtems-i2c.c
index b965f248..0fb14d1a 100644
--- a/rtemsbsd/sys/dev/iicbus/rtems-i2c.c
+++ b/rtemsbsd/sys/dev/iicbus/rtems-i2c.c
@@ -87,9 +87,11 @@ rtems_i2c_attach(device_t dev)
len = OF_getprop_alloc(node, "rtems,i2c-path", &sc->path);
if (len == -1){
- device_printf(sc->dev, "Path not found in Device Tree");
- OF_prop_free(sc->path);
- return (ENXIO);
+ len = OF_getprop_alloc(node, "rtems,path", &sc->path);
+ if (len == -1) {
+ device_printf(sc->dev, "Path not found in Device Tree");
+ return (ENXIO);
+ }
}
if ((sc->sc_iicbus = device_add_child(sc->dev, "iicbus", -1)) == NULL) {