~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/comedi/comedi_8255.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0+ */
  2 /*
  3  * comedi_8255.h
  4  * Generic 8255 digital I/O subdevice support
  5  *
  6  * COMEDI - Linux Control and Measurement Device Interface
  7  * Copyright (C) 1998 David A. Schleef <ds@schleef.org>
  8  */
  9 
 10 #ifndef _COMEDI_8255_H
 11 #define _COMEDI_8255_H
 12 
 13 #include <linux/errno.h>
 14 
 15 #define I8255_SIZE              0x04
 16 
 17 #define I8255_DATA_A_REG        0x00
 18 #define I8255_DATA_B_REG        0x01
 19 #define I8255_DATA_C_REG        0x02
 20 #define I8255_CTRL_REG          0x03
 21 #define I8255_CTRL_C_LO_IO      BIT(0)
 22 #define I8255_CTRL_B_IO         BIT(1)
 23 #define I8255_CTRL_B_MODE       BIT(2)
 24 #define I8255_CTRL_C_HI_IO      BIT(3)
 25 #define I8255_CTRL_A_IO         BIT(4)
 26 #define I8255_CTRL_A_MODE(x)    ((x) << 5)
 27 #define I8255_CTRL_CW           BIT(7)
 28 
 29 struct comedi_device;
 30 struct comedi_subdevice;
 31 
 32 #ifdef CONFIG_HAS_IOPORT
 33 int subdev_8255_io_init(struct comedi_device *dev, struct comedi_subdevice *s,
 34                         unsigned long regbase);
 35 #else
 36 static inline int subdev_8255_io_init(struct comedi_device *dev,
 37                                       struct comedi_subdevice *s,
 38                                       unsigned long regbase)
 39 {
 40         return -ENXIO;
 41 }
 42 #endif
 43 
 44 int subdev_8255_mm_init(struct comedi_device *dev, struct comedi_subdevice *s,
 45                         unsigned long regbase);
 46 
 47 int subdev_8255_cb_init(struct comedi_device *dev, struct comedi_subdevice *s,
 48                         int (*io)(struct comedi_device *dev, int dir, int port,
 49                                   int data, unsigned long context),
 50                         unsigned long context);
 51 
 52 unsigned long subdev_8255_regbase(struct comedi_subdevice *s);
 53 
 54 #endif
 55 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php