linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Alexandre Courbot <gnurou@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] pinctrl: Widen the generic pinconf argument from 16 to 24 bits
Date: Fri, 20 Jan 2017 09:43:07 +0100	[thread overview]
Message-ID: <CACRpkdZzS5J-TTCdnVnu9FPiado17YmoaFJFOBy+-+E52tJrUQ@mail.gmail.com> (raw)
In-Reply-To: <20170119094820.83595-2-mika.westerberg@linux.intel.com>

On Thu, Jan 19, 2017 at 10:48 AM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:

> The current pinconf packed format allows only 16-bit argument limiting
> the maximum value 65535. For most types this is enough. However,
> debounce time can be in range of hundreths of milliseconds in case of
> mechanical switches so we cannot represent the worst case using the
> current format.
>
> In order to support larger values change the packed format so that the
> lower 8 bits are used as type which leaves 24 bits for the argument.
> This allows representing values up to 16777215 and debounce times up to
> 16 seconds.
>
> We also convert the existing users to use 32-bit integer when extracting
> argument from the packed configuration value.
>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

I like the looks of this :)

Look into Andy's comment and whatever else appears, then let's
apply the v2 of this.

Yours,
Linus Walleij

  parent reply	other threads:[~2017-01-20  8:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-19  9:48 [PATCH 0/3] pinctrl / gpio: Allow GPIO chips to use generic pinconfig Mika Westerberg
2017-01-19  9:48 ` [PATCH 1/3] pinctrl: Widen the generic pinconf argument from 16 to 24 bits Mika Westerberg
2017-01-19 12:04   ` Andy Shevchenko
2017-01-20  8:43   ` Linus Walleij [this message]
2017-01-19  9:48 ` [PATCH 2/3] pinctrl: Allow configuration of pins from gpiolib based drivers Mika Westerberg
2017-01-19 12:11   ` Andy Shevchenko
2017-01-20  8:48     ` Linus Walleij
2017-01-19  9:48 ` [PATCH 3/3] pinctrl / gpio: Introduce .set_config() callback for GPIO chips Mika Westerberg
2017-01-19 12:17   ` Andy Shevchenko
2017-01-20  9:13   ` Linus Walleij
2017-01-20  9:24     ` Neil Armstrong
2017-01-20  9:49       ` Linus Walleij
2017-01-20 13:36     ` Mika Westerberg
2017-01-19 12:17 ` [PATCH 0/3] pinctrl / gpio: Allow GPIO chips to use generic pinconfig Andy Shevchenko

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=CACRpkdZzS5J-TTCdnVnu9FPiado17YmoaFJFOBy+-+E52tJrUQ@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gnurou@gmail.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.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;
as well as URLs for NNTP newsgroup(s).