linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Kent Gibson <warthog618@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Shuah Khan <shuah@kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v9 0/4] gpio-sim: configfs-based GPIO simulator
Date: Thu, 18 Nov 2021 17:46:56 +0200	[thread overview]
Message-ID: <YZZ1cFWaexGlJL8C@smile.fi.intel.com> (raw)
In-Reply-To: <20211118145142.14519-1-brgl@bgdev.pl>

On Thu, Nov 18, 2021 at 03:51:38PM +0100, Bartosz Golaszewski wrote:
> This is another shot at the gpio-sim testing module. As there was no
> reasoning with configfs maintainers for many months, this time the whole
> concept of committable items has been dropped. Instead, each configfs
> chip item (or rather a group - more on that later) exposes a new
> attribute called 'live'. Writing 1 to it brings the chip on-line
> (registers the platform device) and writing 0 tears it down.
> 
> There are some caveats to that approach - for example: we can't block
> the user-space from deleting chip items when chips are live but is just
> handled by silently destroying the chip device in the background.
> 
> Andy (rightfully) pointed out that parsing of the lists of line names is
> awkward so in this iteration it's been replaced by a system that is more
> elegant and will allow to easily extend configuration options for
> specific GPIO lines. This is achieved by turning the chip's configfs
> item into a configfs group and allowing the user-space to create
> additional items inside it. The items must be called line<offset> (e.g.
> line0, line12 etc.) where the offset part indicates to the module the
> offset for which given item stores the configuration for. Within each
> such line item, there are additional attributes that allow specifying
> configuration for specific lines. Currently we only support the 'name'
> attribute but I plan to extend that to support GPIO hogging too.

One question here. Since you know how the driver looks like in both cases
(with and without committable items), would it be possible to modify what
you proposed here to the former one in case ConfigFS gains the feature?


-- 
With Best Regards,
Andy Shevchenko



  parent reply	other threads:[~2021-11-18 15:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18 14:51 [PATCH v9 0/4] gpio-sim: configfs-based GPIO simulator Bartosz Golaszewski
2021-11-18 14:51 ` [PATCH v9 1/4] gpio: sim: new testing module Bartosz Golaszewski
2021-11-21 23:55   ` Linus Walleij
2021-11-18 14:51 ` [PATCH v9 2/4] selftests: gpio: provide a helper for reading chip info Bartosz Golaszewski
2021-11-18 14:51 ` [PATCH v9 3/4] selftests: gpio: add a helper for reading GPIO line names Bartosz Golaszewski
2021-11-18 14:51 ` [PATCH v9 4/4] selftests: gpio: add test cases for gpio-sim Bartosz Golaszewski
2021-11-18 15:46 ` Andy Shevchenko [this message]
2021-11-18 16:37   ` [PATCH v9 0/4] gpio-sim: configfs-based GPIO simulator Bartosz Golaszewski
2021-11-18 16:59     ` Andy Shevchenko
2021-11-19 10:34       ` Bartosz Golaszewski
2021-11-19 10:57         ` Kent Gibson
2021-11-22  0:02 ` Linus Walleij
2021-11-22  9:56   ` Bartosz Golaszewski

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=YZZ1cFWaexGlJL8C@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=brgl@bgdev.pl \
    --cc=geert@linux-m68k.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@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 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).