chrome_ec.c (263936) | chrome_ec.c (266341) |
---|---|
1/*- 2 * Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * SUCH DAMAGE. 25 */ 26 27/* 28 * Samsung Chromebook Embedded Controller 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * SUCH DAMAGE. 25 */ 26 27/* 28 * Samsung Chromebook Embedded Controller 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/arm/samsung/exynos/chrome_ec.c 263936 2014-03-30 15:22:36Z br $"); | 32__FBSDID("$FreeBSD: stable/10/sys/arm/samsung/exynos/chrome_ec.c 266341 2014-05-17 19:37:04Z ian $"); |
33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/bus.h> 37#include <sys/kernel.h> 38#include <sys/module.h> 39#include <sys/malloc.h> 40#include <sys/rman.h> --- 188 unchanged lines hidden (view full) --- 229 230 if (bus_claim(sc) != 0) { 231 return (ENXIO); 232 } 233 234 return (0); 235} 236 | 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/bus.h> 37#include <sys/kernel.h> 38#include <sys/module.h> 39#include <sys/malloc.h> 40#include <sys/rman.h> --- 188 unchanged lines hidden (view full) --- 229 230 if (bus_claim(sc) != 0) { 231 return (ENXIO); 232 } 233 234 return (0); 235} 236 |
237static int 238ec_detach(device_t dev) 239{ 240 struct ec_softc *sc; 241 242 sc = device_get_softc(dev); 243 244 bus_release(sc); 245 246 return (0); 247} 248 |
|
237static device_method_t ec_methods[] = { 238 DEVMETHOD(device_probe, ec_probe), 239 DEVMETHOD(device_attach, ec_attach), | 249static device_method_t ec_methods[] = { 250 DEVMETHOD(device_probe, ec_probe), 251 DEVMETHOD(device_attach, ec_attach), |
252 DEVMETHOD(device_detach, ec_detach), |
|
240 { 0, 0 } 241}; 242 243static driver_t ec_driver = { 244 "chrome_ec", 245 ec_methods, 246 sizeof(struct ec_softc), 247}; 248 249static devclass_t ec_devclass; 250 251DRIVER_MODULE(chrome_ec, iicbus, ec_driver, ec_devclass, 0, 0); 252MODULE_VERSION(chrome_ec, 1); 253MODULE_DEPEND(chrome_ec, iicbus, 1, 1, 1); | 253 { 0, 0 } 254}; 255 256static driver_t ec_driver = { 257 "chrome_ec", 258 ec_methods, 259 sizeof(struct ec_softc), 260}; 261 262static devclass_t ec_devclass; 263 264DRIVER_MODULE(chrome_ec, iicbus, ec_driver, ec_devclass, 0, 0); 265MODULE_VERSION(chrome_ec, 1); 266MODULE_DEPEND(chrome_ec, iicbus, 1, 1, 1); |