Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-30 Thread Jonathan Cameron
On Sun, 25 Mar 2018 13:53:02 -0700 John Syne wrote: > > On Mar 25, 2018, at 9:54 AM, Jonathan Cameron wrote: > > > > On Sun, 25 Mar 2018 01:29:41 -0700 > > John Syne wrote: > > > >> Hi Jonathan, > > Hi John, > > > > Please wrap

Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-30 Thread Jonathan Cameron
On Sun, 25 Mar 2018 13:36:40 -0700 John Syne wrote: > > On Mar 25, 2018, at 9:29 AM, Jonathan Cameron wrote: > > > > On Sat, 24 Mar 2018 15:45:21 -0700 > > John Syne wrote: > > > >>> On Mar 24, 2018, at 8:02 AM, Jonathan Cameron

Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-25 Thread John Syne
> On Mar 25, 2018, at 9:54 AM, Jonathan Cameron wrote: > > On Sun, 25 Mar 2018 01:29:41 -0700 > John Syne wrote: > >> Hi Jonathan, > Hi John, > > Please wrap your normal emails (excepting tables) to 80 chars. Yeah, I’m trying to do that, but I use a Mac

Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-25 Thread John Syne
> > On Mar 25, 2018, at 9:44 AM, Jonathan Cameron wrote: > > On Sat, 24 Mar 2018 16:06:17 -0700 > John Syne wrote: > > This thread is becoming unmanageable so I am cropping this down to just > the questions that remain open. > Probably easier to

Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-25 Thread John Syne
> On Mar 25, 2018, at 9:44 AM, Jonathan Cameron wrote: > > On Sat, 24 Mar 2018 16:06:17 -0700 > John Syne wrote: > > This thread is becoming unmanageable so I am cropping this down to just > the questions that remain open. > Probably easier to copy

Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-25 Thread John Syne
> On Mar 25, 2018, at 9:29 AM, Jonathan Cameron wrote: > > On Sat, 24 Mar 2018 15:45:21 -0700 > John Syne wrote: > >>> On Mar 24, 2018, at 8:02 AM, Jonathan Cameron wrote: >>> >>> On Mon, 19 Mar 2018 22:57:16 -0700 >>> John Syne

Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-25 Thread Jonathan Cameron
On Sat, 24 Mar 2018 16:06:17 -0700 John Syne wrote: This thread is becoming unmanageable so I am cropping this down to just the questions that remain open. > >> Probably easier to copy and paste this table into a spreadsheet. Let me > >> know if there is anything I got

Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-25 Thread Jonathan Cameron
On Sat, 24 Mar 2018 15:45:21 -0700 John Syne wrote: > > On Mar 24, 2018, at 8:02 AM, Jonathan Cameron wrote: > > > > On Mon, 19 Mar 2018 22:57:16 -0700 > > John Syne wrote: > > > >> Hi Jonathan, > >> > >> Thank you for all your

Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-25 Thread John Syne
Hi Jonathan, I was speaking with Rodrigo and here is what I think must be done to move ADE7878 out of staging Here are the steps as I see them: 1) Define the IIO Attributes so they are consistent with the IIO ABI. This should be pretty simple given agreement on the naming convention. 2) Map

Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-25 Thread John Syne
> On Mar 24, 2018, at 8:18 AM, Jonathan Cameron wrote: > > On Mon, 19 Mar 2018 23:28:45 -0700 > John Syne wrote: > >> Hi Jonathan, >> >> I broke out the {Direction}_{Type}_{Index}_{Modifier}_{Info_Mask} into >> separate columns to make sure I understand

Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-25 Thread John Syne
Hi Jonathan, I have attached a CSV version of this table below. Hopefully that will make things easier for you. RegisterIIO Attribute Device Tree or Code Direction type Index ModifierInfo Mask AIGAIN in_current0_phaseA_scalein current 0

Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-24 Thread John Syne
> On Mar 24, 2018, at 8:02 AM, Jonathan Cameron wrote: > > On Mon, 19 Mar 2018 22:57:16 -0700 > John Syne wrote: > >> Hi Jonathan, >> >> Thank you for all your hard work. Your feedback is really helpful. I’m >> surprised that no one from Analog Device

Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-24 Thread Jonathan Cameron
On Mon, 19 Mar 2018 23:28:45 -0700 John Syne wrote: > Hi Jonathan, > > I broke out the {Direction}_{Type}_{Index}_{Modifier}_{Info_Mask} into > separate columns to make sure I understand your instructions. Good way to > check the results. > > Probably easier to copy and

Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-24 Thread Jonathan Cameron
On Mon, 19 Mar 2018 22:57:16 -0700 John Syne wrote: > Hi Jonathan, > > Thank you for all your hard work. Your feedback is really helpful. I’m > surprised that no one from Analog Device has offered any suggestions. > Sadly those active in the mainline linux kernel from ADI

Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-20 Thread John Syne
Hi Jonathan, I broke out the {Direction}_{Type}_{Index}_{Modifier}_{Info_Mask} into separate columns to make sure I understand your instructions. Good way to check the results. Probably easier to copy and paste this table into a spreadsheet. Let me know if there is anything I got wrong.

Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-19 Thread John Syne
Hi Jonathan, Thank you for all your hard work. Your feedback is really helpful. I’m surprised that no one from Analog Device has offered any suggestions. Anyway, please see my comments inline below Regards, John > On Mar 18, 2018, at 5:23 AM, Jonathan Cameron wrote: >

meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-18 Thread Jonathan Cameron
On Sat, 17 Mar 2018 23:11:45 -0700 John Syne wrote: > Hi Jonathan, Hi John and All, I'd love to get some additional input on this from anyone interested. There are a lot of weird and wonderful derived quantities in an energy meter and it seems we need to make some

Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR

2018-03-18 Thread John Syne
Hi Jonathan, Here is the complete list of registers for the ADE7878 which I copied from the data sheet. I added a column “IIO Attribute” which I hope follows your IIO ABI. Please make any changes you feel are incorrect. BTW, there are several registers that cannot be generalized and are used

Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR

2018-03-17 Thread Jonathan Cameron
On Wed, 14 Mar 2018 23:12:02 -0700 John Syne wrote: > Hi Jonathan, > > I have been looking at the IIO ABI docs and if I understand > correctly, the idea is to use consistent naming conventions? So for > example, looking at the ADE7854 datasheet, the naming matching the >

Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR

2018-03-15 Thread John Syne
Hi Jonathan, I have been looking at the IIO ABI docs and if I understand correctly, the idea is to use consistent naming conventions? So for example, looking at the ADE7854 datasheet, the naming matching the ADE7854 registers would be as follows:

Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR

2018-03-10 Thread Jonathan Cameron
On Thu, 8 Mar 2018 21:37:33 -0300 Rodrigo Siqueira wrote: > On 03/07, Jonathan Cameron wrote: > > On Tue, 6 Mar 2018 21:43:47 -0300 > > Rodrigo Siqueira wrote: > > > > > The macro IIO_DEV_ATTR_CH_OFF is a wrapper for

Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR

2018-03-08 Thread Rodrigo Siqueira
On 03/07, Jonathan Cameron wrote: > On Tue, 6 Mar 2018 21:43:47 -0300 > Rodrigo Siqueira wrote: > > > The macro IIO_DEV_ATTR_CH_OFF is a wrapper for IIO_DEVICE_ATTR, with a > > tiny change in the name definition. This extra macro does not improve > > the

Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR

2018-03-07 Thread Jonathan Cameron
On Tue, 6 Mar 2018 21:43:47 -0300 Rodrigo Siqueira wrote: > The macro IIO_DEV_ATTR_CH_OFF is a wrapper for IIO_DEVICE_ATTR, with a > tiny change in the name definition. This extra macro does not improve > the readability and also creates some checkpatch errors. >

[PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR

2018-03-06 Thread Rodrigo Siqueira
The macro IIO_DEV_ATTR_CH_OFF is a wrapper for IIO_DEVICE_ATTR, with a tiny change in the name definition. This extra macro does not improve the readability and also creates some checkpatch errors. This patch fixes the checkpatch.pl errors: staging/iio/meter/ade7753.c:391: ERROR: Use 4 digit