Re: [PATCH v3 1/1] i2c: Set pinctrl recovery info to device pinctrl

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

 



On Mon, Dec 19, 2022 at 07:32:28PM +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.
> 
> 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.
> 
> Added new API to get the device pinctrl.
> 
> Signed-off-by: Hanna Hawa <hhhawa@xxxxxxxxxx>

The same comment about changelog. Place it in the correct position.

> 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.

...

> +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.

> +}

-- 
With Best Regards,
Andy Shevchenko





[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