summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/accel/lis3l02dq_ring.c
diff options
context:
space:
mode:
authorPeter Meerwald2012-08-22 21:42:00 +0200
committerJonathan Cameron2012-09-03 21:26:40 +0200
commit91b4171f4e7e2d49aee54259b50e703e09bcff20 (patch)
tree9d2410de5c66b3b9472bea5ffdef2ef7d8f7eeaf /drivers/staging/iio/accel/lis3l02dq_ring.c
parentiio: kfifo - add poll support. (diff)
downloadkernel-qcow2-linux-91b4171f4e7e2d49aee54259b50e703e09bcff20.tar.gz
kernel-qcow2-linux-91b4171f4e7e2d49aee54259b50e703e09bcff20.tar.xz
kernel-qcow2-linux-91b4171f4e7e2d49aee54259b50e703e09bcff20.zip
staging iio: lis3l02dq cleanup
fixes some typos, whitespace, comments Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio/accel/lis3l02dq_ring.c')
-rw-r--r--drivers/staging/iio/accel/lis3l02dq_ring.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c
index 18d108fd967a..7da2703885d6 100644
--- a/drivers/staging/iio/accel/lis3l02dq_ring.c
+++ b/drivers/staging/iio/accel/lis3l02dq_ring.c
@@ -14,7 +14,7 @@
#include "lis3l02dq.h"
/**
- * combine_8_to_16() utility function to munge to u8s into u16
+ * combine_8_to_16() utility function to munge two u8s into u16
**/
static inline u16 combine_8_to_16(u8 lower, u8 upper)
{
@@ -49,7 +49,7 @@ static const u8 read_all_tx_array[] = {
/**
* lis3l02dq_read_all() Reads all channels currently selected
- * @st: device specific state
+ * @indio_dev: IIO device state
* @rx_array: (dma capable) receive array, must be at least
* 4*number of channels
**/
@@ -170,22 +170,22 @@ __lis3l02dq_write_data_ready_config(struct iio_dev *indio_dev, bool state)
bool currentlyset;
struct lis3l02dq_state *st = iio_priv(indio_dev);
-/* Get the current event mask register */
+ /* Get the current event mask register */
ret = lis3l02dq_spi_read_reg_8(indio_dev,
LIS3L02DQ_REG_CTRL_2_ADDR,
&valold);
if (ret)
goto error_ret;
-/* Find out if data ready is already on */
+ /* Find out if data ready is already on */
currentlyset
= valold & LIS3L02DQ_REG_CTRL_2_ENABLE_DATA_READY_GENERATION;
-/* Disable requested */
+ /* Disable requested */
if (!state && currentlyset) {
- /* disable the data ready signal */
+ /* Disable the data ready signal */
valold &= ~LIS3L02DQ_REG_CTRL_2_ENABLE_DATA_READY_GENERATION;
- /* The double write is to overcome a hardware bug?*/
+ /* The double write is to overcome a hardware bug? */
ret = lis3l02dq_spi_write_reg_8(indio_dev,
LIS3L02DQ_REG_CTRL_2_ADDR,
valold);
@@ -197,10 +197,10 @@ __lis3l02dq_write_data_ready_config(struct iio_dev *indio_dev, bool state)
if (ret)
goto error_ret;
st->trigger_on = false;
-/* Enable requested */
+ /* Enable requested */
} else if (state && !currentlyset) {
- /* if not set, enable requested */
- /* first disable all events */
+ /* If not set, enable requested
+ * first disable all events */
ret = lis3l02dq_disable_all_events(indio_dev);
if (ret < 0)
goto error_ret;
@@ -239,7 +239,7 @@ static int lis3l02dq_data_rdy_trigger_set_state(struct iio_trigger *trig,
if (state == false) {
/*
* A possible quirk with the handler is currently worked around
- * by ensuring outstanding read events are cleared.
+ * by ensuring outstanding read events are cleared.
*/
ret = lis3l02dq_read_all(indio_dev, NULL);
}
@@ -250,7 +250,7 @@ static int lis3l02dq_data_rdy_trigger_set_state(struct iio_trigger *trig,
}
/**
- * lis3l02dq_trig_try_reen() try renabling irq for data rdy trigger
+ * lis3l02dq_trig_try_reen() try reenabling irq for data rdy trigger
* @trig: the datardy trigger
*/
static int lis3l02dq_trig_try_reen(struct iio_trigger *trig)
@@ -259,8 +259,8 @@ static int lis3l02dq_trig_try_reen(struct iio_trigger *trig)
struct lis3l02dq_state *st = iio_priv(indio_dev);
int i;
- /* If gpio still high (or high again) */
- /* In theory possible we will need to do this several times */
+ /* If gpio still high (or high again)
+ * In theory possible we will need to do this several times */
for (i = 0; i < 5; i++)
if (gpio_get_value(irq_to_gpio(st->us->irq)))
lis3l02dq_read_all(indio_dev, NULL);