Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/broadcom/bcm2835/bcm2835_ft5406.c
Show First 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | |||||
static evdev_close_t ft5406ts_ev_close; | static evdev_close_t ft5406ts_ev_close; | ||||
static const struct evdev_methods ft5406ts_evdev_methods = { | static const struct evdev_methods ft5406ts_evdev_methods = { | ||||
.ev_open = &ft5406ts_ev_open, | .ev_open = &ft5406ts_ev_open, | ||||
.ev_close = &ft5406ts_ev_close, | .ev_close = &ft5406ts_ev_close, | ||||
}; | }; | ||||
static void | static void | ||||
ft5406ts_callout(void *data) | ft5406ts_callout(void *data) | ||||
manu: I think you can drop this compatible, this was only used in our DTS a few years ago. | |||||
{ | { | ||||
struct ft5406ts_softc *sc = (struct ft5406ts_softc *)data; | struct ft5406ts_softc *sc = (struct ft5406ts_softc *)data; | ||||
int points; | int points; | ||||
int id, i, x, y; | int id, i, x, y; | ||||
FT5406_LOCK_ASSERT(sc); | FT5406_LOCK_ASSERT(sc); | ||||
memcpy(sc->sc_window, sc->touch_buf, FT5406_WINDOW_SIZE); | memcpy(sc->sc_window, sc->touch_buf, FT5406_WINDOW_SIZE); | ||||
▲ Show 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | ft5406ts_init(void *arg) | ||||
sc->touch_buf[FT5406_NUM_POINTS] = NO_POINTS; | sc->touch_buf[FT5406_NUM_POINTS] = NO_POINTS; | ||||
callout_init_mtx(&sc->sc_callout, &sc->sc_mtx, 0); | callout_init_mtx(&sc->sc_callout, &sc->sc_mtx, 0); | ||||
} | } | ||||
static int | static int | ||||
ft5406ts_probe(device_t dev) | ft5406ts_probe(device_t dev) | ||||
{ | { | ||||
if (!ofw_bus_is_compatible(dev, "rpi,rpi-ft5406")) | if (!ofw_bus_is_compatible(dev, "raspberrypi,firmware-ts")) | ||||
return (ENXIO); | return (ENXIO); | ||||
device_set_desc(dev, "FT5406 touchscreen (VC memory interface)"); | device_set_desc(dev, "FT5406 touchscreen (VC memory interface)"); | ||||
return (BUS_PROBE_DEFAULT); | return (BUS_PROBE_DEFAULT); | ||||
} | } | ||||
static int | static int | ||||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
static devclass_t ft5406ts_devclass; | static devclass_t ft5406ts_devclass; | ||||
static driver_t ft5406ts_driver = { | static driver_t ft5406ts_driver = { | ||||
"ft5406ts", | "ft5406ts", | ||||
ft5406ts_methods, | ft5406ts_methods, | ||||
sizeof(struct ft5406ts_softc), | sizeof(struct ft5406ts_softc), | ||||
}; | }; | ||||
DRIVER_MODULE(ft5406ts, ofwbus, ft5406ts_driver, ft5406ts_devclass, 0, 0); | DRIVER_MODULE(ft5406ts, simplebus, ft5406ts_driver, ft5406ts_devclass, 0, 0); | ||||
MODULE_DEPEND(ft5406ts, evdev, 1, 1, 1); | MODULE_DEPEND(ft5406ts, evdev, 1, 1, 1); |
I think you can drop this compatible, this was only used in our DTS a few years ago.