All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	"David E . Box" <david.e.box@linux.intel.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH v2 3/6] pinctrl: Add a possibility to configure pins from a gpiolib based drivers
Date: Fri, 13 Jan 2017 16:36:42 +0100	[thread overview]
Message-ID: <CACRpkdZjQipUkPxGTzJBF_L0EK8dg4wiW5DSCTft15aJ0UiLxQ@mail.gmail.com> (raw)
In-Reply-To: <20170112092255.GX2330@lahna.fi.intel.com>

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

> Hmm, looking at users of .set_debounce() I can see that the debounce
> time can be quite large. For example some signals which are connected to
> physical push-buttons may need > 64ms debounce time.
>
> However, the current pinconfig value is defined to be unsigned long
> which on 32-bit architecture is 32-bits. From that the higher 16-bits
> are used as config leaving the value to be 16-bits. This gives maximum
> debounce time of 65535us. I don't think it can cover all the uses of
> .set_debounce(). This could also be problematic when specifying values
> for pull resistors.
>
> One solution is to convert the packed value to be u64 instead, leaving
> up to 48-bits for the value. Alternatively we could provide a scale
> field with the packed format.

Hm yeah as long as all in-kernel users survive I don't see why we
couldn't just make it 64bit. Is it a big deal?

A scale field (multiplier) can also work, I don't know which is most
elegant.

Yours,
Linus Walleij

  reply	other threads:[~2017-01-13 15:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 14:31 [PATCH v2 0/6] pinctrl: Fixes and updates to Intel drivers Mika Westerberg
2017-01-10 14:31 ` [PATCH v2 1/6] pinctrl: broxton: Use correct PADCFGLOCK offset Mika Westerberg
2017-01-11 12:47   ` Linus Walleij
2017-01-10 14:31 ` [PATCH v2 2/6] pinctrl: intel: Convert to use devm_gpiochip_add_data() Mika Westerberg
2017-01-11 12:53   ` Linus Walleij
2017-01-10 14:31 ` [PATCH v2 3/6] pinctrl: Add a possibility to configure pins from a gpiolib based drivers Mika Westerberg
2017-01-11 13:06   ` Linus Walleij
2017-01-11 13:33     ` Mika Westerberg
2017-01-12  9:22       ` Mika Westerberg
2017-01-13 15:36         ` Linus Walleij [this message]
2017-01-13 16:33           ` Mika Westerberg
2017-01-18  9:26             ` Linus Walleij
2017-01-10 14:31 ` [PATCH v2 4/6] pinctrl: intel: Add support for hardware debouncer Mika Westerberg
2017-01-10 14:32 ` [PATCH v2 5/6] pinctrl: intel: Add support for 1k additional pull-down Mika Westerberg
2017-01-10 14:32 ` [PATCH v2 6/6] pinctrl: intel: Add Intel Gemini Lake pin controller support Mika Westerberg

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=CACRpkdZjQipUkPxGTzJBF_L0EK8dg4wiW5DSCTft15aJ0UiLxQ@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=david.e.box@linux.intel.com \
    --cc=heikki.krogerus@linux.intel.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 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.