From: Tomas Melin <tomas.melin@vaisala.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
devicetree <devicetree@vger.kernel.org>,
linux-iio <linux-iio@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 2/2] iio: accel: Add driver for Murata SCA3300 accelerometer
Date: Mon, 26 Apr 2021 09:07:55 +0300 [thread overview]
Message-ID: <cc022230-1cce-9eca-baa3-b0a407a2ab7f@vaisala.com> (raw)
In-Reply-To: <CAHp75Ve2AEA8yPw5qN+R=K=ovaO8vX53hYU9=knjY_Z+EHDdww@mail.gmail.com>
Hi,
On 4/23/21 7:06 PM, Andy Shevchenko wrote:
> On Tue, Apr 20, 2021 at 4:24 PM Tomas Melin <tomas.melin@vaisala.com> wrote:
>> Add initial support for Murata SCA3300 3-axis industrial
>> accelerometer with digital SPI interface. This device also
>> provides a temperature measurement.
>
> ..
>
>> + for_each_set_bit(bit, indio_dev->active_scan_mask,
>> + indio_dev->masklength) {
> One line?
>80 if one line.
>
>> + ret = sca3300_read_reg(data, sca3300_channels[bit].address,
>> + &val);
>> + if (ret) {
>> + dev_err_ratelimited(&data->spi->dev,
>> + "failed to read register, error: %d\n", ret);
>> + /* handled, but bailing out due to errors */
>> + goto out;
>> + }
>> + data->scan.channels[i++] = val;
>> + }
> ...
>
>> + int ret;
>> + int value = 0;
> Reversed xmas tree ordering?
ok.
>
> ...
>
>> + /*
>> + * Wait 1ms after SW-reset command.
>> + * Wait 15ms for settling of signal paths.
>> + */
>> + usleep_range(16e3, 50e3);
> Hmm... Perhaps re-use msleep_range()
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Felixir.bootlin.com%2Flinux%2Flatest%2Fsource%2Fdrivers%2Fmedia%2Fi2c%2Fimx274.c%23L601&data=04%7C01%7Ctomas.melin%40vaisala.com%7Ce224aae96fd14d09236408d90671cfb2%7C6d7393e041f54c2e9b124c2be5da5c57%7C0%7C0%7C637547908155668061%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5ZrTdeWqw1YC6TFu2VTCt%2FT1B3UrPex4Vj6T2nYJtjg%3D&reserved=0?
Checked that, but not sure if that would make this call any clearer?
Delay is now only in this place and well documented. If you have some
specific formatting in mind for this, please let me know. Otherwise
keeping as is.
Thanks,
Tomas
prev parent reply other threads:[~2021-04-26 6:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-20 13:23 [PATCH v4 0/2] iio: accel: sca3300: Accelerometer support and binding docs Tomas Melin
2021-04-20 13:23 ` [PATCH v4 1/2] dt-bindings: iio: accel: Add SCA3300 documentation Tomas Melin
2021-04-20 16:02 ` Rob Herring
2021-04-20 13:23 ` [PATCH v4 2/2] iio: accel: Add driver for Murata SCA3300 accelerometer Tomas Melin
2021-04-23 16:06 ` Andy Shevchenko
2021-04-24 11:53 ` Jonathan Cameron
2021-04-26 3:53 ` Tomas Melin
2021-04-26 6:07 ` Tomas Melin [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=cc022230-1cce-9eca-baa3-b0a407a2ab7f@vaisala.com \
--to=tomas.melin@vaisala.com \
--cc=andy.shevchenko@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.