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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 16 Dec 2022 15:50:19 +0200
From:   "Hawa, Hanna" <hhhawa@...zon.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Wolfram Sang <wsa@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>
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 v2 1/1] i2c: designware: set pinctrl recovery information from
 device pinctrl



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)

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index 7539b0740351..469344d4ee43 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -34,6 +34,7 @@
  #include <linux/of.h>
  #include <linux/of_irq.h>
  #include <linux/pinctrl/consumer.h>
+#include <linux/pinctrl/devinfo.h>
  #include <linux/pm_domain.h>
  #include <linux/pm_runtime.h>
  #include <linux/pm_wakeirq.h>
@@ -282,7 +283,11 @@ static void i2c_gpio_init_pinctrl_recovery(struct 
i2c_adapter *adap)
  {
         struct i2c_bus_recovery_info *bri = adap->bus_recovery_info;
         struct device *dev = &adap->dev;
-       struct pinctrl *p = bri->pinctrl;
+       struct pinctrl *p;
+
+       if (!bri->pinctrl)
+               bri->pinctrl = get_device_pinctrl(dev->parent);
+       p = bri->pinctrl;

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ