Re: [PATCH 2/6] pinctrl: sprd: Fix the incorrect mask and shift definition

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

 



On Fri, Aug 25, 2023 at 11:18:22AM +0800, Linhua Xu wrote:
> From: Linhua Xu <Linhua.Xu@xxxxxxxxxx>
> 
> Pull-up and pull-down are mutually exclusive. When setting one of them,
> the bit of the other needs to be clear. Now, there are cases where pull-up
> and pull-down are set at the same time in the code, thus fix them.

...

> -#define SLEEP_PULL_DOWN_MASK		0x1
> +#define SLEEP_PULL_DOWN_MASK		0x3

GENMASK()

...

> -#define PULL_DOWN_MASK			0x1
> +#define PULL_DOWN_MASK			0x3

GENMASK()

...

> -#define SLEEP_PULL_UP_MASK		0x1
> +#define SLEEP_PULL_UP_MASK		0x3

GENMASK()

...

> -#define PULL_UP_MASK			0x21
> +#define PULL_UP_MASK			0x43

GENMASK() + BIT()?

-- 
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