spibus.c (8fa0b743820f61c661ba5f3ea0e3be0dc137910e) spibus.c (cc9063987348807c6707c8f0a4ea797ebf7d2234)
1#include <sys/cdefs.h>
2__FBSDID("$FreeBSD$");
3
4#include <sys/param.h>
5#include <sys/systm.h>
6#include <sys/malloc.h>
7#include <sys/module.h>
8#include <sys/kernel.h>

--- 144 unchanged lines hidden (view full) ---

153 child = BUS_ADD_CHILD(bus, 0, dname, dunit);
154 devi = SPIBUS_IVAR(child);
155 resource_int_value(dname, dunit, "cs", &devi->cs);
156}
157
158static int
159spibus_transfer_impl(device_t dev, device_t child, struct spi_command *cmd)
160{
1#include <sys/cdefs.h>
2__FBSDID("$FreeBSD$");
3
4#include <sys/param.h>
5#include <sys/systm.h>
6#include <sys/malloc.h>
7#include <sys/module.h>
8#include <sys/kernel.h>

--- 144 unchanged lines hidden (view full) ---

153 child = BUS_ADD_CHILD(bus, 0, dname, dunit);
154 devi = SPIBUS_IVAR(child);
155 resource_int_value(dname, dunit, "cs", &devi->cs);
156}
157
158static int
159spibus_transfer_impl(device_t dev, device_t child, struct spi_command *cmd)
160{
161 /* Maybe set flags too? spi mode? */
162 spibus_get_cs(dev, &cmd->cs);
163
161 return (SPIBUS_TRANSFER(device_get_parent(dev), child, cmd));
162}
163
164static device_method_t spibus_methods[] = {
165 /* Device interface */
166 DEVMETHOD(device_probe, spibus_probe),
167 DEVMETHOD(device_attach, spibus_attach),
168 DEVMETHOD(device_detach, spibus_detach),

--- 29 unchanged lines hidden ---
164 return (SPIBUS_TRANSFER(device_get_parent(dev), child, cmd));
165}
166
167static device_method_t spibus_methods[] = {
168 /* Device interface */
169 DEVMETHOD(device_probe, spibus_probe),
170 DEVMETHOD(device_attach, spibus_attach),
171 DEVMETHOD(device_detach, spibus_detach),

--- 29 unchanged lines hidden ---