aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorLars-Peter Clausen <[email protected]>2012-04-25 09:44:59 +0200
committerGreg Kroah-Hartman <[email protected]>2012-04-25 10:57:20 -0700
commitcae329e04ac1f187338d0febd4e1ddf81db582cf (patch)
tree9d2f0d96bd6d82aeeeb1c6b1465e14812e06f09c /tools/perf/scripts/python
parent83f0f5723eb86ed0fcdeafde4a495303a1e19004 (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 <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions