1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-26 11:47:31 +00:00

Set maximum bus clock speed from hints when attaching hinted spibus(4) children.

Some devices (such as spigen(4)) document that this works, but it appears that the
code to implement it never got added.
This commit is contained in:
Ian Lepore 2019-02-25 23:49:58 +00:00
parent 781e78182d
commit 47a7da7612
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=344556

View File

@ -216,6 +216,7 @@ spibus_hinted_child(device_t bus, const char *dname, int dunit)
child = BUS_ADD_CHILD(bus, 0, dname, dunit);
devi = SPIBUS_IVAR(child);
devi->mode = SPIBUS_MODE_NONE;
resource_int_value(dname, dunit, "clock", &devi->clock);
resource_int_value(dname, dunit, "cs", &devi->cs);
resource_int_value(dname, dunit, "mode", &devi->mode);
}