From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Felipe Balbi <balbi@kernel.org>,
Mathias Nyman <mathias.nyman@intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:"
<linux-usb@vger.kernel.org>
Subject: Re: [PATCH 1/6] software node: Provide replacement for device_add_properties()
Date: Wed, 3 Feb 2021 16:51:18 +0200 [thread overview]
Message-ID: <20210203145118.GH1687065@kuha.fi.intel.com> (raw)
In-Reply-To: <CAJZ5v0hwjxtADph8=R+F0bgzm1q1EMrrzZMhQQUoHG9O-wdTag@mail.gmail.com>
On Wed, Feb 03, 2021 at 03:39:02PM +0100, Rafael J. Wysocki wrote:
> On Wed, Feb 3, 2021 at 3:27 PM Heikki Krogerus
> <heikki.krogerus@linux.intel.com> wrote:
> >
> > On Wed, Feb 03, 2021 at 02:50:24PM +0100, Rafael J. Wysocki wrote:
> > > On Wed, Feb 3, 2021 at 10:45 AM Heikki Krogerus
> > > <heikki.krogerus@linux.intel.com> wrote:
> > > >
> > > > On Tue, Feb 02, 2021 at 05:08:40PM +0100, Rafael J. Wysocki wrote:
> > > > > It looks like there is a use case that cannot be addressed by using
> > > > > device_add_properties() and that's why you need this new function.
> > > > >
> > > > > Can you describe that use case, please, and explain what the problem
> > > > > with using device_add_properties() in it is?
> > > >
> > > > The problem with device_add_properties() is that it gives false
> > > > impression that the device properties are somehow directly attached to
> > > > the devices, which is not true. Now, that should not be a major issue,
> > > > but it seems that it is. I think Lee Jones basically used that as an
> > > > argument to refuse changes (and pretty minor changes) that would have
> > > > allowed us to use software nodes with the MFD drivers.
> > > >
> > > > Nevertheless, I was not planning to provide a replacement for it
> > > > originally. We do in any case have the real issue caused by that
> > > > device_remove_properties() call in device_del() which has to be fixed.
> > >
> > > What's that issue, specifically?
> >
> > The problem is that we can't now reuse or share if necessary, or just
> > in general be in charge of the lifetime of the software nodes because
> > that call is in device_del(). Now the lifetime of the software nodes
> > is always tied to the devices they are attached, no questions asked.
>
> I see and so instead you want the reference counting to trigger the
> cleanup when the count gets to 0.
>
> Sounds reasonable to me and please put this information into the patch
> changelog.
Yes. I'll do that.
thanks,
--
heikki
next prev parent reply other threads:[~2021-02-03 14:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 12:50 [PATCH 0/6] usb: Handle device properties with software node API Heikki Krogerus
2021-02-02 12:50 ` [PATCH 1/6] software node: Provide replacement for device_add_properties() Heikki Krogerus
2021-02-02 14:44 ` Rafael J. Wysocki
2021-02-02 15:01 ` Heikki Krogerus
2021-02-02 16:08 ` Rafael J. Wysocki
2021-02-03 9:45 ` Heikki Krogerus
2021-02-03 13:50 ` Rafael J. Wysocki
2021-02-03 14:26 ` Heikki Krogerus
2021-02-03 14:39 ` Rafael J. Wysocki
2021-02-03 14:51 ` Heikki Krogerus [this message]
2021-02-02 12:50 ` [PATCH 2/6] usb: dwc2: pci: Drop the empty quirk function Heikki Krogerus
2021-02-02 12:50 ` [PATCH 3/6] usb: dwc3: haps: Constify the software node Heikki Krogerus
2021-02-02 16:45 ` kernel test robot
2021-02-02 19:27 ` kernel test robot
2021-02-02 12:50 ` [PATCH 4/6] usb: dwc3: qcom: " Heikki Krogerus
2021-02-02 16:40 ` kernel test robot
2021-02-02 16:54 ` kernel test robot
2021-02-02 12:50 ` [PATCH 5/6] usb: dwc3: host: Use software node API with the properties Heikki Krogerus
2021-02-02 12:50 ` [PATCH 6/6] xhci: ext-caps: " Heikki Krogerus
2021-02-02 13:53 ` Hans de Goede
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=20210203145118.GH1687065@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=rafael@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