mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Syne <john3909@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: devel@driverdev.osuosl.org, Lars-Peter Clausen <lars@metafoo.de>,
	Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>,
	linux-iio@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Hartmut Knaack <knaack.h@gmx.de>,
	daniel.baluta@nxp.com
Subject: Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)
Date: Sun, 25 Mar 2018 13:53:02 -0700	[thread overview]
Message-ID: <DEF2F80D-110C-4A63-8A4D-2354F95BA6D6@gmail.com> (raw)
In-Reply-To: <20180325175430.3f60741f@archlinux>


> On Mar 25, 2018, at 9:54 AM, Jonathan Cameron <jic23@kernel.org> wrote:
> 
> On Sun, 25 Mar 2018 01:29:41 -0700
> John Syne <john3909@gmail.com> 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 and Apple Mail doesn’t
have a feature to wrap at 80 automatically so I have to do
this manually.
> 
>> 
>> 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.
> Please don't go just changing attribute names - the driver needs to
> use the standard approach of iio_chan_spec and create the vast
> majority of attributes automatically via that.  There 'may' be
> a few corner cases wee don't want to make generic and they 'might'
> be exposed as attributes.
> 
> I suspect this change is the 'big' job.  The core support necessary
> for RMS and MAV (computedtype or whatever we call it) will need adding
> as well.  That is a separate patch set with support for some examples
> in the dummy driver.
Great that you mentioned this, because I though we only needed to
modify the IIO_ATTR naming. I’ll take a look at iio_chan_spec and
the examples in the dummy driver.
> 
>> 2) Map the ADE7854 interrupt status to IIO events. This requires an
>>   interrupt processing section.
>> 3) Add DeviceTree support.
>> 4) Create DeviceTree overlay for the ADE7854.
> More a case of bindings for now.  If those are used via an overlay
> fine but given we don't have any boards with one one in mainline,
> this is an implementation detail for the user rather than part
> of moving this driver out of staging.
I was thinking more along the lines of documentation to show a
developer what was needed to get the driver working.
> 
>> 5) Update ADE7854 probe to read in the DeviceTree register settings.
>> 6) Add support for power modes (PM1, PM2).
> This isn't necessary for a move out of staging (nice to have though).
> 
>> 7) Not sure if we will support measurement streaming on the ADE7854.
>>   The problem is ADE7854 is designed as an SPI master, which means
>>   it controls the SPI clock, so the driver must support SPI slave
>>   mode. However, the Linux Kernel does not currently support SPI
>>   slave mode. We have three choices to make this work and they
>>   are all a lot of work: 1) Add support for SPI Slave mode to the
>>   kernel,  2) Use hardware to convert SPI signals to I2S signals
>>   and with the use of a custom codec, use the ALSA framework to
>>   stream the samples (this is an approach I used, but I don’t like
>>   it), 3) Move the I2S driver out of the sound subsystem and use it
>>   together with DMA to stream samples directly into the ADE7854 driver
>>   (my preferred solutions). Perhaps Mark Brown has some ideas on how
>>    to make this work. 
> I'll be honest, this is an end of line part and frankly more than
> a little crazy. I would go with simply not supporting the measurement
> streaming at all for this part.  If you really need it we can then
> move onto the how part, but from what you have said I'm guessing you
> don't care except in an abstract 'it would be nice' sort of a way?
Yeah, I’m moving to the ADE9000 so I’ll drop this.
> 
>> 
>> The ADE9000 will be much easier because it uses an SPI Slave interface. 
>> 
>> I hope I have captured everything, but let me know if I have missed anything.
>> 
> 
> That will do for now ;)  I'm sure there will be details that need
> tidying up once we have the above done, but that's true for any new
> driver (and this will be nearly a new driver before things are done).
Thank you again for all the detailed feedback.
> 
> Jonathan

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2018-03-25 20:53 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07  0:43 [PATCH v2 0/3] staging:iio:meter: Checkpatch cleanup for meter Rodrigo Siqueira
2018-03-07  0:43 ` [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR Rodrigo Siqueira
2018-03-07 20:07   ` Jonathan Cameron
2018-03-09  0:37     ` Rodrigo Siqueira
2018-03-10 15:10       ` Jonathan Cameron
2018-03-15  6:10         ` John Syne
2018-03-15  6:12         ` John Syne
2018-03-17 20:30           ` Jonathan Cameron
2018-03-18  6:11             ` John Syne
2018-03-18 12:23               ` meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR) Jonathan Cameron
2018-03-20  5:57                 ` John Syne
2018-03-24 15:02                   ` Jonathan Cameron
2018-03-24 22:45                     ` John Syne
2018-03-25 16:29                       ` Jonathan Cameron
2018-03-25 20:36                         ` John Syne
2018-03-30  9:13                           ` Jonathan Cameron
2018-03-20  6:28                 ` John Syne
2018-03-24 15:18                   ` Jonathan Cameron
2018-03-24 23:06                     ` John Syne
2018-03-25 16:44                       ` Jonathan Cameron
2018-03-25 20:43                         ` John Syne
2018-03-25 20:44                         ` John Syne
2018-03-24 23:18                     ` John Syne
2018-03-25  7:10                     ` John Syne
2018-03-25  7:13                     ` John Syne
2018-03-25  8:26                     ` John Syne
2018-03-25  8:29                     ` John Syne
2018-03-25 16:54                       ` Jonathan Cameron
2018-03-25 20:53                         ` John Syne [this message]
2018-03-30  9:16                           ` Jonathan Cameron
2018-03-07  0:44 ` [PATCH v2 2/3] staging:iio:meter: Remove unused macro IIO_DEV_ATTR_CH_OFF Rodrigo Siqueira
2018-03-07 20:09   ` Jonathan Cameron
2018-03-07  0:44 ` [PATCH v2 3/3] staging:iio:meter: Aligns open parenthesis Rodrigo Siqueira
2018-03-07 20:12   ` Jonathan Cameron

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=DEF2F80D-110C-4A63-8A4D-2354F95BA6D6@gmail.com \
    --to=john3909@gmail.com \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --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=pmeerw@pmeerw.net \
    --cc=rodrigosiqueiramelo@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®