lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 12 Dec 2019 11:27:13 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Dan Robertson <dan@...obertson.com>
Cc:     Jonathan Cameron <jic23@...nel.org>, linux-iio@...r.kernel.org,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>, Hartmut Knaack <knaack.h@....de>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Randy Dunlap <rdunlap@...radead.org>,
        Joe Perches <joe@...ches.com>
Subject: Re: [PATCH v6 2/2] iio: (bma400) add driver for the BMA400

Hi Dan,

thanks for your patch!

Inspired by my recent work to revive the BMA180/BMA250 driver
for BMA254 I have some comments:

On Wed, Dec 11, 2019 at 2:20 AM Dan Robertson <dan@...obertson.com> wrote:

> Add a IIO driver for the Bosch BMA400 3-axes ultra-low power accelerometer.
> The driver supports reading from the acceleration and temperature
> registers. The driver also supports reading and configuring the output data
> rate, oversampling ratio, and scale.
>
> Signed-off-by: Dan Robertson <dan@...obertson.com>
(...)
> +#include <linux/bitops.h>
> +#include <linux/device.h>
> +#include <linux/iio/iio.h>
> +#include <linux/iio/sysfs.h>
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/mutex.h>
> +#include <linux/regmap.h>

#include <linux/regulator/consumer.h>

> +int bma400_probe(struct device *dev, struct regmap *regmap, const char *name)

Even if the component is always powered on in your design
please add regulator handling already from start so that we
don't have to go in and add it later. I've added regulator support
to sooo many IIO drivers by now.

You can pretty much just copy/paste my code for BMA180/BMA250:
https://lore.kernel.org/linux-iio/20191211213819.14024-2-linus.walleij@linaro.org/T/#u

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ