Re: [PATCH V3 1/6] pinctrl: sprd: Modify pull-up parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 27, 2023 at 03:14:21PM +0800, Linhua Xu wrote:
> From: Linhua Xu <Linhua.Xu@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>

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





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux