lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGS+omA=xbZH04nkVddVi77xvNznjx36_rHJHhAHBLejuxZqgA@mail.gmail.com>
Date:	Fri, 1 Apr 2016 22:28:01 +0800
From:	Daniel Kurtz <djkurtz@...omium.org>
To:	Yingjoe Chen <yingjoe.chen@...iatek.com>
Cc:	Linus Walleij <linus.walleij@...aro.org>,
	Matthias Brugger <matthias.bgg@...il.com>,
	Hongzhou Yang <hongzhou.yang@...iatek.com>,
	"open list:PIN CONTROL SUBSYSTEM" <linux-gpio@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"moderated list:ARM/Mediatek SoC support" 
	<linux-mediatek@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	srv_heupstream <srv_heupstream@...iatek.com>
Subject: Re: [PATCH] pinctrl: mediatek: correct debounce time unit in mtk_gpio_set_debounce

Hi Yingjoe,

On Fri, Apr 1, 2016 at 9:51 PM, Yingjoe Chen <yingjoe.chen@...iatek.com> wrote:
> The debounce time unit for gpio_chip.set_debounce is us but
> mtk_gpio_set_debounce regard it as ms.
> Fix this by correct debounce time array dbnc_arr so it can find correct
> debounce setting.

This patch also changes the first entry to 500 usec.  At least mention why.

>
> Signed-off-by: Yingjoe Chen <yingjoe.chen@...iatek.com>
> ---
>  drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
> index 2bbe6f7..be72325 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
> @@ -1004,7 +1004,8 @@ static int mtk_gpio_set_debounce(struct gpio_chip *chip, unsigned offset,
>         struct mtk_pinctrl *pctl = dev_get_drvdata(chip->parent);
>         int eint_num, virq, eint_offset;
>         unsigned int set_offset, bit, clr_bit, clr_offset, rst, i, unmask, dbnc;
> -       static const unsigned int dbnc_arr[] = {0 , 1, 16, 32, 64, 128, 256};
> +       static const unsigned int dbnc_arr[] = {500, 1000, 16000, 32000, 64000,
> +                                               128000, 256000};

While you are at it, can you please rename this to something more
readable than "dbnc"?

-Dan

>         const struct mtk_desc_pin *pin;
>         struct irq_data *d;
>
> --
> 1.9.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ