Re: [PATCH 05/22] staging: comedi: s626: factor eos interrupt handling from s626_irq_handler()

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

 



On Mon, Mar 25, 2013 at 01:29:26PM +0000, Ian Abbott wrote:
> On 2013-03-25 12:52, Dan Carpenter wrote:
> >On Fri, Mar 22, 2013 at 03:55:51PM -0700, H Hartley Sweeten wrote:
> >>+	/*
> >>+	 * Init ptr to DMA buffer that holds new ADC data.  We skip the
> >>+	 * first uint16_t in the buffer because it contains junk data
> >>+	 * from the final ADC of the previous poll list scan.
> >>+	 */
> >>+	int32_t *readaddr = (int32_t *)devpriv->ANABuf.LogicalBase + 1;
> >
> >This was there since the code was merged, but why does it say we're
> >going to skip the first uint16_t when we actually skip int32_t?
> >Does anyone know?
> 
> I think the 16-bit samples are padded out to 32-bits by the DMA
> transfer.  The loop following the above line of code converts the
> 32-bit DMA'ed samples back to 16-bit samples.

Ah.  Gotcha.  Thanks.

regards,
dan carpenter

_______________________________________________
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