[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM6PR08MB4376058D3FFB4139E9292EE8FFB09@AM6PR08MB4376.eurprd08.prod.outlook.com>
Date: Mon, 20 Jun 2022 14:18:30 +0000
From: Pierluigi Passaro <pierluigi.p@...iscite.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>,
Alifer Willians de Moraes <alifer.m@...iscite.com>
CC: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Eran Matityahu <eran.m@...iscite.com>,
Linus Walleij <linus.walleij@...aro.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Francesco Ferraro <francesco.f@...iscite.com>
Subject: Re: [PATCH] driver: pca953x: avoid error message when resuming
Hi All,
> > From: FrancescoFerraro <francesco.f@...iscite.com>
> >
> > Avoids the error messages "pca953x 1-0020: failed reading register"
> > when resuming from suspend using gpio-key attached to pca9534.
> Thanks for your report and fix. My comments below.
> First of all, how many of them do you get and why is it a problem?
> ...
The number of occurrences depends on the time required to I2C bus to fully wake-up.
It's not a real problem, but the message may lead to think about a real I2C problem.
> > const struct pca953x_reg_config *regs;
> > + int is_in_suspend;
> Usually we call it is_suspended or so, check existing code by `git
> grep ...`. And it can be boolean.
> ...
Do you mean something like in drivers/gpio/gpio-omap.c ?
> > ret = regmap_bulk_read(chip->regmap, regaddr, value, NBANK(chip));
> > if (ret < 0) {
> > - dev_err(&chip->client->dev, "failed reading register\n");
> > + if (!chip->is_in_suspend)
> > + dev_err(&chip->client->dev, "failed reading register\n");
> Hmm... Maybe we can simply move it to debug level?
On the other side, this can be a serious problem, so I'm not sure the level should be changed.
> > return ret;
> > }
> ...
> > chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
> > if (chip == NULL)
> > return -ENOMEM;
> > + chip->is_in_suspend = 0;
> Redundant change.
> --
> With Best Regards,
> Andy Shevchenko
Thanks
Best Regards
Pier
Powered by blists - more mailing lists