public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: broonie@opensource•wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] mfd: regulator: max8998: BUCK1/2 control augmented by GPIO pins
Date: Fri, 24 Sep 2010 10:21:24 +0100	[thread overview]
Message-ID: <20100924092123.GG32112@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <20100924110825.138ce87f@lmajewski.digital.local>

On Fri, Sep 24, 2010 at 11:08:25AM +0200, Lukasz Majewski wrote:

> Unfortunately there is problem with this distinction and use of
> gpio_is_valid.

> The gpio_is_valid is simply defined as  

> return ((unsigned)number) < ARCH_NR_GPIOS;

> For which 0 is also a valid GPIO.

I understand that on some platforms it is actually a valid GPIO.

> One workaround for this is to check explicitly the condition:
> pdata->buck1_set1 != 0 , but this is neither elegant nor it prevents
> the situation when on some architecture GPIO 0 is valid.

The standard check is gpio_is_valid() with the GPIO set to -1 if it's
not valid.

> is the replacement algorithm. I think that circular buffer
> implementation would be a feasible solution for 4/2 bytes elements
> array.

> With more extended functionality, when more voltage levels would be
> available, more sophisticated approach (like LRU) may be used.

The problem here is that this is going to be pretty pessimal if the
system is using more than four different voltages; you get no advantage
at all from the preprogramming.

      reply	other threads:[~2010-09-24  9:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-21 14:18 [PATCH] mfd: regulator: max8998: BUCK1/2 control augmented by GPIO pins Lukasz Majewski
2010-09-21 15:01 ` Mark Brown
2010-09-22  6:46   ` Lukasz Majewski
2010-09-22 10:26     ` Mark Brown
2010-09-24  9:08   ` Lukasz Majewski
2010-09-24  9:21     ` Mark Brown [this message]

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=20100924092123.GG32112@rakim.wolfsonmicro.main \
    --to=broonie@opensource$(echo .)wolfsonmicro.com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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