[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y6xcGWK7ghrQIjL/@smile.fi.intel.com>
Date: Wed, 28 Dec 2022 17:09:13 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Hanna Hawa <hhhawa@...zon.com>
Cc: wsa@...nel.org, linus.walleij@...aro.org,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-gpio@...r.kernel.org, dwmw@...zon.co.uk, benh@...zon.com,
ronenk@...zon.com, talel@...zon.com, jonnyc@...zon.com,
hanochu@...zon.com, farbere@...zon.com, itamark@...zon.com
Subject: Re: [PATCH v4 2/2] i2c: Set i2c pinctrl recovery info from it's
device pinctrl
On Wed, Dec 21, 2022 at 08:51:16PM +0000, Hanna Hawa wrote:
> Currently the i2c subsystem rely on the controller device tree to
> initialize the pinctrl recovery information, part of the drivers does
> not set this field (rinfo->pinctrl), for example i2c designware driver.
DesignWare
> The pins information is saved part of the device structure before probe
> and it's done on pinctrl_bind_pins().
>
> Make the i2c init recovery to get the device pins if it's not
> initialized by the driver from the device pins.
...
> - struct pinctrl *p = bri->pinctrl;
> + struct pinctrl *p;
> +
> + bri->pinctrl = bri->pinctrl ?: dev_pinctrl(dev->parent);
> + p = bri->pinctrl;
What about
struct pinctrl *p = bri->pinctrl ?: dev_pinctrl(dev->parent);
bri->pinctrl = p;
?
Seems like one line of code less.
Either way,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists