[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190408074106.GC3622@lahna.fi.intel.com>
Date: Mon, 8 Apr 2019 10:41:06 +0300
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: Chris Chiu <chiu@...lessm.com>
Cc: andriy.shevchenko@...el.com, heikki.krogerus@...ux.intel.com,
drake@...lessm.com, linus.walleij@...aro.org,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
linux@...lessm.com
Subject: Re: [PATCH] pinctrl:intel: Retain HOSTSW_OWN for requested gpio pin
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.
Powered by blists - more mailing lists