All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-mmc@vger.kernel.org, linux-sh@vger.kernel.org
Subject: Re: [PATCH 07/29] mmc: add a function to get a regulator, supplying card's Vdd
Date: Fri, 18 May 2012 16:18:38 +0100	[thread overview]
Message-ID: <20120518151837.GD4039@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1205181059560.23140@axis700.grange>

[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]

On Fri, May 18, 2012 at 11:28:31AM +0200, Guennadi Liakhovetski wrote:

> 1. A regulator that can (in principle) change state, i.e., switch on and 
> off. Such a regulator is good to keep for the runtime to power up and down 
> the card.

> 2. A regulator, that cannot switch, but at least can tell its supplied 
> voltage is used ones to read out supported voltages and released again.

This doesn't make sense, you can only change the voltages if you hold a
reference to the regulator.

> 3. A regulator that can do none of the above is defined as "useless"

> > You may also run into trouble on boards that use the ability to disable
> > unused regulators at the end of boot - they'll power things off even
> > without the ability to change status at runtime.

> Aha, you mean, I shouldn't put() the regulator, even if it cannot change 
> status itself?

Yes, you ought to to be safe and like I say if you want to manage the
voltage then you need to keep a reference to the regulator.

> Can this also happen with a dummy regulator?

Obviously not, though if you've got explicit code in to handle dummy
regulators you're rather missing the point.  Their entire purpose is to
provide a crutch to keep the system going if bits are missing from the
bindings, they're not intended to be used in production.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-mmc@vger.kernel.org, linux-sh@vger.kernel.org
Subject: Re: [PATCH 07/29] mmc: add a function to get a regulator, supplying card's Vdd
Date: Fri, 18 May 2012 15:18:38 +0000	[thread overview]
Message-ID: <20120518151837.GD4039@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1205181059560.23140@axis700.grange>

[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]

On Fri, May 18, 2012 at 11:28:31AM +0200, Guennadi Liakhovetski wrote:

> 1. A regulator that can (in principle) change state, i.e., switch on and 
> off. Such a regulator is good to keep for the runtime to power up and down 
> the card.

> 2. A regulator, that cannot switch, but at least can tell its supplied 
> voltage is used ones to read out supported voltages and released again.

This doesn't make sense, you can only change the voltages if you hold a
reference to the regulator.

> 3. A regulator that can do none of the above is defined as "useless"

> > You may also run into trouble on boards that use the ability to disable
> > unused regulators at the end of boot - they'll power things off even
> > without the ability to change status at runtime.

> Aha, you mean, I shouldn't put() the regulator, even if it cannot change 
> status itself?

Yes, you ought to to be safe and like I say if you want to manage the
voltage then you need to keep a reference to the regulator.

> Can this also happen with a dummy regulator?

Obviously not, though if you've got explicit code in to handle dummy
regulators you're rather missing the point.  Their entire purpose is to
provide a crutch to keep the system going if bits are missing from the
bindings, they're not intended to be used in production.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-05-18 15:18 UTC|newest]

Thread overview: 122+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-03 15:05 [PATCH 00/29] mmc: mmcif and tmio regulator and OF support Guennadi Liakhovetski
2012-05-03 15:05 ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 01/29] mmc: sh_mmcif: remove redundant .down_pwr() callback Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 02/29] sh: ecovec: remove unused .down_pwr() MMCIF callback Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 03/29] mmc: sh_mmcif: remove unused .down_pwr() callback Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 04/29] regulator: fix devm_regulator_put() to call regulator_put() explicitly Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 16:56   ` Mark Brown
2012-05-03 16:56     ` Mark Brown
2012-05-18  8:54     ` Guennadi Liakhovetski
2012-05-18  8:54       ` Guennadi Liakhovetski
2012-05-18 15:10       ` Mark Brown
2012-05-18 15:10         ` Mark Brown
2012-05-03 15:05 ` [PATCH 05/29] regulator: use IS_ERR_OR_NULL() instead of open-coding Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:32   ` Mark Brown
2012-05-03 15:32     ` Mark Brown
2012-05-18  8:44     ` Guennadi Liakhovetski
2012-05-18  8:44       ` Guennadi Liakhovetski
2012-05-18  8:57     ` Paul Mundt
2012-05-18  8:57       ` Paul Mundt
2012-05-18  9:18       ` Guennadi Liakhovetski
2012-05-18  9:18         ` Guennadi Liakhovetski
2012-05-18  9:19         ` Paul Mundt
2012-05-18  9:19           ` Paul Mundt
2012-05-18 15:04       ` Mark Brown
2012-05-18 15:04         ` Mark Brown
2012-06-11 11:38         ` Guennadi Liakhovetski
2012-06-11 11:38           ` Guennadi Liakhovetski
2012-06-11 11:51           ` Mark Brown
2012-06-11 11:51             ` Mark Brown
2012-06-11 12:06             ` Guennadi Liakhovetski
2012-06-11 12:06               ` Guennadi Liakhovetski
2012-06-11 12:15               ` Mark Brown
2012-06-11 12:15                 ` Mark Brown
2012-05-03 15:05 ` [PATCH 06/29] regulator: export a function to check if regulator can change status Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:25   ` Mark Brown
2012-05-03 15:25     ` Mark Brown
2012-05-18  8:33     ` Guennadi Liakhovetski
2012-05-18  8:33       ` Guennadi Liakhovetski
2012-05-18 15:08       ` Mark Brown
2012-05-18 15:08         ` Mark Brown
2012-05-18 15:23         ` Guennadi Liakhovetski
2012-05-18 15:23           ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 07/29] mmc: add a function to get a regulator, supplying card's Vdd Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:42   ` Mark Brown
2012-05-03 15:42     ` Mark Brown
2012-05-18  9:28     ` Guennadi Liakhovetski
2012-05-18  9:28       ` Guennadi Liakhovetski
2012-05-18 15:18       ` Mark Brown [this message]
2012-05-18 15:18         ` Mark Brown
2012-05-18 15:39         ` Guennadi Liakhovetski
2012-05-18 15:39           ` Guennadi Liakhovetski
2012-05-18 16:04           ` Mark Brown
2012-05-18 16:04             ` Mark Brown
2012-05-03 15:05 ` [PATCH 08/29] mmc: sh_mmcif: add regulator support Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:45   ` Mark Brown
2012-05-03 15:45     ` Mark Brown
2012-05-18  9:35     ` Guennadi Liakhovetski
2012-05-18  9:35       ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 09/29] mmc: tmio: stop interface clock before runtime PM suspending Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 10/29] mmc: tmio: don't needlessly enable interrupts during probing Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 11/29] mmc: tmio: add callbacks to enable-update and disable the interface clock Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 12/29] mmc: sdhi: implement tmio-mmc clock enable-update and disable callbacks Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 13/29] mmc: tmio: add regulator support Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:56   ` Mark Brown
2012-05-03 15:56     ` Mark Brown
2012-05-18  9:55     ` Guennadi Liakhovetski
2012-05-18  9:55       ` Guennadi Liakhovetski
2012-05-18 15:34       ` Mark Brown
2012-05-18 15:34         ` Mark Brown
2012-05-03 15:05 ` [PATCH 14/29] mmc: sdhi: do not install dummy callbacks Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 15/29] mmc: extend and rename cd-gpio helpers to handle more slot GPIO functions Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-17 14:16   ` S, Venkatraman
2012-05-17 14:28     ` S, Venkatraman
2012-05-03 15:05 ` [PATCH 16/29] mmc: tmio: use MMC opcode defines instead of numbers Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 17/29] mmc: use a more generic name for slot function types and fields Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 18/29] mmc: tmio: remove a duplicated comment line Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 19/29] mmc: add two capability flags for CD and WP signal polarity Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 20/29] mmc: add CD GPIO polling support to slot functions Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 21/29] mmc: convert slot functions to managed allocation Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 22/29] mmc: add WP pin handler to slot functions Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 23/29] mmc: tmio: use generic GPIO CD and WP handlers Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 24/29] mmc: add a simple generic OF parser Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-04 18:26   ` Olof Johansson
2012-05-04 18:26     ` Olof Johansson
2012-05-18  9:58     ` Guennadi Liakhovetski
2012-05-18  9:58       ` Guennadi Liakhovetski
2012-05-10  7:51   ` Magnus Damm
2012-05-10  7:51     ` Magnus Damm
2012-05-03 15:05 ` [PATCH 25/29] mmc: tmio: add OF support Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 26/29] mmc: sdhi: add OF support, make platform data optional Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 27/29] mmc: mmcif: add OF support Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 28/29] mmc: mmcif: add support for generic GPIO CD polling Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski
2012-05-03 15:05 ` [PATCH 29/29] sh: ecovec: switch MMC power control to regulators Guennadi Liakhovetski
2012-05-03 15:05   ` Guennadi Liakhovetski

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=20120518151837.GD4039@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    /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.