]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: c6xdigio: add readback of last pwm channel values
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 10 Mar 2014 21:07:40 +0000 (14:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Mar 2014 21:04:00 +0000 (14:04 -0700)
commit9cd4a227a307cca22d2eb4c7e9e3939490d86644
tree4788bd0baef61eaa07aa1647b805e412bc23282c
parent9f4b9cfe0a136864ff6cae7c4b1ad34f058aba59
staging: comedi: c6xdigio: add readback of last pwm channel values

Add and (*insn_read) for the PWM subdevice to allow reading back the
last value written to the channels.

There are only 2 PWM channels and they have a maxdata of 500. Pack
the last values in the subdevice 'state' instead of adding a private
data struct to this driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/c6xdigio.c