lkml.org 
[lkml]   [2022]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/1] i2c: designware: set pinctrl recovery information from device pinctrl
On Fri, Dec 16, 2022 at 03:50:19PM +0200, Hawa, Hanna wrote:
> On 12/15/2022 12:27 PM, Andy Shevchenko wrote:
> > OK, but why that function doesn't use the dev->pins->p if it's defined?
> > (As a fallback when rinfo->pinctrl is NULL. >
>
> The solution will look like the below diff (get_device_pinctrl() is new
> function that i've added that return the dev->pins->p)

Naming is not aligned with a namespace.

I would rather name it dev_pinctrl() and locate it in pinctrl/devinfo.h.

...

> - struct pinctrl *p = bri->pinctrl;
> + struct pinctrl *p;
> +
> + if (!bri->pinctrl)
> + bri->pinctrl = get_device_pinctrl(dev->parent);
> + p = bri->pinctrl;

Can be simplified with help of Elvis:

p = bri->pinctrl ?: dev_pinctrl(dev->parent);

> > Wolfram?
> >
> > Hanna, it seems you missed I²C maintainer to Cc...
>
> I based my CC/TO on get_maintainer.pl script. Will make sure that Wolfram on
> CC next time.

All the same about Linus W., who is pin control subsystem maintainer, and be
sure the respective mailing lists are also included.

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2022-12-16 15:47    [W:0.106 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site