From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Kent Gibson <warthog618@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Jack Winch <sunt.un.morcov@gmail.com>,
Helmut Grohne <helmut.grohne@intenta.de>,
Ben Hutchings <ben.hutchings@essensium.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Re: [libgpiod v2.0][PATCH] core: extend config objects
Date: Thu, 12 Aug 2021 16:43:46 +0200 [thread overview]
Message-ID: <CAMRc=MdV+GDGpwdMLwKTxaXR+x1ogLzanRBuvwG-aL2jQFrxsA@mail.gmail.com> (raw)
In-Reply-To: <20210812142345.GA29599@sol>
On Thu, Aug 12, 2021 at 4:23 PM Kent Gibson <warthog618@gmail.com> wrote:
>
> On Thu, Aug 12, 2021 at 02:51:02PM +0200, Bartosz Golaszewski wrote:
> > On Thu, Aug 12, 2021 at 12:29 PM Kent Gibson <warthog618@gmail.com> wrote:
> > >
> >
>
> <snip>
>
> > >
> > > Sure, it's a trade-off, but the alternative is requiring a 2-3k block
> > > even for a one line request, which seems a wee bit excessive.
> > >
> >
> > As you said - it's on the heap, so who cares. But this is also an
> > internal structure and so we can use bit fields. That should reduce
> > the memory footprint significantly as we now don't require more than 3
> > bits for any given enum. That would leave us with the debounce period
> > and offset as full size variables.
> >
>
> Rather than introducing a new collection of enums and bitfields, why not
> just store the v2 flags for the line?
>
Why a new collection of enums? It wouldn't change anything, we'd just
make sure in the setters we never overflow.
I would prefer to limit the use of kernel symbols (and types!) to the
minimum for clarity.
Bart
next prev parent reply other threads:[~2021-08-12 14:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-06 13:28 [libgpiod v2.0][PATCH] core: extend config objects Bartosz Golaszewski
2021-08-07 8:48 ` Kent Gibson
2021-08-08 19:11 ` Bartosz Golaszewski
2021-08-08 23:10 ` Kent Gibson
2021-08-10 7:52 ` Bartosz Golaszewski
2021-08-10 10:31 ` Kent Gibson
2021-08-11 1:16 ` Kent Gibson
2021-08-12 7:24 ` Bartosz Golaszewski
2021-08-12 10:29 ` Kent Gibson
2021-08-12 12:51 ` Bartosz Golaszewski
2021-08-12 13:03 ` Andy Shevchenko
2021-08-12 14:02 ` Bartosz Golaszewski
2021-08-12 13:52 ` Kent Gibson
2021-08-12 14:01 ` Bartosz Golaszewski
2021-08-12 14:23 ` Kent Gibson
2021-08-12 14:43 ` Bartosz Golaszewski [this message]
2021-08-12 15:02 ` Kent Gibson
2021-08-13 12:59 ` Bartosz Golaszewski
2021-08-13 13:03 ` Kent Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMRc=MdV+GDGpwdMLwKTxaXR+x1ogLzanRBuvwG-aL2jQFrxsA@mail.gmail.com' \
--to=brgl@bgdev.pl \
--cc=andriy.shevchenko@linux.intel.com \
--cc=ben.hutchings@essensium.com \
--cc=helmut.grohne@intenta.de \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=sunt.un.morcov@gmail.com \
--cc=warthog618@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).