summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/8255.h
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-08-12 11:41:28 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-08-16 12:23:26 -0700
commit5c19084bbd4ef7c0a10e5b01145b940edf872a63 (patch)
tree846edb1456a00e9a471e29370f63bdee79bff1dc /drivers/staging/comedi/drivers/8255.h
parent9067983867516a425d3382cb2eeeb234a2e8e3b6 (diff)
staging: comedi: 8255: handle memory mapped io
The drivers that use this module with memory mapped io all have the ioremap'ed base address stored in the comedi_device 'mmio' member. Introduce a default (*io) function that does 8-bit memory mapped io. Modify subdev_8255_init() so that it takes a flag parameter indicating if the io is port or memory mapped. Make the function static and rename it to __subdev_8255_init(). Introduce two exported wrappers for __subdev_8255_init(): subdev_8255_init() - for drivers that do 8-bit port io subdev_8255_mm_init() - for drivers that do 8-bit memory mapped io Use subdev_8255_mm_init() in the drivers that do 8-bit memory mapped io and remove the private (*io) functions. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/8255.h')
-rw-r--r--drivers/staging/comedi/drivers/8255.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/8255.h b/drivers/staging/comedi/drivers/8255.h
index 30848977d421..c7c6deeed026 100644
--- a/drivers/staging/comedi/drivers/8255.h
+++ b/drivers/staging/comedi/drivers/8255.h
@@ -21,9 +21,14 @@
#include "../comedidev.h"
-int subdev_8255_init(struct comedi_device *dev, struct comedi_subdevice *s,
+int subdev_8255_init(struct comedi_device *, struct comedi_subdevice *,
int (*io)(struct comedi_device *,
int, int, int, unsigned long),
unsigned long regbase);
+int subdev_8255_mm_init(struct comedi_device *, struct comedi_subdevice *,
+ int (*io)(struct comedi_device *,
+ int, int, int, unsigned long),
+ unsigned long regbase);
+
#endif