Re: [PATCH v2 00/36] staging: comedi: cleanup 8254 timer code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23/02/15 21:57, H Hartley Sweeten wrote:
This series introduces a new module. comedi_8254, to support the 8254 timer
devices that are commonly found on data acquisition card. This module replaces
the current support provided by the inline functions in 8253.h and consolidates
the subdevice support code found in the comedi drivers.

v2: fix some issues pointed out by Ian Abbott

1) Patches 1, 7, 12, 13, and 26

    Fix a logic error in the use of the 'regshift' variable used in the
    comedi_8254 module to calculate the offsets for the registers.

    As Ian Abbott pointed out, the 'regshift' is used to account for gaps
    between the registers. The 'iosize' will automatically space the registers
    correctly (assuming no gaps). Example:

                                         Register offsets
    iosize          regshift = 0         regshift = 1         regshift = 2
    --------------  -------------------  -------------------  -------------------
    I8254_IO8 (1)   0x00 0x01 0x02 0x03  0x00 0x02 0x04 0x06  0x00 0x04 0x08 0x0c
    I8254_IO16 (2)  0x00 0x02 0x04 0x06  0x00 0x04 0x08 0x0c  0x00 0x08 0x10 0x18
    I8254_IO32 (4)  0x00 0x04 0x08 0x0c  0x00 0x08 0x10 0x18  0x00 0x10 0x20 0x30

2) Patch 1

    AND the return value of __i8254_read() with 0xff to ensure that the
    returned value is valid.

H Hartley Sweeten (36):
   staging: comedi: comedi_8254: introduce module for 8254 timer support
   staging: comedi: add 'pacer' member to struct comedi_device
   staging: comedi: pcl812: convert driver to use the comedi_8254 module
   staging: comedi: pcl816: convert driver to use the comedi_8254 module
   staging: comedi: pcl818: convert driver to use the comedi_8254 module
   staging: comedi: pcl711: convert driver to use the comedi_8254 module
   staging: comedi: adl_pci9111: convert driver to use the comedi_8254 module
   staging: comedi: amplc_pci224: convert driver to use the comedi_8254 module
   staging: comedi: cb_pcidas: convert driver to use the comedi_8254 module
   staging: comedi: das800: convert driver to use the comedi_8254 module
   staging: comedi: das16m1: convert driver to use the comedi_8254 module
   staging: comedi: cb_das16_cs: convert driver to use the comedi_8254 module
   staging: comedi: adv_pci1710: convert driver to use the comedi_8254 module
   staging: comedi: amplc_pci230: convert driver to use the comedi_8254 module
   staging: comedi: das08: convert driver to use the comedi_8254 module
   staging: comedi: ni_at_ao: convert driver to use the comedi_8254 module
   staging: comedi: ni_at_a2150: convert driver to use the comedi_8254 module
   staging: comedi: das6402: convert driver to use the comedi_8254 module
   staging: comedi: das1800: convert driver to use the comedi_8254 module
   staging: comedi: adv_pci_dio: simplify counter subdevice I/O
   staging: comedi: adv_pci_dio: refactor 's8254' boardinfo
   staging: comedi: adv_pci_dio: convert driver to use the comedi_8254 module
   staging: comedi: me4000: convert driver to use the comedi_8254 module
   staging: comedi: cb_pcidas64: remove unnecessary include
   staging: comedi: das16: convert driver to use the comedi_8254 module
   staging: comedi: adl_pci9118: convert driver to use the comedi_8254 module
   staging: comedi: amplc_dio200_common: introduce DIO200_CLK_SEL() macro
   staging: comedi: amplc_dio200_common: introduce DIO200_GAT_SEL() macro
   staging: comedi: amplc_dio200_common: remove 'clk_sce_ofs' from struct dio200_subdev_8254
   staging: comedi: amplc_dio200_common: remove 'gat_sce_ofs' from struct dio200_subdev_8254
   staging: comedi: amplc_dio200_common: remove 'which' from struct dio200_subdev_8254
   staging: comedi: amplc_dio200_common: remove unnecessary 'counter_number' checks
   staging: comedi: amplc_dio200_common: remove 'spinlock' from struct dio200_subdev_8254
   staging: comedi: amplc_dio200_common: convert driver to use the comedi_8254 module
   staging: comedi: ni_labpc_common: convert driver to use the comedi_8254 module
   staging: comedi: 8253.h: remove unused header

  drivers/staging/comedi/Kconfig                     |  26 +
  drivers/staging/comedi/comedidev.h                 |   1 +
  drivers/staging/comedi/drivers.c                   |   2 +
  drivers/staging/comedi/drivers/8253.h              | 347 -----------
  drivers/staging/comedi/drivers/Makefile            |   1 +
  drivers/staging/comedi/drivers/adl_pci9111.c       |  39 +-
  drivers/staging/comedi/drivers/adl_pci9118.c       |  93 +--
  drivers/staging/comedi/drivers/adv_pci1710.c       | 206 ++-----
  drivers/staging/comedi/drivers/adv_pci_dio.c       | 135 +----
  .../staging/comedi/drivers/amplc_dio200_common.c   | 304 +++-------
  drivers/staging/comedi/drivers/amplc_pci224.c      |  34 +-
  drivers/staging/comedi/drivers/amplc_pci230.c      |  47 +-
  drivers/staging/comedi/drivers/cb_das16_cs.c       |  12 +-
  drivers/staging/comedi/drivers/cb_pcidas.c         |  86 +--
  drivers/staging/comedi/drivers/cb_pcidas64.c       |   1 -
  drivers/staging/comedi/drivers/comedi_8254.c       | 664 +++++++++++++++++++++
  drivers/staging/comedi/drivers/comedi_8254.h       | 133 +++++
  drivers/staging/comedi/drivers/das08.c             |  77 +--
  drivers/staging/comedi/drivers/das16.c             |  44 +-
  drivers/staging/comedi/drivers/das16m1.c           |  79 ++-
  drivers/staging/comedi/drivers/das1800.c           |  81 +--
  drivers/staging/comedi/drivers/das6402.c           |  51 +-
  drivers/staging/comedi/drivers/das800.c            |  38 +-
  drivers/staging/comedi/drivers/me4000.c            | 108 +---
  drivers/staging/comedi/drivers/ni_at_a2150.c       |  17 +-
  drivers/staging/comedi/drivers/ni_at_ao.c          |  14 +-
  drivers/staging/comedi/drivers/ni_labpc.c          |   1 +
  drivers/staging/comedi/drivers/ni_labpc.h          |  16 +-
  drivers/staging/comedi/drivers/ni_labpc_common.c   | 182 +++---
  drivers/staging/comedi/drivers/ni_labpc_cs.c       |  14 +-
  drivers/staging/comedi/drivers/ni_labpc_pci.c      |   8 +-
  drivers/staging/comedi/drivers/pcl711.c            |  42 +-
  drivers/staging/comedi/drivers/pcl812.c            |  57 +-
  drivers/staging/comedi/drivers/pcl816.c            |  59 +-
  drivers/staging/comedi/drivers/pcl818.c            |  80 +--
  35 files changed, 1417 insertions(+), 1682 deletions(-)
  delete mode 100644 drivers/staging/comedi/drivers/8253.h
  create mode 100644 drivers/staging/comedi/drivers/comedi_8254.c
  create mode 100644 drivers/staging/comedi/drivers/comedi_8254.h


Patch 34 is wrong, but the others look okay.

For patches 01-33, 35-36:
Reviewed-by: Ian Abbott <abbotti@xxxxxxxxx>

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@xxxxxxxxx> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux