From: Jonathan Cameron <jic23@kernel.org>
To: Peter Meerwald <pmeerw@pmeerw.net>, linux-iio@vger.kernel.org
Subject: Re: [PATCH 2/6] staging:iio:accel:sca3000: Fix format of comments
Date: Sat, 18 Jan 2014 11:07:03 +0000 [thread overview]
Message-ID: <52DA6057.8030005@kernel.org> (raw)
In-Reply-To: <1389648514-31429-1-git-send-email-pmeerw@pmeerw.net>
On 13/01/14 21:28, Peter Meerwald wrote:
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Applied to the togreg branch of iio.git
Thanks,
> ---
> drivers/staging/iio/accel/sca3000_core.c | 52 ++++++++++++++++++--------------
> 1 file changed, 29 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/staging/iio/accel/sca3000_core.c b/drivers/staging/iio/accel/sca3000_core.c
> index 908d5cd..b627d8f 100644
> --- a/drivers/staging/iio/accel/sca3000_core.c
> +++ b/drivers/staging/iio/accel/sca3000_core.c
> @@ -32,7 +32,8 @@ enum sca3000_variant {
> e05,
> };
>
> -/* Note where option modes are not defined, the chip simply does not
> +/*
> + * Note where option modes are not defined, the chip simply does not
> * support any.
> * Other chips in the sca3000 series use i2c and are not included here.
> *
> @@ -191,7 +192,6 @@ error_ret:
> return ret;
> }
>
> -/* Crucial that lock is called before calling this */
> /**
> * sca3000_read_ctrl_reg() read from lock protected control register.
> *
> @@ -402,7 +402,8 @@ error_ret:
> }
>
>
> -/* Not even vaguely standard attributes so defined here rather than
> +/*
> + * Not even vaguely standard attributes so defined here rather than
> * in the relevant IIO core headers
> */
> static IIO_DEVICE_ATTR(measurement_mode_available, S_IRUGO,
> @@ -662,7 +663,8 @@ error_free_lock:
> return ret ? ret : len;
> }
>
> -/* Should only really be registered if ring buffer support is compiled in.
> +/*
> + * Should only really be registered if ring buffer support is compiled in.
> * Does no harm however and doing it right would add a fair bit of complexity
> */
> static IIO_DEV_ATTR_SAMP_FREQ_AVAIL(sca3000_read_av_freq);
> @@ -675,10 +677,10 @@ static IIO_DEV_ATTR_SAMP_FREQ(S_IWUSR | S_IRUGO,
> /**
> * sca3000_read_temp() sysfs interface to get the temperature when available
> *
> -* The alignment of data in here is downright odd. See data sheet.
> -* Converting this into a meaningful value is left to inline functions in
> -* userspace part of header.
> -**/
> + * The alignment of data in here is downright odd. See data sheet.
> + * Converting this into a meaningful value is left to inline functions in
> + * userspace part of header.
> + **/
> static ssize_t sca3000_read_temp(struct device *dev,
> struct device_attribute *attr,
> char *buf)
> @@ -802,12 +804,12 @@ static const struct attribute_group sca3000_attribute_group_with_temp = {
> .attrs = sca3000_attributes_with_temp,
> };
>
> -/* RING RELATED interrupt handler */
> -/* depending on event, push to the ring buffer event chrdev or the event one */
> -
> /**
> * sca3000_event_handler() - handling ring and non ring events
> *
> + * Ring related interrupt handler. Depending on event, push to
> + * the ring buffer event chrdev or the event one.
> + *
> * This function is complicated by the fact that the devices can signify ring
> * and non ring events via the same interrupt line and they can only
> * be distinguished via a read of the relevant status register.
> @@ -819,7 +821,8 @@ static irqreturn_t sca3000_event_handler(int irq, void *private)
> int ret, val;
> s64 last_timestamp = iio_get_time_ns();
>
> - /* Could lead if badly timed to an extra read of status reg,
> + /*
> + * Could lead if badly timed to an extra read of status reg,
> * but ensures no interrupt is missed.
> */
> mutex_lock(&st->lock);
> @@ -934,7 +937,6 @@ static ssize_t sca3000_query_free_fall_mode(struct device *dev,
> * the device falls more than 25cm. This has not been tested due
> * to fragile wiring.
> **/
> -
> static ssize_t sca3000_set_free_fall_mode(struct device *dev,
> struct device_attribute *attr,
> const char *buf,
> @@ -956,7 +958,7 @@ static ssize_t sca3000_set_free_fall_mode(struct device *dev,
> if (ret)
> goto error_ret;
>
> - /*if off and should be on*/
> + /* if off and should be on */
> if (val && !(st->rx[0] & protect_mask))
> ret = sca3000_write_reg(st, SCA3000_REG_ADDR_MODE,
> (st->rx[0] | SCA3000_FREE_FALL_DETECT));
> @@ -991,13 +993,15 @@ static int sca3000_write_event_config(struct iio_dev *indio_dev,
> int num = chan->channel2;
>
> mutex_lock(&st->lock);
> - /* First read the motion detector config to find out if
> - * this axis is on*/
> + /*
> + * First read the motion detector config to find out if
> + * this axis is on
> + */
> ret = sca3000_read_ctrl_reg(st, SCA3000_REG_CTRL_SEL_MD_CTRL);
> if (ret < 0)
> goto exit_point;
> ctrlval = ret;
> - /* Off and should be on */
> + /* if off and should be on */
> if (state && !(ctrlval & sca3000_addresses[num][2])) {
> ret = sca3000_write_ctrl_reg(st,
> SCA3000_REG_CTRL_SEL_MD_CTRL,
> @@ -1020,7 +1024,7 @@ static int sca3000_write_event_config(struct iio_dev *indio_dev,
> ret = sca3000_read_data_short(st, SCA3000_REG_ADDR_MODE, 1);
> if (ret)
> goto exit_point;
> - /*if off and should be on*/
> + /* if off and should be on */
> if ((st->mo_det_use_count)
> && ((st->rx[0] & protect_mask) != SCA3000_MEAS_MODE_MOT_DET))
> ret = sca3000_write_reg(st, SCA3000_REG_ADDR_MODE,
> @@ -1066,7 +1070,7 @@ static struct attribute_group sca3000_event_attribute_group = {
> * Devices use flash memory to store many of the register values
> * and hence can come up in somewhat unpredictable states.
> * Hence reset everything on driver load.
> - **/
> + **/
> static int sca3000_clean_setup(struct sca3000_state *st)
> {
> int ret;
> @@ -1106,9 +1110,11 @@ static int sca3000_clean_setup(struct sca3000_state *st)
> | SCA3000_INT_MASK_ACTIVE_LOW);
> if (ret)
> goto error_ret;
> - /* Select normal measurement mode, free fall off, ring off */
> - /* Ring in 12 bit mode - it is fine to overwrite reserved bits 3,5
> - * as that occurs in one of the example on the datasheet */
> + /*
> + * Select normal measurement mode, free fall off, ring off
> + * Ring in 12 bit mode - it is fine to overwrite reserved bits 3,5
> + * as that occurs in one of the example on the datasheet
> + */
> ret = sca3000_read_data_short(st, SCA3000_REG_ADDR_MODE, 1);
> if (ret)
> goto error_ret;
> @@ -1235,7 +1241,7 @@ static int sca3000_remove(struct spi_device *spi)
> struct iio_dev *indio_dev = spi_get_drvdata(spi);
> struct sca3000_state *st = iio_priv(indio_dev);
>
> - /* Must ensure no interrupts can be generated after this!*/
> + /* Must ensure no interrupts can be generated after this! */
> sca3000_stop_all_interrupts(st);
> if (spi->irq)
> free_irq(spi->irq, indio_dev);
>
prev parent reply other threads:[~2014-01-18 11:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 21:28 [PATCH 2/6] staging:iio:accel:sca3000: Fix format of comments Peter Meerwald
2014-01-13 21:28 ` [PATCH 3/6] staging:iio:accel:sca3000: Event_attribute_group seems to be missing for _info_with_temp Peter Meerwald
2014-01-18 11:08 ` Jonathan Cameron
2014-01-13 21:28 ` [PATCH 4/6] staging:iio:accel:sca3000: Channels missing in temp_output case Peter Meerwald
2014-01-18 11:09 ` Jonathan Cameron
2014-01-13 21:28 ` [PATCH 5/6] staging:iio:accel:sca3000: Move temperature attribute to channels Peter Meerwald
2014-01-13 21:28 ` [PATCH 6/6] staging:iio:accel:sca3000: Cleanup sca3000.h Peter Meerwald
2014-01-18 11:12 ` Jonathan Cameron
2014-01-18 11:07 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52DA6057.8030005@kernel.org \
--to=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).