All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Chris Coffey <cmc@babblebit.net>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Michael Welling <mwelling@ieee.org>,
	linux-iio@vger.kernel.org, <michael.hennerich@analog.com>,
	stefan.popa@analog.com, Sean Nyekjaer <sean.nyekjaer@prevas.dk>,
	maxime.roussinbelanger@gmail.com, peda@axentia.se
Subject: Re: [PATCH] iio: dac: mcp4922: Add powerdown support
Date: Sat, 13 Oct 2018 13:15:58 +0100	[thread overview]
Message-ID: <20181013131558.1ffda128@archlinux> (raw)
In-Reply-To: <20181009115707.r5yeq67dhbfjit6f@deb-660>

On Tue, 9 Oct 2018 12:57:07 +0100
Chris Coffey <cmc@babblebit.net> wrote:

> Hi Jonathan, thank you for the review. I added a few comments below
> based on your feedback.
> 
> - Chris
> 
> On Mon, Oct 08, 2018 at 09:08:29PM +0100, Jonathan Cameron wrote:
> > That's interesting.  I'm not sure we have any consistency of interface
> > around whether a write to the value when powered down results in the device
> > powering up or not.  It certainly feels like we should be consistent on this
> > and document it.
> > 
> > I checked the first random driver I found the ad5360 and it appears to
> > have the powerdown on the front end in some sense in that there is a
> > specific bit to clear in order to power up again and it is not done
> > by changing the current value.
> > 
> > To my mind that is the more logical option, but I'd like others opinions
> > on this.
> >   
> I see what you mean. My intent was to mirror the behavior of userspace
> programs and APIs that I've written and seen for these chips. They take
> advantage of the fact a single command to the chip sets the voltage
> level and power state. That way there is no need to issue a separate
> power-up command, though it's available in sysfs if a user wants it
> (e.g., to toggle the channel's power state without specifying a new
> voltage level).
> 
> Like you, I'd be curious to hear what others have to say. My DAC
> experience is almost exclusively with Microchip devices, so I may be
> suffering from a bit of tunnel vision here.

Agreed. I've added a few additional CCs.  If we don't get any
replies we may want to raise a specific RFC email on this to catch
people's attention.

The cc list is fairly random, so if people wouldn't mind drawing
the attention of others to this question that would be very helpful!

Jonathan


> 
> > It's a little unusual to have an enum specified with just
> > one value.. I can see the advantage in terms of this looking
> > like every other powerdown mode control.
> > 
> > I don't suppose it hurts though.   Seems a little pointless
> > to have this set function actually do anything though...
> > 
> > Also no really point in having the get actually read the value.
> > 
> > So I would just provide a stub for this that returns the
> > same value ever time and nothing at all for the set.
> >   
> Makes sense. I was indeed trying to be consistent with the powerdown
> mode interface in other drivers, but as you note, there's no point in
> actually doing anything in these get/set functions, as the value will
> never change.
> 

  reply	other threads:[~2018-10-13 19:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03  9:06 [PATCH] iio: dac: mcp4922: Add powerdown support Chris Coffey
2018-10-08 20:08 ` Jonathan Cameron
2018-10-09 11:57   ` Chris Coffey
2018-10-13 12:15     ` Jonathan Cameron [this message]
2018-10-15  5:49       ` Sean Nyekjær

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=20181013131558.1ffda128@archlinux \
    --to=jic23@kernel.org \
    --cc=cmc@babblebit.net \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=maxime.roussinbelanger@gmail.com \
    --cc=michael.hennerich@analog.com \
    --cc=mwelling@ieee.org \
    --cc=peda@axentia.se \
    --cc=pmeerw@pmeerw.net \
    --cc=sean.nyekjaer@prevas.dk \
    --cc=stefan.popa@analog.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.