public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Hans de Goede <hdegoede@redhat.com>
Cc: Len Brown <lenb@kernel.org>,
	linux-acpi@vger.kernel.org, Bin Gao <bin.gao@intel.com>,
	Felipe Balbi <felipe.balbi@linux.intel.com>,
	Darren Hart <darren.hart@intel.com>
Subject: Re: [PATCH] ACPI / PMIC: Add opregion driver for Intel CHT WhiskeyCove PMIC
Date: Mon, 27 Feb 2017 15:41:42 +0200	[thread overview]
Message-ID: <1488202902.20145.35.camel@linux.intel.com> (raw)
In-Reply-To: <1770161.xO7XBEenWm@aspire.rjw.lan>

On Mon, 2017-02-27 at 14:25 +0100, Rafael J. Wysocki wrote:
> +Andy Shevchenko & Darren Hart
> 
> On Monday, February 27, 2017 11:20:23 AM Hans de Goede wrote:
> > Add opregion driver for Intel CHT WhiskeyCove PMIC, based on various
> > non upstreamed CHT WhiskeyCove PMIC patches. This does not include
> > support for the Thermal opregion (DPTF) due to lacking
> > documentation.
> > 
> > Cc: Bin Gao <bin.gao@intel.com>
> > Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
> > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> 
> Andy, any comments?

I don't see definitions like CHT_WC_ here. Where are they defined?

Thus, question, how differs this to Broxton version of Whiskey Cove PMIC
opregion?

Some minor comments below.

>  
> > +config CHT_WC_PMIC_OPREGION
> > +	bool "ACPI operation region support for CHT WhiskeyCove
> > PMIC"
> > +	depends on INTEL_SOC_PMIC
> > +	help
> > +	  This config adds ACPI operation region support for CHT
> > WhiskeyCove PMIC.

Whiskey Cove

> > @@ -0,0 +1,236 @@
> > 

> > +/*
> > + * Regulator support is based on the non upstream patch:
> > + * "regulator: whiskey_cove: implements WhiskeyCove pmic VRF
> > support"
> > + */

Perhaps link to the patch?

> > +static struct pmic_table power_table[] = {
> > +	{
> > +		.address = 0x0,
> > +		.reg = CHT_WC_V1P8A_CTRL,
> > +		.bit = 0x01,
> > +	}, /* V18A */
> > 

> > +};

> > +static int intel_cht_wc_pmic_update_power(struct regmap *regmap,
> > int reg,
> > +		int bit, bool on)
> > +{
> > +	u8 val, mask = bit;
> > 

> > +
> > +	if (on)
> > +		val = 0x01;
> > +	else
> > +		val = 0x00;
> > +
> > +	return regmap_update_bits(regmap, reg, mask, val);

Perhaps just:

return regmap_update_bits(regmap, reg, mask, on ? 1 : 0);


> > +
> > +static struct platform_device_id cht_wc_opregion_id_table[] = {
> > +	{ .name = "cht_wcove_region" },
> > +	{},
> > +};
> > +
> > +static struct platform_driver intel_cht_wc_pmic_opregion_driver = {
> > +	.probe = intel_cht_wc_pmic_opregion_probe,
> > +	.driver = {
> > +		.name = "cht_whiskey_cove_pmic",
> > +	},
> > +	.id_table = cht_wc_opregion_id_table,
> > +};
> > +
> > +static int __init intel_cht_wc_pmic_opregion_driver_init(void)
> > +{
> > +	return
> > platform_driver_register(&intel_cht_wc_pmic_opregion_driver);
> > +}
> > +device_initcall(intel_cht_wc_pmic_opregion_driver_init);

Don't we have builtin_platform_driver() ?
Or it's not an equivalent?

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

  reply	other threads:[~2017-02-27 13:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 10:20 [PATCH] ACPI / PMIC: Add opregion driver for Intel CHT WhiskeyCove PMIC Hans de Goede
2017-02-27 13:25 ` Rafael J. Wysocki
2017-02-27 13:41   ` Andy Shevchenko [this message]
2017-02-27 14:20     ` 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=1488202902.20145.35.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=bin.gao@intel.com \
    --cc=darren.hart@intel.com \
    --cc=felipe.balbi@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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