mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Javier Carrasco <javier.carrasco.cruz@gmail.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rishi Gupta <gupt21@gmail.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH v2 3/4] iio: gts-helper: export iio_gts_get_total_gain()
Date: Fri, 24 Jan 2025 10:12:41 +0200	[thread overview]
Message-ID: <9bdd3a1d-0eb3-4ef1-a6b8-f613de1eecb4@gmail.com> (raw)
In-Reply-To: <20250119-veml6030-scale-v2-3-6bfc4062a371@gmail.com>

On 19/01/2025 19:32, Javier Carrasco wrote:
> Export this function in preparation for the fix in veml6030.c, where the
> total gain can be used to ease the calculation of the processed value of
> the IIO_LIGHT channel compared to acquiring the scale in NANO.
> 
> Suggested-by: Matti Vaittinen <mazziesaccount@gmail.com>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>

Hi Javier,

This is fine but could you please go the extra mile and add a doc to the 
function? I'd like to have kerneldoc for all exported functions.

> ---
>   drivers/iio/industrialio-gts-helper.c | 3 ++-
>   include/linux/iio/iio-gts-helper.h    | 1 +
>   2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/industrialio-gts-helper.c b/drivers/iio/industrialio-gts-helper.c
> index d70ebe3bf7742906960c6af22102682c5b8dcdfa..6ec434338411d09fffa1db52046a7df9b34c89bf 100644
> --- a/drivers/iio/industrialio-gts-helper.c
> +++ b/drivers/iio/industrialio-gts-helper.c
> @@ -950,7 +950,7 @@ int iio_gts_find_gain_time_sel_for_scale(struct iio_gts *gts, int scale_int,
>   }
>   EXPORT_SYMBOL_NS_GPL(iio_gts_find_gain_time_sel_for_scale, "IIO_GTS_HELPER");
>   
> -static int iio_gts_get_total_gain(struct iio_gts *gts, int gain, int time)
> +int iio_gts_get_total_gain(struct iio_gts *gts, int gain, int time)
>   {
>   	const struct iio_itime_sel_mul *itime;
>   
> @@ -966,6 +966,7 @@ static int iio_gts_get_total_gain(struct iio_gts *gts, int gain, int time)
>   
>   	return gain * itime->mul;
>   }
> +EXPORT_SYMBOL_NS_GPL(iio_gts_get_total_gain, "IIO_GTS_HELPER");
>   
>   static int iio_gts_get_scale_linear(struct iio_gts *gts, int gain, int time,
>   				    u64 *scale)
> diff --git a/include/linux/iio/iio-gts-helper.h b/include/linux/iio/iio-gts-helper.h
> index e5de7a124bad6eb65414df364f84e81301b0690b..66f830ab9b49b566d549c7b5b8291d42a0825b96 100644
> --- a/include/linux/iio/iio-gts-helper.h
> +++ b/include/linux/iio/iio-gts-helper.h
> @@ -208,5 +208,6 @@ int iio_gts_all_avail_scales(struct iio_gts *gts, const int **vals, int *type,
>   			     int *length);
>   int iio_gts_avail_scales_for_time(struct iio_gts *gts, int time,
>   				  const int **vals, int *type, int *length);
> +int iio_gts_get_total_gain(struct iio_gts *gts, int gain, int time);
>   
>   #endif
> 


  reply	other threads:[~2025-01-24  8:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-19 17:31 [PATCH v2 0/4] iio: light: fix scale in veml6030 Javier Carrasco
2025-01-19 17:31 ` [PATCH v2 1/4] iio: light: veml6030: extend regmap to support regfields Javier Carrasco
2025-01-19 17:31 ` [PATCH v2 2/4] iio: light: veml6030: extend regmap to support caching Javier Carrasco
2025-01-19 17:32 ` [PATCH v2 3/4] iio: gts-helper: export iio_gts_get_total_gain() Javier Carrasco
2025-01-24  8:12   ` Matti Vaittinen [this message]
2025-01-25 20:08     ` Javier Carrasco
2025-01-19 17:32 ` [PATCH v2 4/4] iio: light: veml6030: fix scale to conform to ABI Javier Carrasco
2025-01-24  8:24   ` Matti Vaittinen
2025-01-25 12:33 ` [PATCH v2 0/4] iio: light: fix scale in veml6030 Jonathan Cameron
2025-01-25 20:12   ` Javier Carrasco

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=9bdd3a1d-0eb3-4ef1-a6b8-f613de1eecb4@gmail.com \
    --to=mazziesaccount@gmail.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=gupt21@gmail.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®