Linux-IIO Archive on lore.kernel.org
 help / color / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Dan Robertson <dan@dlrobertson.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-iio <linux-iio@vger.kernel.org>
Subject: Re: [PATCH 1/1] iio: accel: bma400: add support for bma400 spi
Date: Fri, 22 May 2020 11:50:37 +0300
Message-ID: <CAHp75Ve-ub+CAo2Q3XEAL1diph+7EVh=3L-wdnst-WJ8aM6Yxg@mail.gmail.com> (raw)
In-Reply-To: <20200522014634.28505-2-dan@dlrobertson.com>

On Fri, May 22, 2020 at 4:48 AM Dan Robertson <dan@dlrobertson.com> wrote:
>
> Add basic support for the Bosch Sensortec BMA400 3-axes ultra-low power
> accelerometer when configured to use SPI.

...

>         tristate "Bosch BMA400 3-Axis Accelerometer Driver"
>         select REGMAP
>         select BMA400_I2C if I2C

> +       select BMA400_SPI if I2C

This is not right.

...

> +#include <linux/module.h>
> +#include <linux/spi/spi.h>

What's the point of dups (see below)?

> +#include <linux/spi/spi.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/module.h>
> +#include <linux/regmap.h>

Keep them ordered?

...

> +#define BMA400_SPI_READ_BUFFER_SIZE (BMA400_MAX_SPI_READ + 1)

Do wee need separate macro? It seems longer than explicit use.
Do we need the original macro either?

...

> +       /*
> +        * TODO(dlrobertson): What is a reasonable length to cap
> +        * this at.
> +        */

Either drop this or fulfill. There is no way to leave such in the
non-staging code.

...

> +       .read_flag_mask = BIT(7),

#include <linux/bits.h>

...

> +static struct spi_driver bma400_spi_driver = {
> +       .driver = {
> +               .name = "bma400",
> +               .of_match_table = bma400_of_spi_match,
> +       },
> +       .probe    = bma400_spi_probe,
> +       .remove   = bma400_spi_remove,
> +       .id_table = bma400_spi_ids,
> +};

> +

This blank line is not needed.

> +module_spi_driver(bma400_spi_driver);

-- 
With Best Regards,
Andy Shevchenko

  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22  1:46 [PATCH 0/1] " Dan Robertson
2020-05-22  1:46 ` [PATCH 1/1] " Dan Robertson
2020-05-22  8:50   ` Andy Shevchenko [this message]
2020-05-22 12:36     ` Dan Robertson

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='CAHp75Ve-ub+CAo2Q3XEAL1diph+7EVh=3L-wdnst-WJ8aM6Yxg@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=dan@dlrobertson.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.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

Linux-IIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \
		linux-iio@vger.kernel.org
	public-inbox-index linux-iio

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git