From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Mario.Limonciello@dell.com" <Mario.Limonciello@dell.com>,
"andriy.shevchenko@linux.intel.com"
<andriy.shevchenko@linux.intel.com>,
"dvhart@infradead.org" <dvhart@infradead.org>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>,
"acelan.kao@canonical.com" <acelan.kao@canonical.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"pali.rohar@gmail.com" <pali.rohar@gmail.com>
Subject: Re: [RFC, PATCH v1] platform/x86: intel-vbtn: Convert to pure ACPI driver
Date: Wed, 07 Feb 2018 10:31:01 +0100 [thread overview]
Message-ID: <2235169.mLvk2uMpgf@aspire.rjw.lan> (raw)
In-Reply-To: <CAHp75VeFSuQYu67DdnJDjZDoaLZiPuo7ag7Lz0q6eSCDjayobw@mail.gmail.com>
On Tuesday, February 6, 2018 11:37:54 PM CET Andy Shevchenko wrote:
> Yeah, that's fixed in the branch.
>
> P.S. Apologies for top-posting, wrote from phone in order to not waste time
>
> On Tuesday, February 6, 2018, <Mario.Limonciello@dell.com> wrote:
>
> > > -----Original Message-----
> > > From: platform-driver-x86-owner@vger.kernel.org [mailto:
> > platform-driver-x86-
> > > owner@vger.kernel.org] On Behalf Of Andy Shevchenko
> > > Sent: Monday, February 5, 2018 10:18 AM
> > > To: Darren Hart <dvhart@infradead.org>
> > > Cc: platform-driver-x86@vger.kernel.org; AceLan Kao
> > > <acelan.kao@canonical.com>; linux-kernel@vger.kernel.org;
> > > pali.rohar@gmail.com; Limonciello, Mario <Mario_Limonciello@Dell.com>;
> > Rafael
> > > Wysocki <rjw@rjwysocki.net>
> > > Subject: Re: [RFC, PATCH v1] platform/x86: intel-vbtn: Convert to pure
> > ACPI driver
> > >
> > > On Wed, 2018-01-31 at 13:37 -0800, Darren Hart wrote:
> > > > On Wed, Jan 31, 2018 at 08:26:14PM +0200, Andy Shevchenko wrote:
> > > > > Remove code duplication by converting driver to pure ACPI one.
> > > >
> > >
> > > I have fixed couple issues, but...
> > >
> > > > +Rafael
> > > >
> > > > I don't see any reason *not* to do this, it seems the acpi driver
> > > > model provides
> > > > some of the boilerplate stuff we were doing manually before as a
> > > > platform
> > > > device. I'm scratching my head wondering why we did this as a
> > > > platform-driver in
> > > > the first place now...
It looks like I have overlooked this.
Generally speaking, binding drivers to ACPI device objects is a bad idea,
because it is sort of what binding drivers to struct device_node in OF would
be. It was an unfortunate design choice for struct acpi_device to be based
on struct device in the first place, but undoing it is not worth the effort
and pain.
In some instances (PCI, PNP, I2C, SPI etc) there is a device object to bind a
driver to already and the corresponding struct acpi_device is the "companion"
of it. In those cases binding a driver to the struct acpi_device itself
clearly doesn't make sense.
In the cases like the $subject one it is less clear, but for symmetry and
general confusion avoidance it is better to have a struct device representing
the "physical" thing *in* *addition* to the struct acpi_device and use the
latter as the "companion" of it. That's why we have the platform device in
this particular case.
Please drop this patch, it doesn't go in the right direction IMO.
Thanks,
Rafael
next prev parent reply other threads:[~2018-02-07 9:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-31 18:26 Andy Shevchenko
2018-01-31 21:37 ` Darren Hart
2018-02-05 16:18 ` Andy Shevchenko
2018-02-06 20:33 ` Mario.Limonciello
[not found] ` <CAHp75VeFSuQYu67DdnJDjZDoaLZiPuo7ag7Lz0q6eSCDjayobw@mail.gmail.com>
2018-02-07 1:57 ` Mario.Limonciello
2018-02-07 9:31 ` Rafael J. Wysocki [this message]
2018-02-07 9:47 ` Rafael J. Wysocki
2018-02-07 9:55 ` Pali Rohár
2018-02-07 13:08 ` Mario.Limonciello
2018-02-07 13:18 ` Andy Shevchenko
2018-02-07 22:50 ` Rafael J. Wysocki
2018-02-07 22:33 ` Rafael J. Wysocki
2018-02-07 9:44 ` Rafael J. Wysocki
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=2235169.mLvk2uMpgf@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=Mario.Limonciello@dell.com \
--cc=acelan.kao@canonical.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pali.rohar@gmail.com \
--cc=platform-driver-x86@vger.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
all inboxes | Powered by JetHome®