Re: [PATCH] comedi vmk80xx: Add support for treating DIO lines as a block

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

 



On Wed, May 11, 2011 at 06:15:58PM +0100, J. Ali Harlow wrote:
> If I try and use comedi_dio_bitfield2() on my shiny new VM110 board, I
> just get EBUSY back permanently. Implementing the insn_bits call seems
> to fix the problem and is good in its own right since I can now read and
> write to all the digital lines at the same time. Tested on a K8055, but
> I don't have access to a K8061.
> 
> Ali.


I need a "Signed-off-by:" line as described in the file,
Documentation/SubmittingPatches in order to be able to accept this
patch.

> diff -Naurd linux-staging-2.6.32.8/drivers/staging/comedi/drivers/vmk80xx.c linux-staging-2.6.32.8-bis/drivers/staging/comedi/drivers/vmk80xx.c

The 2.6.32.8 kernel is _very_ old, can you please generate this patch
against the latest development kernel instead so that we can apply it
properly?

> --- linux-staging-2.6.32.8/drivers/staging/comedi/drivers/vmk80xx.c	2010-02-09 12:57:19.000000000 +0000
> +++ linux-staging-2.6.32.8-bis/drivers/staging/comedi/drivers/vmk80xx.c	2011-05-11 14:19:37.551737828 +0100
> @@ -3,6 +3,7 @@
>      Velleman USB Board Low-Level Driver
>  
>      Copyright (C) 2009 Manuel Gebele <forensixs@xxxxxx>, Germany
> +    Copyright (C) 2011 J. Ali Harlow <ali@xxxxxxxxxxxxxxx>

I don't think your changes allow you to add your copyright to the file,
based on the guidelines my lawyers have given me.  Do you have different
legal advice that contridicts this?

>  
>      COMEDI - Linux Control and Measurement Device Interface
>      Copyright (C) 2000 David A. Schleef <ds@xxxxxxxxxxx>
> @@ -27,7 +28,7 @@
>  Description: Velleman USB Board Low-Level Driver
>  Devices: K8055/K8061 aka VM110/VM140
>  Author: Manuel Gebele <forensixs@xxxxxx>
> -Updated: Sun, 10 May 2009 11:14:59 +0200
> +Updated: Wed, 11 May 2011 12:44:00 +0100
>  Status: works
>  
>  Supports:
> @@ -41,6 +42,7 @@
>  /*
>  Changelog:
>  
> +0.8.81	-4-  support handling DIO lines as a block

The "updated" and "changelog" sections don't matter anymore now that the
drivers are in the main kernel tree, so you don't have to do this.

>  0.8.81	-3-  code completely rewritten (adjust driver logic)
>  0.8.81  -2-  full support for K8061
>  0.8.81  -1-  fix some mistaken among others the number of
> @@ -555,7 +557,8 @@
>  	if ((dir) & DIR_IN) {                              \
>  		if (test_bit(TRANS_IN_BUSY, &dev->flags))  \
>  			return -EBUSY;                     \
> -	} else {  /* DIR_OUT */                            \
> +	}                                                  \
> +	if ((dir) & DIR_OUT) {                             \
>  		if (test_bit(TRANS_OUT_BUSY, &dev->flags)) \
>  			return -EBUSY;                     \
>  	}                                                  \
> @@ -683,6 +686,48 @@
>  	return n;
>  }
>  
> +static int vmk80xx_di_bits(struct comedi_device *cdev,
> +			   struct comedi_subdevice *s,
> +			   struct comedi_insn *insn, unsigned int *data)
> +{
> +	struct vmk80xx_usb *dev = cdev->private;
> +	unsigned char *rx_buf;
> +	int reg;
> +	int retval;
> +
> +	dbgvm("vmk80xx: %s\n", __func__);
> +
> +	rudimentary_check(DIR_IN);
> +
> +	down(&dev->limit_sem);
> +
> +	rx_buf = dev->usb_rx_buf;
> +
> +	if (dev->board.model == VMK8061_MODEL) {
> +		reg = VMK8061_DI_REG;
> +		dev->usb_tx_buf[0] = VMK8061_CMD_RD_DI;
> +	} else
> +		reg = VMK8055_DI_REG;
> +
> +	retval = vmk80xx_read_packet(dev);
> +
> +	if (!retval)
> +	{

Please run your patch through the scripts/checkpatch.pl tool and fix the
issues it finds before making us do the same thing and pestering you to
make them :)

Could you make these changes and resend the patch so we can apply it to
the tree?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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