[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VcfovXsU9J6Dn5kR_zf9g5wUGndiC5OBPci=XaGUosgBQ@mail.gmail.com>
Date: Tue, 30 Mar 2021 15:10:11 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: "Vaittinen, Matti" <Matti.Vaittinen@...rohmeurope.com>
Cc: linux-power <linux-power@...rohmeurope.com>,
"bgolaszewski@...libre.com" <bgolaszewski@...libre.com>,
"lee.jones@...aro.org" <lee.jones@...aro.org>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linus.walleij@...aro.org" <linus.walleij@...aro.org>,
"robh+dt@...nel.org" <robh+dt@...nel.org>
Subject: Re: [PATCH v5 09/19] gpio: support ROHM BD71815 GPOs
On Tue, Mar 30, 2021 at 3:06 PM Vaittinen, Matti
<Matti.Vaittinen@...rohmeurope.com> wrote:
> On Tue, 2021-03-30 at 13:11 +0300, Andy Shevchenko wrote:
> > On Mon, Mar 29, 2021 at 3:58 PM Matti Vaittinen
> > <matti.vaittinen@...rohmeurope.com> wrote:
> > >
> > > +struct bd71815_gpio {
> > > + struct gpio_chip chip;
> > > + struct device *dev;
> >
> > Wondering why you need this. Is it the same as chip.parent?
> >
>
> This is exactly the reason why I had the comments you objected in the
> probe. dev is pointer to the platform device - which should be used for
> prints and any potential devm stuff.
>
> chip.parent is the MFD device which provides the regmap access and DT
> node.
We have a kernel doc for such things. If you commented it in the first
place around this structure, it will be obvious. Now you have dangling
comment somewhere and no clue for reader why you have struct device
pointer here.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists