lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 14 Dec 2022 15:43:28 +0200
From:   "Hawa, Hanna" <hhhawa@...zon.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
CC:     <jarkko.nikula@...ux.intel.com>, <mika.westerberg@...ux.intel.com>,
        <jsd@...ihalf.com>, <linux-i2c@...r.kernel.org>,
        <linux-kernel@...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 1/1] i2c: designware: add pinctrl for recovery info as an option



On 12/14/2022 1:42 PM, Andy Shevchenko wrote:
> Can you explain, why pinctrl_bind_pins() is not enough?
> 
> (You may also refer to the ab78029ecc34 ("drivers/pinctrl: grab default handles
>   from device core") for more details.)

Thanks for your reviewing and pointing to this function.

No need to recall the devm_pinctrl_get() during the i2c probe, as the 
pinctrl_bind_pins() is enough to init the pinctrl struct. But still need 
to set the rinfo->pinctrl with dev->pins->p, will upload new patchset.

The change will look like:

@@ -832,6 +833,9 @@ static int i2c_dw_init_recovery_info(struct 
dw_i2c_dev *dev)
         struct i2c_adapter *adap = &dev->adapter;
         struct gpio_desc *gpio;

+       if (dev->dev->pins && dev->dev->pins->p)
+               rinfo->pinctrl = dev->dev->pins->p;
+
         gpio = devm_gpiod_get_optional(dev->dev, "scl", GPIOD_OUT_HIGH);
         if (IS_ERR_OR_NULL(gpio))
                 return PTR_ERR_OR_ZERO(gpio);

Thanks,
Hanna

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ