Re: [PATCH] pinctrl:intel: Retain HOSTSW_OWN for requested gpio pin

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

 



On Mon, Apr 08, 2019 at 12:21:03PM +0800, Chris Chiu wrote:
> +static void
> +intel_gpio_update_pad_mode(void __iomem *hostown, u32 mask, u32 value)
> +{
> +	u32 curr = readl(hostown);
> +	u32 updated = (curr & ~mask) | (value & mask);

I think here we should first complain if the expected ownership is not
correct. Warning or info level probably enough.

> +
> +	return writel(updated, hostown);

Also if the pin is not requested and not changed we should not touch the
register.

Otherwise this looks good to me.



[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