From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH V3 4/4] gpio: tegra: Add support for gpio debounce
Date: Thu, 21 Apr 2016 12:35:54 -0600 [thread overview]
Message-ID: <57191D8A.9040704@wwwdotorg.org> (raw)
In-Reply-To: <1461159058-1439-5-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
On 04/20/2016 07:30 AM, 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.
> diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
> +static int tegra_gpio_set_debounce(struct gpio_chip *chip, unsigned int offset,
> + /* There is only one debounce count register per port and hence
> + * set the maximum of current and requested debounce time.
> + */
> + if (tgi->bank_info[bank].dbc_cnt[port] < debounce_ms) {
> + tegra_gpio_writel(tgi, debounce_ms, GPIO_DBC_CNT(tgi, offset));
> + tgi->bank_info[bank].dbc_cnt[port] = debounce_ms;
> + }
Do we need any locking there? I imagine the GPIO core doesn't prevent
different threads/drivers from manipulating different GPIOs in parallel
on different cores.
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: linus.walleij@linaro.org, gnurou@gmail.com,
thierry.reding@gmail.com, linux-gpio@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3 4/4] gpio: tegra: Add support for gpio debounce
Date: Thu, 21 Apr 2016 12:35:54 -0600 [thread overview]
Message-ID: <57191D8A.9040704@wwwdotorg.org> (raw)
In-Reply-To: <1461159058-1439-5-git-send-email-ldewangan@nvidia.com>
On 04/20/2016 07:30 AM, 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.
> diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
> +static int tegra_gpio_set_debounce(struct gpio_chip *chip, unsigned int offset,
> + /* There is only one debounce count register per port and hence
> + * set the maximum of current and requested debounce time.
> + */
> + if (tgi->bank_info[bank].dbc_cnt[port] < debounce_ms) {
> + tegra_gpio_writel(tgi, debounce_ms, GPIO_DBC_CNT(tgi, offset));
> + tgi->bank_info[bank].dbc_cnt[port] = debounce_ms;
> + }
Do we need any locking there? I imagine the GPIO core doesn't prevent
different threads/drivers from manipulating different GPIOs in parallel
on different cores.
next prev parent reply other threads:[~2016-04-21 18:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-20 13:30 [PATCH V3 0/4] gpio: tegra: Cleanups and support fro debounce Laxman Dewangan
2016-04-20 13:30 ` Laxman Dewangan
2016-04-20 13:30 ` [PATCH V3 1/4] gpio: tegra: Don't open code of_device_get_match_data() Laxman Dewangan
2016-04-20 13:30 ` Laxman Dewangan
2016-04-20 13:30 ` [PATCH V3 2/4] gpio: tegra: Make of_device_id compatible data to constant Laxman Dewangan
2016-04-20 13:30 ` Laxman Dewangan
[not found] ` <1461159058-1439-3-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-21 18:33 ` Stephen Warren
2016-04-21 18:33 ` Stephen Warren
2016-04-20 13:30 ` [PATCH V3 3/4] gpio: tegra: Get rid of all file scoped global variables Laxman Dewangan
2016-04-20 13:30 ` Laxman Dewangan
2016-04-21 18:33 ` Stephen Warren
[not found] ` <57191D0A.8010005-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-04-21 18:35 ` Laxman Dewangan
2016-04-21 18:35 ` Laxman Dewangan
2016-04-21 19:34 ` Stephen Warren
[not found] ` <1461159058-1439-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-20 13:30 ` [PATCH V3 4/4] gpio: tegra: Add support for gpio debounce Laxman Dewangan
2016-04-20 13:30 ` Laxman Dewangan
[not found] ` <1461159058-1439-5-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-21 18:35 ` Stephen Warren [this message]
2016-04-21 18:35 ` Stephen Warren
2016-04-25 4:55 ` Alexandre Courbot
2016-04-25 4:55 ` Alexandre Courbot
2016-04-25 8:29 ` Laxman Dewangan
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=57191D8A.9040704@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@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=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 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.