From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Aaron Lu <aaron.lu@intel.com>
Cc: "Linus Walleij" <linus.walleij@linaro.org>,
"Lee Jones" <lee.jones@linaro.org>,
"Alexandre Courbot" <gnurou@gmail.com>,
"Samuel Ortiz" <sameo@linux.intel.com>,
"Arnd Bergmann" <arnd@arndb.de>,
linux-gpio@vger.kernel.org, linux-arch@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Jacob Pan" <jacob.jun.pan@linux.intel.com>,
"Lejun Zhu" <lejun.zhu@intel.com>,
"Radivoje Jovanovic" <radivoje.jovanovic@intel.com>,
"Daniel Glöckner" <dg@emlix.com>,
linux-acpi@vger.kernel.org, "Mark Brown" <broonie@kernel.org>
Subject: Re: [PATCH 2/2] PMIC / opregion: support PMIC customized operation region for CrystalCove
Date: Mon, 13 Oct 2014 16:51:57 +0200 [thread overview]
Message-ID: <1472711.eXHKSpNgJz@vostro.rjw.lan> (raw)
In-Reply-To: <20141013090213.GB2829@aaronlu.sh.intel.com>
On Monday, October 13, 2014 05:02:13 PM Aaron Lu wrote:
> On Thu, Oct 09, 2014 at 05:21:28PM +0800, Aaron Lu wrote:
> > On 10/08/2014 04:05 PM, Lee Jones wrote:
> > > To all those CC'ed,
> > >
> > >> The Baytrail-T platform firmware has defined two customized operation
> > >> regions for PMIC chip Crystal Cove - one is for power resource handling
> > >> and one is for thermal: sensor temperature reporting, trip point setting,
> > >> etc. This patch adds support for them on top of the existing Crystal Cove
> > >> PMIC driver.
> > >>
> > >> The reason to split code into a separate file intel_soc_pmic_opregion.c
> > >> is that there are more PMIC driver with ACPI operation region support
> > >> coming and we can re-use those code. The intel_soc_pmic_opregion_data
> > >> structure is created also for this purpose: when we need to support a
> > >> new PMIC's operation region, we just need to fill those callbacks and
> > >> the two register mapping tables.
> > >>
> > >> Signed-off-by: Aaron Lu <aaron.lu@intel.com>
> > >> ---
> > >> drivers/mfd/Kconfig | 11 +
> > >> drivers/mfd/Makefile | 1 +
> > >> drivers/mfd/intel_soc_pmic_crc.c | 3 +
> > >> drivers/mfd/intel_soc_pmic_crc_opregion.c | 229 +++++++++++++++++++
> > >> drivers/mfd/intel_soc_pmic_opregion.c | 350 ++++++++++++++++++++++++++++++
> > >> drivers/mfd/intel_soc_pmic_opregion.h | 35 +++
> > >
> > > With the influx of new same-chip devices, I think the MFD subsystem is
> > > fast becoming overloaded. I think all of the PMIC handling should in
> > > fact either live in Regulators or have its own subsystem.
> > >
> > > Let's open this up to the floor by Cc'ing some probable interested
> > > parties.
> >
> > The ACPI operation region handler provides implementation for the ASL
> > code written by firmware developer, and since the ACPI PMIC device node
> > has two customized operation regions: power rail handling and thermal
> > sensor manipulating, implementing the handler will inevitably touch
> > power rail registers and thermal registers of the PMIC chip. In this
> > regard, it doesn't fit what the MFD subsystem is meant to contain(
> > according to your comments, I didn't know this before, sorry about that).
> >
> > It seems that we have two options:
> > 1 Create two cell devices from the PMIC I2C driver, one for power and
> > one for thermal; the driver for the power part goes to drivers/power
> > or drivers/regulator and the driver for thermal one goes to
> > drivers/thermal;
> > The problem of this approach is that, the operation region handler
> > driver doesn't really need to expose those power or thermal sysfs
> > interfaces for user space to consume, perhaps it shouldn't, as its
> > sole purpose is to satisfy the ASL code access, not more.
> > 2 Move these operation region handler drivers to drivers/acpi
> > We now have EC operation region handler driver there, but we also have
> > I2C, GPIO, i915 operation region handlers in their own subsystems. Not
> > sure if PMIC operation region handler qualifies there.
>
> Rafael,
>
> May I have your opinion on option 2? Do you think it is OK to place the
> operation region code under drivers/acpi? Thanks.
In my opinion, yes it is. After all, operation regions are a mechanism by
which the AML interpreter can access hardware.
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
next prev parent reply other threads:[~2014-10-13 14:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-09 2:32 [PATCH 0/2] Support CrystalCove PMIC ACPI operation region Aaron Lu
2014-09-09 2:32 ` [PATCH 1/2] gpio / CrystalCove: support virtual GPIO Aaron Lu
2014-09-23 10:13 ` Linus Walleij
2014-09-24 11:18 ` Linus Walleij
2014-09-25 2:57 ` [PATCH v2 " Aaron Lu
2014-09-25 11:15 ` Mika Westerberg
2014-09-26 5:21 ` Aaron Lu
2014-09-25 13:16 ` Linus Walleij
2014-09-26 5:22 ` Aaron Lu
2014-09-09 2:32 ` [PATCH 2/2] PMIC / opregion: support PMIC customized operation region for CrystalCove Aaron Lu
2014-10-08 8:05 ` Lee Jones
2014-10-08 9:16 ` Linus Walleij
2014-10-08 11:58 ` Jacob Pan
2014-10-08 12:54 ` Mark Brown
2014-10-09 9:21 ` Aaron Lu
2014-10-13 9:02 ` Aaron Lu
2014-10-13 14:51 ` Rafael J. Wysocki [this message]
2014-09-09 2:37 ` [PATCH 0/2] Support CrystalCove PMIC ACPI operation region Aaron Lu
2014-09-15 2:57 ` Aaron Lu
2014-09-15 22:43 ` Lee Jones
-- strict thread matches above, loose matches on Subject: below --
2014-09-09 2:26 Aaron Lu
2014-09-09 2:26 ` [PATCH 2/2] PMIC / opregion: support PMIC customized operation region for CrystalCove Aaron Lu
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=1472711.eXHKSpNgJz@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=aaron.lu@intel.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=dg@emlix.com \
--cc=gnurou@gmail.com \
--cc=jacob.jun.pan@linux.intel.com \
--cc=lee.jones@linaro.org \
--cc=lejun.zhu@intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=radivoje.jovanovic@intel.com \
--cc=sameo@linux.intel.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
all inboxes | Powered by JetHome®