[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ac51854b-09a6-4b79-b409-b950929655cb@moroto.mountain>
Date: Sun, 14 Apr 2024 13:34:52 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Robert Marko <robimarko@...il.com>
Cc: Hanna Hawa <hhhawa@...zon.com>, andriy.shevchenko@...ux.intel.com,
wsa@...nel.org, linus.walleij@...aro.org, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-gpio@...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 v5 2/2] i2c: Set i2c pinctrl recovery info from it's
device pinctrl
On Thu, Apr 11, 2024 at 07:08:56PM +0200, Robert Marko wrote:
>
> On 28. 12. 2022. 17:48, 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.
> >
> > Signed-off-by: Hanna Hawa <hhhawa@...zon.com>
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> > ---
> > drivers/i2c/i2c-core-base.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
> > index 7539b0740351..fb5644457452 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,9 @@ 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 = bri->pinctrl ?: dev_pinctrl(dev->parent);
> > +
> > + bri->pinctrl = p;
>
> Hi Hanna,
> I know this has already been merged, but setting bri->pinctrl breaks PXA
> recovery.
This is patch is a year and half old so it's a bit late to just revert
it...
What does "breaks" mean in this context? Is there a NULL dereference?
Do you have a stack trace? It's really hard to get inspired to look at
the code when the bug report is so vague...
regards,
dan carpenter
Powered by blists - more mailing lists