diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2010-05-07 14:38:58 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 21:33:24 (GMT) |
commit | b155498b1842090f2cf5164908deaa0762a9a8b1 (patch) | |
tree | 015d38b86252a4e4b8124a6fd72d0b2e9af61ff1 /drivers | |
parent | e5107fb87018c8fc6b7376c4669dc877ab65db47 (diff) | |
download | linux-b155498b1842090f2cf5164908deaa0762a9a8b1.tar.xz |
staging: iio: adis16400 clean out some unused code
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/iio/imu/adis16400.h | 9 | ||||
-rw-r--r-- | drivers/staging/iio/imu/adis16400_core.c | 55 |
2 files changed, 3 insertions, 61 deletions
diff --git a/drivers/staging/iio/imu/adis16400.h b/drivers/staging/iio/imu/adis16400.h index a8062f6..5a69a7a 100644 --- a/drivers/staging/iio/imu/adis16400.h +++ b/drivers/staging/iio/imu/adis16400.h @@ -147,21 +147,12 @@ struct adis16400_state { struct mutex buf_lock; }; -int adis16400_spi_write_reg_8(struct device *dev, - u8 reg_address, - u8 val); - int adis16400_spi_read_burst(struct device *dev, u8 *rx); -int adis16400_spi_read_sequence(struct device *dev, - u8 *tx, u8 *rx, int num); - int adis16400_set_irq(struct device *dev, bool enable); int adis16400_reset(struct device *dev); -int adis16400_stop_device(struct device *dev); - int adis16400_check_status(struct device *dev); #ifdef CONFIG_IIO_RING_BUFFER diff --git a/drivers/staging/iio/imu/adis16400_core.c b/drivers/staging/iio/imu/adis16400_core.c index 868c526..e69e2ce 100644 --- a/drivers/staging/iio/imu/adis16400_core.c +++ b/drivers/staging/iio/imu/adis16400_core.c @@ -47,7 +47,7 @@ * @reg_address: the address of the register to be written * @val: the value to write **/ -int adis16400_spi_write_reg_8(struct device *dev, +static int adis16400_spi_write_reg_8(struct device *dev, u8 reg_address, u8 val) { @@ -209,55 +209,6 @@ int adis16400_spi_read_burst(struct device *dev, u8 *rx) return ret; } -/** - * adis16400_spi_read_sequence() - read a sequence of 16-bit registers - * @dev: device associated with child of actual device (iio_dev or iio_trig) - * @tx: register addresses in bytes 0,2,4,6... (min size is 2*num bytes) - * @rx: somewhere to pass back the value read (min size is 2*num bytes) - **/ -int adis16400_spi_read_sequence(struct device *dev, - u8 *tx, u8 *rx, int num) -{ - struct spi_message msg; - struct spi_transfer *xfers; - struct iio_dev *indio_dev = dev_get_drvdata(dev); - struct adis16400_state *st = iio_dev_get_devdata(indio_dev); - int ret, i; - - xfers = kzalloc(num + 1, GFP_KERNEL); - if (xfers == NULL) { - dev_err(&st->us->dev, "memory alloc failed"); - ret = -ENOMEM; - goto error_ret; - } - - /* tx: |add1|addr2|addr3|...|addrN |zero| - * rx: |zero|res1 |res2 |...|resN-1|resN| */ - spi_message_init(&msg); - for (i = 0; i < num + 1; i++) { - if (i > 0) - xfers[i].rx_buf = st->rx + 2*(i - 1); - if (i < num) - xfers[i].tx_buf = st->tx + 2*i; - xfers[i].bits_per_word = 8; - xfers[i].len = 2; - xfers[i].cs_change = 1; - spi_message_add_tail(&xfers[i], &msg); - } - - mutex_lock(&st->buf_lock); - - ret = spi_sync(st->us, &msg); - if (ret) - dev_err(&st->us->dev, "problem when reading sequence"); - - mutex_unlock(&st->buf_lock); - kfree(xfers); - -error_ret: - return ret; -} - static ssize_t adis16400_spi_read_signed(struct device *dev, struct device_attribute *attr, char *buf, @@ -450,7 +401,7 @@ int adis16400_reset(struct device *dev) } /* Power down the device */ -int adis16400_stop_device(struct device *dev) +static int adis16400_stop_device(struct device *dev) { int ret; u16 val = ADIS16400_SLP_CNT_POWER_OFF; @@ -462,7 +413,7 @@ int adis16400_stop_device(struct device *dev) return ret; } -int adis16400_self_test(struct device *dev) +static int adis16400_self_test(struct device *dev) { int ret; ret = adis16400_spi_write_reg_16(dev, |