All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Kent Gibson <warthog618@gmail.com>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-gpio@vger.kernel.org
Subject: Re: [libgpiod v2][PATCH v2 1/2] line-config: expose the override logic to users
Date: Wed, 23 Feb 2022 13:10:58 +0200	[thread overview]
Message-ID: <YhYWQtjQ9ete6O32@smile.fi.intel.com> (raw)
In-Reply-To: <20220222114044.GA37327@sol>

On Tue, Feb 22, 2022 at 07:40:44PM +0800, Kent Gibson wrote:
> On Mon, Feb 21, 2022 at 04:40:54PM +0100, Bartosz Golaszewski wrote:
> > We've already added getters for line-config but without exposing some
> > parts of the internal logic of the object, the user can't really get
> > the full picture and inspect the contents. This patch reworks the
> > accessors further by providing access to the underlying override
> > mechanism.
> > 
> > For every setting, we expose a getter and setter for the default value
> > as well as a set of four functions for setting, getting, clearing and
> > checking per-offset overrides.
> > 
> > An override can initially have the same value as the defaults but will
> > retain the overridden value should the defaults change.
> > 
> > We also complete the API by providing functions that allow to identify
> > offsets for which at least one setting is overriden.
> > 
> > This way the caller can fully inspect the line_config and high-level
> > language bindings can provide stringification methods.
> > 
> > While at it: we fix a couple bugs in the implementation of struct
> > line_config.
> > 
> 
> TLDR: I've got a lot of nitpicks on the doco, but it might be simpler
> for you to apply this patch as is and for me to submit a patch with doco
> tweaks than for you to try to sort out my comments!
> 
> The actual code looks good, so
> 
> Reviewed-by: Kent Gibson <warthog618@gmail.com>
> 
> with or without the suggested doco changes.

Thank you, Kent, for persistent review, I'm sorry, folks, I have no time to
look into this, but I believe that you together will give good enough result
and we can amend it later.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2022-02-23 11:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 15:40 [libgpiod v2][PATCH v2 0/2] libgpiod v2: rewrite tests for the C library Bartosz Golaszewski
2022-02-21 15:40 ` [libgpiod v2][PATCH v2 1/2] line-config: expose the override logic to users Bartosz Golaszewski
2022-02-22 11:40   ` Kent Gibson
2022-02-23 11:10     ` Andy Shevchenko [this message]
2022-03-02 12:59     ` Bartosz Golaszewski
2022-03-02 14:32       ` Kent Gibson
2022-03-02 15:54         ` Bartosz Golaszewski
2022-02-21 15:40 ` [libgpiod v2][PATCH v2 2/2] tests: rewrite core C tests using libgpiosim Bartosz Golaszewski
2022-02-23 10:18   ` Kent Gibson
2022-02-24 20:33     ` Bartosz Golaszewski
2022-02-24 23:52       ` 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=YhYWQtjQ9ete6O32@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.