aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-04-25 09:44:59 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-25 10:57:20 -0700
commitcae329e04ac1f187338d0febd4e1ddf81db582cf (patch)
tree9d2f0d96bd6d82aeeeb1c6b1465e14812e06f09c /include/linux
parentstaging:iio:dac:ad5446: Convert to extended channel attributes (diff)
staging:iio:dac:ad5446: Consolidate store_sample and store_pwr_down functions
The devices supported by this drivers only have a single shift register, which contains both the power down mode and the output sample. So writing the power down mode and the output sample can be done by the same function. Call this function prepare_write as it will prepare the spi message for a write. Also introduce a small helper function which performs the whole write by calling the chip the specific prepare function followed by a spi_sync. The two power down bits are always placed ontop of the msb of the output sample, so we can easily calculate their position by adding the channels shift to the channels realbits. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions