From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Max Staudt <max@enpas.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
linux-i2c@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH v1] i2c: icy: Don't use software node when it's an overkill
Date: Tue, 14 Apr 2020 17:54:14 +0300 [thread overview]
Message-ID: <20200414145414.GJ2828150@kuha.fi.intel.com> (raw)
In-Reply-To: <e2c36d3a-0932-42f5-170a-49432f835fed@enpas.org>
On Fri, Apr 10, 2020 at 01:51:58AM +0200, Max Staudt wrote:
> On 4/9/20 2:16 PM, Heikki Krogerus wrote:
> > On Thu, Apr 09, 2020 at 01:37:35PM +0300, Andy Shevchenko wrote:
> >> Heikki, am I correct?
> >
> > In this case it should be possible supply a handle to a software node
> > with the board info. That should then later replace the fwnode and
> > properties members once the existing code is converted:
> >
> > [... snip sample patch ...]
> >
> > I2C core would then need to take care of registering that swnode of
> > course.
>
> Are you saying that the comment in property.c is correct, and
> i2c_new_client_device() shall *not* call device_add_properties() ?
>
> I mean, the code works and stuff, except that the swnode that
> device_add_properties() created won't be freed as far as I can see.
They actually are freed when device_del() is finally called, which is
pretty damn confusing. That is actually one of the reasons why we
should avoid the old device_add/del_properties() API.
> In other words, should the current properties code in i2c_new_client_device()
> be replaced by something that creates a swnode, just like the i2c-icy driver
> currently does manually when it instantiates the ltc2990 I2C client?
Yes. The subsystem needs to take care of that, not the drivers.
thanks,
--
heikki
prev parent reply other threads:[~2020-04-14 14:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-08 16:52 [PATCH v1] i2c: icy: Don't use software node when it's an overkill Andy Shevchenko
2020-04-08 21:24 ` Max Staudt
2020-04-09 10:37 ` Andy Shevchenko
2020-04-09 12:16 ` Heikki Krogerus
2020-04-09 23:51 ` Max Staudt
2020-04-14 14:54 ` Heikki Krogerus [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=20200414145414.GJ2828150@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=geert@linux-m68k.org \
--cc=linux-i2c@vger.kernel.org \
--cc=max@enpas.org \
--cc=wsa+renesas@sang-engineering.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