[PATCH] staging: comedi: adv_pci_dio: separate out PCI-1760 support

Ian Abbott abbotti at mev.co.uk
Fri Nov 13 10:14:33 UTC 2015


On 12/11/15 22:28, H Hartley Sweeten wrote:
> The PCI-1760 board unique. It uses a outgoing/incoming mailbox programming

I wouldn't normally complain, but if you're going to repost, the word 
"is" is missing in the first sentence.

> sequence to access the hardware. The other boards supported by this driver
> use simple register mapping. Including support for the PCI-1760 in this
> driver just makes it harder to understand.
>
> Separate out the PCI-1760 support into a new driver, adv_pci1760.
>
> Clean up the new driver. The original code had a bunch of CamelCase and
> other checkpatch.pl issues.
>
> The code used to access the outgoing/incoming mailboxes was also a bit
> awkward with the passing of the arrays for the outgoing and incoming
> mailbox bytes. Replace them with two new functions that send a command
> and return the feedback data from the command based on the programming
> flow chart in the datasheet for the PCI-1760.
>
> The new adv_pci1760 driver also fixes the incomplete timer subdevice.
> This subdevice is actually the 2 PWM outputs so the subdevice type
> has been changed to COMEDI_SUBD_PWM.
>
> The counter subdevice support was not complete in the original code.
> For now that subdevice has been disabled (COMEDI_SUBD_UNUSED).
>
> Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
> Cc: Ian Abbott <abbotti at mev.co.uk>
> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> ---
[snip]
> diff --git a/drivers/staging/comedi/drivers/adv_pci1760.c b/drivers/staging/comedi/drivers/adv_pci1760.c
> new file mode 100644
> index 0000000..8d71165
> --- /dev/null
> +++ b/drivers/staging/comedi/drivers/adv_pci1760.c
[snip]
> +/*
> + * PCI-760 Register Map

Nasty typo!

Apart from that, it looks great.  Feel free to add "Reviewed-by: Ian 
Abbott <abbotti at mev.co.uk>" if reposting.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-


More information about the devel mailing list