All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Titinger <mtitinger@baylibre.com>
To: Daniel Baluta <daniel.baluta@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	mturquette@baylibre.com, bcousson@baylibre.com,
	ptitiano@baylibre.com
Subject: Re: [RFC 1/4] iio: ina2xx: add direct IO support for TI INA2xx Power Monitors
Date: Thu, 12 Nov 2015 10:25:54 +0100	[thread overview]
Message-ID: <56445B22.2050903@baylibre.com> (raw)
In-Reply-To: <CAEnQRZCvsB1ZRLXf8xmQa=h6R1jcs-DXmhFpsmpTZdWd-102gQ@mail.gmail.com>

On 11/11/2015 11:14, Daniel Baluta wrote:
> On Tue, Nov 10, 2015 at 6:07 PM, Marc Titinger <mtitinger@baylibre.com> wrote:
>> Basic support or direct IO raw read, with averaging attribute.
>> Values are RAW, INT_PLUS_MICRO (Volt/Ampere/Watt).
>>

Hi Daniel,

thanks for the review,
comments bellow,

Marc.


>> IIO context has 1 devices:
> Is this from libiio right? Perhaps you should specify this:
>
> "libiio context has 1 devices"

It's the raw output from iio_info to give a quick overview of the features.

>
>>       iio:device0: ina226
>>        4 channels found:
>>          power3:  (input)
>>          1 channel-specific attributes found:
>>                  attr 0: raw value: 1.150000
>>          voltage0:  (input)
>>          1 channel-specific attributes found:
>>                  attr 0: raw value: 0.000003
>>          voltage1:  (input)
>>          1 channel-specific attributes found:
>>                  attr 0: raw value: 4.277500
>>          current2:  (input)
>>          1 channel-specific attributes found:
>>                  attr 0: raw value: 0.268000
>>        2 device-specific attributes found:
>>                  attr 0: in_calibscale value: 10000
>>                  attr 1: in_mean_raw value: 4
>>
>>
>
> Link to datasheet?

Ok, will add it.

http://www.ti.com/lit/gpn/ina226


...


>>
>> +config INA2XX_IIO
>> +        tristate "Texas Instruments INA2xx Power Monitors IIO driver"
>> +       depends on I2C
>
> Since you are using regmap you should select it here.

Right.

>
>> +        help
>> +          Say yes here to build support for TI INA2xx familly Power Monitors.
>> +
>> +         Note that this is not the existing hwmon interface for this device.
>> +
>> +
>
> Config symbol should be in alphabetical order.

Ok
>
...


>>   obj-$(CONFIG_AD7266) += ad7266.o
>> +obj-$(CONFIG_INA2XX_IIO) += ina2xx-iio.o
>
> The same here.

Ok.

>
>>   obj-$(CONFIG_AD7291) += ad7291.o
>>   obj-$(CONFIG_AD7298) += ad7298.o
>>   obj-$(CONFIG_AD7923) += ad7923.o
>> diff --git a/drivers/iio/adc/ina2xx-iio.c b/drivers/iio/adc/ina2xx-iio.c
>> new file mode 100644
>> index 0000000..257d8d5
>> --- /dev/null
>> +++ b/drivers/iio/adc/ina2xx-iio.c
>> @@ -0,0 +1,404 @@
>> +/*
>> + * INA2XX Current and Power Monitors
>> + *

...

>> + *
>> + * Licensed under the GPL-2 or later.
>
> If you know the I2C address its recommended to mention it here.

ok.

...

>> +
>> +static struct regmap_config ina2xx_regmap_config = {
>> +       .reg_bits = 8,
>> +       .val_bits = 16,
> Specify here which registers are cacheable, read/write.

ok.

...

>> +
>> +       return iio_device_register(indio_dev);
>
> If there is no reverse operation for ina2xx_init (e.g ina2xx_poweroff) then here
> you can use devm_iio_device_register and completely remove
> ina2xx_remove function.

right, thanks!



  reply	other threads:[~2015-11-12  9:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 16:07 [RFC 0/4] IIO: add support for INA2xx power monitor Marc Titinger
2015-11-10 16:07 ` [RFC 1/4] iio: ina2xx: add direct IO support for TI INA2xx Power Monitors Marc Titinger
2015-11-11 10:14   ` Daniel Baluta
2015-11-12  9:25     ` Marc Titinger [this message]
2015-11-11 12:09   ` Daniel Baluta
2015-11-12  9:38     ` Marc Titinger
2015-11-12 12:57     ` [RFC v2 1/2] " Marc Titinger
2015-11-14 18:59       ` Jonathan Cameron
2015-11-16  9:31         ` Marc Titinger
2015-11-16 17:27           ` Jonathan Cameron
2015-11-12 12:57     ` [RFC v2 2/2] iio: ina2xx: add SOFTWARE buffer mode using an iio kfifo Marc Titinger
2015-11-10 16:07 ` [RFC 2/4] iio: ina2xx: add SAMP_FREQ attribute Marc Titinger
2015-11-11 10:17   ` Daniel Baluta
2015-11-10 16:07 ` [RFC 3/4] iio: ina2xx: add debugfs reg access Marc Titinger
2015-11-10 16:07 ` [RFC 4/4] iio: ina2xx: add SOFTWARE buffer mode using an iio kfifo Marc Titinger
2015-11-10 18:23   ` Lars-Peter Clausen
2015-11-12 10:18     ` Marc Titinger
2015-11-12 10:20       ` Lars-Peter Clausen
2015-11-14 18:44       ` Jonathan Cameron
2015-11-16  9:37         ` Marc Titinger

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=56445B22.2050903@baylibre.com \
    --to=mtitinger@baylibre.com \
    --cc=bcousson@baylibre.com \
    --cc=daniel.baluta@gmail.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=pmeerw@pmeerw.net \
    --cc=ptitiano@baylibre.com \
    /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.