From: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Laxman Dewangan
<ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org,
thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH V2 3/3] gpio: tegra: Add support for gpio debounce
Date: Tue, 19 Apr 2016 11:43:25 +0100 [thread overview]
Message-ID: <57160BCD.4080005@nvidia.com> (raw)
In-Reply-To: <1461059020-25373-3-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
On 19/04/16 10:43, Laxman Dewangan wrote:
> NVIDIA's Tegra210 support the HW debounce in the GPIO
> controller for all its GPIO pins.
>
> Add support for setting debounce timing by implementing the
> set_debounce callback of gpiochip.
>
> Signed-off-by: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> ---
> Changes from V1:
> - Write debounce count before enable.
> - Make sure the debounce count do not have any boot residuals.
> ---
> drivers/gpio/gpio-tegra.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 49 insertions(+)
[snip]
> @@ -327,6 +360,9 @@ static int tegra_gpio_resume(struct device *dev)
> tegra_gpio_writel(bank->oe[p], GPIO_OE(gpio));
> tegra_gpio_writel(bank->int_lvl[p], GPIO_INT_LVL(gpio));
> tegra_gpio_writel(bank->int_enb[p], GPIO_INT_ENB(gpio));
> + tegra_gpio_writel(bank->dbc_cnt[p], GPIO_DBC_CNT(gpio));
> + tegra_gpio_writel(bank->dbc_enb[p],
> + GPIO_MSK_DBC_EN(gpio));
If these registers are not valid on Tegra devices prior to Tegra210, I
don't think we should write to these locations on those devices (even if
we are writing back the values read).
> @@ -351,6 +387,10 @@ static int tegra_gpio_suspend(struct device *dev)
> bank->oe[p] = tegra_gpio_readl(GPIO_OE(gpio));
> bank->int_enb[p] = tegra_gpio_readl(GPIO_INT_ENB(gpio));
> bank->int_lvl[p] = tegra_gpio_readl(GPIO_INT_LVL(gpio));
> + bank->dbc_enb[p] = tegra_gpio_readl(
> + GPIO_MSK_DBC_EN(gpio));
> + bank->dbc_enb[p] = (bank->dbc_enb[p] << 8) ||
> + bank->dbc_enb[p];
Same here, not sure we should even bother reading these for Tegra's
before Tegra210.
Cheers
Jon
next prev parent reply other threads:[~2016-04-19 10:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-19 9:43 [PATCH V2 1/3] gpio: tegra: Don't open code of_device_get_match_data() Laxman Dewangan
2016-04-19 9:43 ` [PATCH V2 2/3] gpio: tegra: Remove the need of keeping device handle for gpio driver Laxman Dewangan
2016-04-19 12:33 ` Thierry Reding
2016-04-19 12:43 ` Laxman Dewangan
[not found] ` <571627F5.7000307-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-19 16:04 ` Stephen Warren
2016-04-19 9:43 ` [PATCH V2 3/3] gpio: tegra: Add support for gpio debounce Laxman Dewangan
[not found] ` <1461059020-25373-3-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-19 10:43 ` Jon Hunter [this message]
2016-04-19 12:36 ` Thierry Reding
2016-04-19 12:37 ` Thierry Reding
2016-04-19 12:45 ` Laxman Dewangan
2016-04-19 16:11 ` Stephen Warren
[not found] ` <571658CE.1040306-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-04-19 16:19 ` Laxman Dewangan
2016-04-19 16:36 ` Stephen Warren
2016-04-19 12:06 ` [PATCH V2 1/3] gpio: tegra: Don't open code of_device_get_match_data() Thierry Reding
2016-04-29 8:56 ` Linus Walleij
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=57160BCD.4080005@nvidia.com \
--to=jonathanh-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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 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).