Re: [PATCH v3 1/2] iio: ina2xx: add support for TI INA2xx Power Monitors

2015-12-16 Thread Andrew F. Davis
On 12/16/2015 11:54 AM, Marc Titinger wrote: On 16/12/2015 18:45, Andrew F. Davis wrote: On 12/07/2015 03:09 AM, Marc Titinger wrote: +#define INA2XX_CHAN(_type, _index, _address) { \ +.type = (_type), \ +.address = (_address), \ +.indexed = 1, \ +.channel = (_index), \ +

Re: [PATCH v3 1/2] iio: ina2xx: add support for TI INA2xx Power Monitors

2015-12-16 Thread Marc Titinger
On 16/12/2015 18:45, Andrew F. Davis wrote: On 12/07/2015 03:09 AM, Marc Titinger wrote: +#define INA2XX_CHAN(_type, _index, _address) { \ +.type = (_type), \ +.address = (_address), \ +.indexed = 1, \ +.channel = (_index), \ +.info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \

Re: [PATCH v3 1/2] iio: ina2xx: add support for TI INA2xx Power Monitors

2015-12-16 Thread Andrew F. Davis
On 12/07/2015 03:09 AM, Marc Titinger wrote: +#define INA2XX_CHAN(_type, _index, _address) { \ + .type = (_type), \ + .address = (_address), \ + .indexed = 1, \ + .channel = (_index), \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ +

Re: [PATCH v3 1/2] iio: ina2xx: add support for TI INA2xx Power Monitors

2015-12-16 Thread Andrew F. Davis
On 12/07/2015 03:09 AM, Marc Titinger wrote: +#define INA2XX_CHAN(_type, _index, _address) { \ + .type = (_type), \ + .address = (_address), \ + .indexed = 1, \ + .channel = (_index), \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ +

Re: [PATCH v3 1/2] iio: ina2xx: add support for TI INA2xx Power Monitors

2015-12-16 Thread Marc Titinger
On 16/12/2015 18:45, Andrew F. Davis wrote: On 12/07/2015 03:09 AM, Marc Titinger wrote: +#define INA2XX_CHAN(_type, _index, _address) { \ +.type = (_type), \ +.address = (_address), \ +.indexed = 1, \ +.channel = (_index), \ +.info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \

Re: [PATCH v3 1/2] iio: ina2xx: add support for TI INA2xx Power Monitors

2015-12-16 Thread Andrew F. Davis
On 12/16/2015 11:54 AM, Marc Titinger wrote: On 16/12/2015 18:45, Andrew F. Davis wrote: On 12/07/2015 03:09 AM, Marc Titinger wrote: +#define INA2XX_CHAN(_type, _index, _address) { \ +.type = (_type), \ +.address = (_address), \ +.indexed = 1, \ +.channel = (_index), \ +

Re: [PATCH v3 1/2] iio: ina2xx: add support for TI INA2xx Power Monitors

2015-12-12 Thread Jonathan Cameron
On 07/12/15 09:09, Marc Titinger wrote: > in SOFTWARE buffer mode, a kthread will capture the active scan_elements > into a kfifo, then compute the remaining time until the next capture tick > and do an active wait (udelay). > > This will produce a stream of up to fours channels plus a 64bits >

Re: [PATCH v3 1/2] iio: ina2xx: add support for TI INA2xx Power Monitors

2015-12-12 Thread Jonathan Cameron
On 07/12/15 09:09, Marc Titinger wrote: > in SOFTWARE buffer mode, a kthread will capture the active scan_elements > into a kfifo, then compute the remaining time until the next capture tick > and do an active wait (udelay). > > This will produce a stream of up to fours channels plus a 64bits >

[PATCH v3 1/2] iio: ina2xx: add support for TI INA2xx Power Monitors

2015-12-07 Thread Marc Titinger
in SOFTWARE buffer mode, a kthread will capture the active scan_elements into a kfifo, then compute the remaining time until the next capture tick and do an active wait (udelay). This will produce a stream of up to fours channels plus a 64bits timestamps (ns). Tested with ina226, on

[PATCH v3 1/2] iio: ina2xx: add support for TI INA2xx Power Monitors

2015-12-07 Thread Marc Titinger
in SOFTWARE buffer mode, a kthread will capture the active scan_elements into a kfifo, then compute the remaining time until the next capture tick and do an active wait (udelay). This will produce a stream of up to fours channels plus a 64bits timestamps (ns). Tested with ina226, on