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: <ZTufFGSJM+041nO6@smile.fi.intel.com>
Date:   Fri, 27 Oct 2023 14:29:24 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Linhua Xu <Linhua.xu@...soc.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Orson Zhai <orsonzhai@...il.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        Chunyan Zhang <zhang.lyra@...il.com>,
        linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
        lh xu <xulh0829@...il.com>,
        Zhirong Qiu <zhirong.qiu@...soc.com>,
        Xiongpeng Wu <xiongpeng.wu@...soc.com>
Subject: Re: [PATCH V3 1/6] pinctrl: sprd: Modify pull-up parameters

On Fri, Oct 27, 2023 at 03:14:21PM +0800, Linhua Xu wrote:
> From: Linhua Xu <Linhua.Xu@...soc.com>
> 
> For UNISOC pin controller, there are three different configurations of
> pull-up drive current. Modify the 20K pull-up resistor configuration and
> add the 1.8K pull-up resistor configuration.

> Fixes:<1fb4b907e808> ("pinctrl: sprd: Add Spreadtrum pin control driver")
> 
> Signed-off-by: Linhua Xu <Linhua.Xu@...soc.com>

I guess I already pointed out that there must not be blank lines in the tag
block, besides that read "Submitting Patches" document to see how properly
format the Fixes: tag.

...

> -#define PULL_UP_4_7K			(BIT(12) | BIT(7))
> +#define PULL_UP_1_8K			(BIT(12) | BIT(7))
> +#define PULL_UP_4_7K			BIT(12)
>  #define PULL_UP_20K			BIT(7)

>  #define PULL_UP_MASK			0x21
>  #define PULL_UP_SHIFT			7

Basically these two repeat the above 1.8K case.
But I see that you try to take care in the next patch about them.
Still, the better is to use those _MASKs and _SHIFTs in the code.
See below.

...

>  			if ((reg & (SLEEP_PULL_DOWN | SLEEP_PULL_UP)) ||
> -			    (reg & (PULL_DOWN | PULL_UP_4_7K | PULL_UP_20K)))
> +			    (reg & (PULL_DOWN | PULL_UP_4_7K | PULL_UP_20K | PULL_UP_1_8K)))

			if ((reg & (SLEEP_PULL_DOWN | SLEEP_PULL_UP)) ||
			    (reg & (PULL_DOWN | (PULL_UP_MASK << PULL_UP_SHIFT))))

>  				return -EINVAL;

...

>  					mask = PULL_DOWN | PULL_UP_20K |
> -						PULL_UP_4_7K;
> +						PULL_UP_4_7K | PULL_UP_1_8K;

					mask = PULL_DOWN | (PULL_UP_MASK << PULL_UP_SHIFT);

Ditto.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ