Date: Wed, 4 Dec 2019 13:28:17 +0000 (UTC) From: Luiz Otavio O Souza <loos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355387 - stable/11/sys/dev/iicbus/twsi Message-ID: <201912041328.xB4DSH7l025407@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: loos Date: Wed Dec 4 13:28:17 2019 New Revision: 355387 URL: https://svnweb.freebsd.org/changeset/base/355387 Log: MFC r320159: Add the ofw_bus_get_node() callback in mv_twsi, it is mandatory for the ofw_iicbus usage. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: stable/11/sys/dev/iicbus/twsi/mv_twsi.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iicbus/twsi/mv_twsi.c ============================================================================== --- stable/11/sys/dev/iicbus/twsi/mv_twsi.c Wed Dec 4 09:24:36 2019 (r355386) +++ stable/11/sys/dev/iicbus/twsi/mv_twsi.c Wed Dec 4 13:28:17 2019 (r355387) @@ -91,6 +91,7 @@ __FBSDID("$FreeBSD$"); #define debugf(fmt, args...) #endif +static phandle_t mv_twsi_get_node(device_t, device_t); static int mv_twsi_probe(device_t); static int mv_twsi_attach(device_t); @@ -105,7 +106,10 @@ static device_method_t mv_twsi_methods[] = { DEVMETHOD(device_probe, mv_twsi_probe), DEVMETHOD(device_attach, mv_twsi_attach), - { 0, 0 } + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, mv_twsi_get_node), + + DEVMETHOD_END }; DEFINE_CLASS_1(twsi, mv_twsi_driver, mv_twsi_methods, @@ -116,6 +120,14 @@ static devclass_t mv_twsi_devclass; DRIVER_MODULE(twsi, simplebus, mv_twsi_driver, mv_twsi_devclass, 0, 0); DRIVER_MODULE(iicbus, twsi, iicbus_driver, iicbus_devclass, 0, 0); MODULE_DEPEND(twsi, iicbus, 1, 1, 1); + +static phandle_t +mv_twsi_get_node(device_t bus, device_t dev) +{ + + /* Used by ofw_iicbus. */ + return (ofw_bus_get_node(bus)); +} static int mv_twsi_probe(device_t dev)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912041328.xB4DSH7l025407>