[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <511B995E.3030905@mev.co.uk>
Date: Wed, 13 Feb 2013 13:47:10 +0000
From: Ian Abbott <abbotti@....co.uk>
To: Ian Abbott <ian.abbott@....co.uk>
CC: Dan Carpenter <dan.carpenter@...cle.com>,
Peter Huewe <peterhuewe@....de>,
"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
Mori Hess <fmhess@...rs.sourceforge.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging/comedi: Fix undefined array subscript
On 2013-02-13 11:56, Ian Abbott wrote:
> For a digital output subdevice, you could either read back the current
> values directly from the hardware or just use the value previously
> written. The Velleman K8055 doesn't have a command to read back the
> digital outputs from the hardware, so the last written value has to be
> used. But what if the digital outputs have never been written (or the
> analog outputs have never been written, since the same command updates
> all analog and digital channels)? A "reset" command is sent to the
> hardware on initialization by vmk80xx_reset_device() (only called for
> the K8055), but I don't know what effect this has on the actual digital
> (and analog) outputs (though I could find out easily enough as we appear
> to have one of these kits (assembled) lying around in the office). If
> necessary, we may have to also send a "write" command on initialization
> to make the hardware outputs match the initial software state.
I've had a quick play with a K8055 and it seems the "reset" command
issued during hardware initialization has no effect on the digital
outputs. (I tested this by setting some digital outputs with comedi
instructions - there are some handy LEDs on the board that light up or
not according to the state of the digital outputs - then rmmod'ing and
modprobe'ing the vmk80xx module - the LEDs remained in the same state.)
Since we can't read back the outputs on this board we should initialize
them to a known state. I'll submit some patches later.
Nothing to do with the patch in this thread, which has my Ack.
Acked-by: Ian Abbott <abbotti@....co.uk>
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@....co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists