summaryrefslogtreecommitdiffstats
path: root/drivers/iio/accel/kxsd9.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-09-01 11:44:40 +0200
committerJonathan Cameron <jic23@kernel.org>2016-09-18 12:28:21 +0200
commit0d1fb2d52d8b4a1124cb2db7d22c4131ad5805cf (patch)
tree33e6f6fe5223f60dac2c166749bd3fcecb2b0790 /drivers/iio/accel/kxsd9.h
parentiio: accel: kxsd9: Do away with the write2 helper (diff)
downloadlinux-0d1fb2d52d8b4a1124cb2db7d22c4131ad5805cf.tar.xz
linux-0d1fb2d52d8b4a1124cb2db7d22c4131ad5805cf.zip
iio: accel: kxsd9: Convert to use regmap for transport
This converts the KXSD9 driver to drop the custom transport mechanism and just use regmap like everything else. Tested-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/accel/kxsd9.h')
-rw-r--r--drivers/iio/accel/kxsd9.h22
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/iio/accel/kxsd9.h b/drivers/iio/accel/kxsd9.h
index b6328e88b56f..19131a7a692c 100644
--- a/drivers/iio/accel/kxsd9.h
+++ b/drivers/iio/accel/kxsd9.h
@@ -4,27 +4,7 @@
#define KXSD9_STATE_RX_SIZE 2
#define KXSD9_STATE_TX_SIZE 2
-struct kxsd9_transport;
-
-/**
- * struct kxsd9_transport - transport adapter for SPI or I2C
- * @trdev: transport device such as SPI or I2C
- * @readreg(): function to read a byte from an address in the device
- * @writereg(): function to write a byte to an address in the device
- * @readval(): function to read a 16bit value from the device
- * @rx: cache aligned read buffer
- * @tx: cache aligned write buffer
- */
-struct kxsd9_transport {
- void *trdev;
- int (*readreg) (struct kxsd9_transport *tr, u8 address);
- int (*writereg) (struct kxsd9_transport *tr, u8 address, u8 val);
- int (*readval) (struct kxsd9_transport *tr, u8 address);
- u8 rx[KXSD9_STATE_RX_SIZE] ____cacheline_aligned;
- u8 tx[KXSD9_STATE_TX_SIZE];
-};
-
int kxsd9_common_probe(struct device *parent,
- struct kxsd9_transport *transport,
+ struct regmap *map,
const char *name);
int kxsd9_common_remove(struct device *parent);