public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: Dave Ertman <david.m.ertman@intel.com>,
	Ira Weiny <ira.weiny@intel.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Stephen Boyd <sboyd@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] driver core: auxiliary bus: add device creation helper
Date: Tue, 10 Dec 2024 15:42:41 +0100	[thread overview]
Message-ID: <2024121051-untoasted-update-2d04@gregkh> (raw)
In-Reply-To: <1jseqvwqs6.fsf@starbuckisacylon.baylibre.com>

On Tue, Dec 10, 2024 at 03:34:17PM +0100, Jerome Brunet wrote:
> On Tue 10 Dec 2024 at 15:05, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> 
> > On Tue, Dec 10, 2024 at 02:43:12PM +0100, Jerome Brunet wrote:
> >> Add an function helper to create a device on the auxiliary bus.
> >> This should avoid having the same code repeated in the different drivers
> >> registering auxiliary devices.
> >> 
> >> Suggested-by: Stephen Boyd <sboyd@kernel.org>
> >> Cc: Arnd Bergmann <arnd@arndb.de>
> >> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> >> ---
> >> The suggestion for this change was initially discussed here: [1]
> >> 
> >> I was not sure if the managed variant should return the auxiliary device or
> >> just the error. This initial version returns the auxiliary device, allowing
> >> it to be further (ab)used. Please let me know if you prefer to just return
> >> the error code instead.
> >> 
> >> Also the non managed variant of the helper is not exported but it could
> >> easily be, if necessary.
> >> 
> >> [1]: https://lore.kernel.org/linux-clk/df0a53ee859e450d84e81547099f5f36.sboyd@kernel.org
> >> ---
> >>  drivers/base/auxiliary.c      | 89 +++++++++++++++++++++++++++++++++++++++++++
> >>  include/linux/auxiliary_bus.h |  4 ++
> >>  2 files changed, 93 insertions(+)
> >
> > We can't add new functions like this without a real user of it.  Please
> > submit that at the same time.
> 
> Sure. There is some prep work ongoing in the user. It will get used once
> that's done. I'll resubmit once this is ready, assuming the rest is fine.
> 
> >
> > And are you ok with sharing the id range with multiple aux bus
> > implementations?
> >
> 
> In the initial discussion, a global id was thought to sufficient [2]
> It also helps to make things simpler on the user side, which is good I think.
> 
> Do you think we've overlooked something ?
> 
> [2]: https://lore.kernel.org/linux-clk/c9556de589e289cb1d278d41014791a6.sboyd@kernel.org

No, it is ok, you just don't document it as such, so it might look a bit
odd for many users.

thanks,

greg k-h

      reply	other threads:[~2024-12-10 14:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-10 13:43 [PATCH] driver core: auxiliary bus: add device creation helper Jerome Brunet
2024-12-10 14:05 ` Greg Kroah-Hartman
2024-12-10 14:34   ` Jerome Brunet
2024-12-10 14:42     ` Greg Kroah-Hartman [this message]

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=2024121051-untoasted-update-2d04@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=david.m.ertman@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=jbrunet@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=sboyd@kernel.org \
    /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