Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
To: Gwendal Grignou <gwendal@chromium.org>
Cc: lars@metafoo.de, linux-iio@vger.kernel.org,
	Stephen Boyd <swboyd@chromium.org>
Subject: Re: [PATCH v6 1/3] iio: proximity: Add sx9360 support
Date: Sun, 9 Jan 2022 11:00:00 +0000	[thread overview]
Message-ID: <20220109110000.56f66c3c@jic23-huawei> (raw)
In-Reply-To: <20220101203800.290387-2-gwendal@chromium.org>

On Sat,  1 Jan 2022 12:37:58 -0800
Gwendal Grignou <gwendal@chromium.org> wrote:

> A simplified version of SX9324, it only have one pin and
> 2 phases (aka channels).
> Only one event is presented.
> 
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
> Reviewed-by: Stephen Boyd <swboyd@chromium.org>
> ---
Series applied but I got a build warning which lead me to take another look
at he below code.

...

> +static int sx9360_set_samp_freq(struct sx_common_data *data,
> +				int val, int val2)
> +{
> +	int ret, reg;
> +	__be16 buf;
> +
> +	reg = val * 8192 / SX9360_FOSC_HZ + val2 * 8192 / (SX9360_FOSC_MHZ);
> +	buf = cpu_to_be16(val);
I've changed this to cpu_to_be16(reg) which I'm assuming was the intent.

> +	mutex_lock(&data->mutex);
> +
> +	ret = regmap_bulk_write(data->regmap, SX9360_REG_GNRL_CTRL1, &buf,
> +				sizeof(buf));
> +
> +	mutex_unlock(&data->mutex);
> +
> +	return ret;
> +}

  reply	other threads:[~2022-01-09 10:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-01 20:37 [PATCH v6 0/3] Add Semtech SX9360 SAR Sensor support Gwendal Grignou
2022-01-01 20:37 ` [PATCH v6 1/3] iio: proximity: Add sx9360 support Gwendal Grignou
2022-01-09 11:00   ` Jonathan Cameron [this message]
2022-01-16 17:04     ` Jonathan Cameron
2022-01-01 20:37 ` [PATCH v6 2/3] dt-bindings: iio: Add sx9360 binding Gwendal Grignou
2022-01-01 20:38 ` [PATCH v6 3/3] iio: sx9360: Add dt-binding support Gwendal Grignou

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=20220109110000.56f66c3c@jic23-huawei \
    --to=jic23@jic23.retrosnub.co.uk \
    --cc=gwendal@chromium.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=swboyd@chromium.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