[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aGJV3uvuFV4rrOUa@smile.fi.intel.com>
Date: Mon, 30 Jun 2025 12:16:14 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: Ahmad Fatoum <a.fatoum@...gutronix.de>,
Kent Gibson <warthog618@...il.com>,
Jan Lübbe <jlu@...gutronix.de>,
Marek Vasut <marex@...x.de>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Linus Walleij <linus.walleij@...aro.org>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH v2 1/9] gpio: sysfs: add a parallel class device for each
GPIO chip using device IDs
On Mon, Jun 30, 2025 at 10:34:52AM +0200, Bartosz Golaszewski wrote:
> On Fri, Jun 27, 2025 at 5:21 PM Andy Shevchenko
> <andriy.shevchenko@...el.com> wrote:
> > On Mon, Jun 23, 2025 at 10:59:49AM +0200, Bartosz Golaszewski wrote:
...
> > > struct gpiodev_data {
> > > struct gpio_device *gdev;
> > > struct device *cdev_base; /* Class device by GPIO base */
> > > + struct device *cdev_id; /* Class device by GPIO device ID */
> >
> > I would add it in the middle in a way of the possible drop or conditional
> > compiling of the legacy access in the future.
>
> I'm not sure what difference it makes?
It collects optional (which you do with ifdeffery later on) at the end of the
structure. Maybe there is no effect now, but it might be in the future.
> > > };
...
> > > +static struct device_attribute dev_attr_export = __ATTR(export, 0200, NULL,
> > > + chip_export_store);
> >
> > __ATTR_WO()
> >
>
> No can do, the attribute would have to be called "chip_export". A
> function called export_store() already exists in this file.
I didn't get, we have two "export" nodes implemented in the same file?
...
> > > +static struct device_attribute dev_attr_unexport = __ATTR(unexport, 0200,
> > > + NULL,
> > > + chip_unexport_store);
> >
> > Ditto.
Ditto.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists