1414#include "lis3l02dq.h"
1515
1616/**
17- * combine_8_to_16() utility function to munge to u8s into u16
17+ * combine_8_to_16() utility function to munge two u8s into u16
1818 **/
1919static inline u16 combine_8_to_16 (u8 lower , u8 upper )
2020{
@@ -49,7 +49,7 @@ static const u8 read_all_tx_array[] = {
4949
5050/**
5151 * lis3l02dq_read_all() Reads all channels currently selected
52- * @st: device specific state
52+ * @indio_dev: IIO device state
5353 * @rx_array: (dma capable) receive array, must be at least
5454 * 4*number of channels
5555 **/
@@ -170,22 +170,22 @@ __lis3l02dq_write_data_ready_config(struct iio_dev *indio_dev, bool state)
170170 bool currentlyset ;
171171 struct lis3l02dq_state * st = iio_priv (indio_dev );
172172
173- /* Get the current event mask register */
173+ /* Get the current event mask register */
174174 ret = lis3l02dq_spi_read_reg_8 (indio_dev ,
175175 LIS3L02DQ_REG_CTRL_2_ADDR ,
176176 & valold );
177177 if (ret )
178178 goto error_ret ;
179- /* Find out if data ready is already on */
179+ /* Find out if data ready is already on */
180180 currentlyset
181181 = valold & LIS3L02DQ_REG_CTRL_2_ENABLE_DATA_READY_GENERATION ;
182182
183- /* Disable requested */
183+ /* Disable requested */
184184 if (!state && currentlyset ) {
185- /* disable the data ready signal */
185+ /* Disable the data ready signal */
186186 valold &= ~LIS3L02DQ_REG_CTRL_2_ENABLE_DATA_READY_GENERATION ;
187187
188- /* The double write is to overcome a hardware bug?*/
188+ /* The double write is to overcome a hardware bug? */
189189 ret = lis3l02dq_spi_write_reg_8 (indio_dev ,
190190 LIS3L02DQ_REG_CTRL_2_ADDR ,
191191 valold );
@@ -197,10 +197,10 @@ __lis3l02dq_write_data_ready_config(struct iio_dev *indio_dev, bool state)
197197 if (ret )
198198 goto error_ret ;
199199 st -> trigger_on = false;
200- /* Enable requested */
200+ /* Enable requested */
201201 } else if (state && !currentlyset ) {
202- /* if not set, enable requested */
203- / * first disable all events */
202+ /* If not set, enable requested
203+ * first disable all events */
204204 ret = lis3l02dq_disable_all_events (indio_dev );
205205 if (ret < 0 )
206206 goto error_ret ;
@@ -239,7 +239,7 @@ static int lis3l02dq_data_rdy_trigger_set_state(struct iio_trigger *trig,
239239 if (state == false) {
240240 /*
241241 * A possible quirk with the handler is currently worked around
242- * by ensuring outstanding read events are cleared.
242+ * by ensuring outstanding read events are cleared.
243243 */
244244 ret = lis3l02dq_read_all (indio_dev , NULL );
245245 }
@@ -250,7 +250,7 @@ static int lis3l02dq_data_rdy_trigger_set_state(struct iio_trigger *trig,
250250}
251251
252252/**
253- * lis3l02dq_trig_try_reen() try renabling irq for data rdy trigger
253+ * lis3l02dq_trig_try_reen() try reenabling irq for data rdy trigger
254254 * @trig: the datardy trigger
255255 */
256256static int lis3l02dq_trig_try_reen (struct iio_trigger * trig )
@@ -259,8 +259,8 @@ static int lis3l02dq_trig_try_reen(struct iio_trigger *trig)
259259 struct lis3l02dq_state * st = iio_priv (indio_dev );
260260 int i ;
261261
262- /* If gpio still high (or high again) */
263- / * In theory possible we will need to do this several times */
262+ /* If gpio still high (or high again)
263+ * In theory possible we will need to do this several times */
264264 for (i = 0 ; i < 5 ; i ++ )
265265 if (gpio_get_value (irq_to_gpio (st -> us -> irq )))
266266 lis3l02dq_read_all (indio_dev , NULL );
0 commit comments