diff mbox series

[05/30] iio: chemical: sgp30: Add description for sgp_read_cmd()'s 'duration_us'

Message ID 20200716135928.1456727-6-lee.jones@linaro.org (mailing list archive)
State New, archived
Headers show
Series First batch of W=1 fixes for IIO | expand

Commit Message

Lee Jones July 16, 2020, 1:59 p.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/iio/chemical/sgp30.c:236: warning: Function parameter or member 'duration_us' not described in 'sgp_read_cmd'

Cc: Andreas Brauchli <a.brauchli@elementarea.net>
Cc: Pascal Sachs <pascal.sachs@sensirion.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/iio/chemical/sgp30.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jonathan Cameron July 18, 2020, 2:33 p.m. UTC | #1
On Thu, 16 Jul 2020 14:59:03 +0100
Lee Jones <lee.jones@linaro.org> wrote:

> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/iio/chemical/sgp30.c:236: warning: Function parameter or member 'duration_us' not described in 'sgp_read_cmd'
> 
> Cc: Andreas Brauchli <a.brauchli@elementarea.net>
> Cc: Pascal Sachs <pascal.sachs@sensirion.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Perhaps we can do better on the wording.

> ---
>  drivers/iio/chemical/sgp30.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iio/chemical/sgp30.c b/drivers/iio/chemical/sgp30.c
> index 403e8803471a9..82e407d48a0aa 100644
> --- a/drivers/iio/chemical/sgp30.c
> +++ b/drivers/iio/chemical/sgp30.c
> @@ -227,6 +227,7 @@ static int sgp_verify_buffer(const struct sgp_data *data,
>   * @cmd:         SGP Command to issue
>   * @buf:         Raw data buffer to use
>   * @word_count:  Num words to read, excluding CRC bytes
> + * @duration_us: Time to sleep in microseconds

Time taken to sensor to take a reading and data to be ready.

Something like that maybe?  I've not checked the datasheet but from
code that looks to be what this describes..

Jonathan

>   *
>   * Return:       0 on success, negative error otherwise.
>   */
Jonathan Cameron Sept. 17, 2020, 6:33 p.m. UTC | #2
On Sat, 18 Jul 2020 15:33:45 +0100
Jonathan Cameron <jic23@kernel.org> wrote:

> On Thu, 16 Jul 2020 14:59:03 +0100
> Lee Jones <lee.jones@linaro.org> wrote:
> 
> > Fixes the following W=1 kernel build warning(s):
> > 
> >  drivers/iio/chemical/sgp30.c:236: warning: Function parameter or member 'duration_us' not described in 'sgp_read_cmd'
> > 
> > Cc: Andreas Brauchli <a.brauchli@elementarea.net>
> > Cc: Pascal Sachs <pascal.sachs@sensirion.com>
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>  
> 
> Perhaps we can do better on the wording.
> 
> > ---
> >  drivers/iio/chemical/sgp30.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/iio/chemical/sgp30.c b/drivers/iio/chemical/sgp30.c
> > index 403e8803471a9..82e407d48a0aa 100644
> > --- a/drivers/iio/chemical/sgp30.c
> > +++ b/drivers/iio/chemical/sgp30.c
> > @@ -227,6 +227,7 @@ static int sgp_verify_buffer(const struct sgp_data *data,
> >   * @cmd:         SGP Command to issue
> >   * @buf:         Raw data buffer to use
> >   * @word_count:  Num words to read, excluding CRC bytes
> > + * @duration_us: Time to sleep in microseconds  
> 
> Time taken to sensor to take a reading and data to be ready.
> 
> Something like that maybe?  I've not checked the datasheet but from
> code that looks to be what this describes..

Tweaked and applied

Thanks,

Jonathan

> 
> Jonathan
> 
> >   *
> >   * Return:       0 on success, negative error otherwise.
> >   */  
>
diff mbox series

Patch

diff --git a/drivers/iio/chemical/sgp30.c b/drivers/iio/chemical/sgp30.c
index 403e8803471a9..82e407d48a0aa 100644
--- a/drivers/iio/chemical/sgp30.c
+++ b/drivers/iio/chemical/sgp30.c
@@ -227,6 +227,7 @@  static int sgp_verify_buffer(const struct sgp_data *data,
  * @cmd:         SGP Command to issue
  * @buf:         Raw data buffer to use
  * @word_count:  Num words to read, excluding CRC bytes
+ * @duration_us: Time to sleep in microseconds
  *
  * Return:       0 on success, negative error otherwise.
  */