The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/spibus/spibusvar.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* $FreeBSD$ */
    2 
    3 #define SPIBUS_IVAR(d) (struct spibus_ivar *) device_get_ivars(d)
    4 #define SPIBUS_SOFTC(d) (struct spibus_softc *) device_get_softc(d)
    5 
    6 struct spibus_softc
    7 {
    8         device_t        dev;
    9 };
   10 
   11 struct spibus_ivar
   12 {
   13         uint32_t        cs;
   14 };
   15 
   16 enum {
   17         SPIBUS_IVAR_CS          /* chip select that we're on */
   18 };
   19 
   20 #define SPIBUS_ACCESSOR(A, B, T)                                        \
   21 static inline int                                                       \
   22 spibus_get_ ## A(device_t dev, T *t)                                    \
   23 {                                                                       \
   24         return BUS_READ_IVAR(device_get_parent(dev), dev,               \
   25             SPIBUS_IVAR_ ## B, (uintptr_t *) t);                        \
   26 }
   27         
   28 SPIBUS_ACCESSOR(cs,             CS,             uint32_t)
   29 
   30 extern driver_t spibus_driver;
   31 extern devclass_t spibus_devclass;

Cache object: 9ada1d96c498f5ba8191a037a0d9927f


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.