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]
Message-ID: <CAHp75VfauHuAv1Wr=7ga=G+6JOYXuop_oyXiwmQgKeB2e_z=tQ@mail.gmail.com>
Date:   Mon, 23 Mar 2020 01:32:34 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Saravanan Sekar <sravanhome@...il.com>
Cc:     Lee Jones <lee.jones@...aro.org>, Rob Herring <robh+dt@...nel.org>,
        Jonathan Cameron <jic23@...nel.org>,
        Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald <pmeerw@...erw.net>,
        Sebastian Reichel <sre@...nel.org>,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-iio <linux-iio@...r.kernel.org>,
        Linux PM <linux-pm@...r.kernel.org>
Subject: Re: [PATCH v4 3/5] iio: adc: mp2629: Add support for mp2629 ADC driver

On Mon, Mar 23, 2020 at 12:47 AM Saravanan Sekar <sravanhome@...il.com> wrote:
>
> Add support for 8-bit resolution ADC readings for input power
> supply and battery charging measurement. Provides voltage, current
> readings to mp2629 power supply driver.

...

> +#include <linux/platform_device.h>

> +#include <linux/of_device.h>

Don't see users of it.

> +#include <linux/module.h>
> +#include <linux/mutex.h>
> +#include <linux/regulator/consumer.h>

> +#include <linux/sysfs.h>

Any users?

> +#include <linux/regmap.h>

Perhaps ordered?

> +#include <linux/iio/iio.h>
> +#include <linux/iio/machine.h>
> +#include <linux/iio/driver.h>

+ blank line?

> +#include <linux/mfd/mp2629.h>

...

> +static int mp2629_read_raw(struct iio_dev *indio_dev,
> +                       struct iio_chan_spec const *chan,
> +                       int *val, int *val2, long mask)
> +{
> +       struct mp2629_adc *info = iio_priv(indio_dev);
> +       unsigned int rval;
> +       int ret;
> +
> +       switch (mask) {
> +       case IIO_CHAN_INFO_RAW:
> +               ret = regmap_read(info->regmap, chan->address, &rval);
> +               if (ret < 0)
> +                       return ret;
> +
> +               if (chan->address == MP2629_INPUT_VOLT)

> +                       rval &= 0x7f;

GENMASK() ?

> +               *val = rval;
> +               return IIO_VAL_INT;

> +       return 0;
> +}

...

> +       void **pdata = pdev->dev.platform_data;

Same Qs as per other patch.

...

> +       indio_dev->dev.of_node = pdev->dev.of_node;

Jonathan, doesn't IIO core do this for all?

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ