lkml.org 
[lkml]   [2022]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 1/1] i2c: Set pinctrl recovery info to device pinctrl
Date
From


On 12/20/2022 12:53 PM, Andy Shevchenko wrote:
>> Signed-off-by: Hanna Hawa <hhhawa@amazon.com>
> > The same comment about changelog. Place it in the correct position.

Will be fixed.

>
>> Change Log v2->v3:
>> - Add API to get the device pinctrl
>> - Make the i2c init recovery to get the device pins
>>
>> Change Log v1->v2:
>> - set the rinfo->pinctrl to dev->pins->p instead calling
>> devm_pinctrl_get()
>> ---
>
>> include/linux/pinctrl/devinfo.h | 11 +++++++++++
>
> This should be a separate patch.

Sure, will move and create cover letter with the change log.

>
> ...
>
>> +static inline struct pinctrl *dev_pinctrl(struct device *dev)
>> +{
>> + return dev->pins && dev->pins->p ? dev->pins->p : NULL;
>
> GCC supports Elvis, you can use it to simplify the above.

How you suggest to simplify this?
I can use 'return dev->pins ? dev->pins->p ?: dev->pins->p : NULL;'

>
>> +}
>
> --
> With Best Regards,
> Andy Shevchenko
>
>

\
 
 \ /
  Last update: 2023-03-26 23:16    [W:0.080 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site