Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1426891

Re: [PATCH v2] mfd: intel_soc_pmic_bxtwc: Add Intel BXT WhiskeyCove PMIC ADC thermal channel-zone mapping

Path csiph.com!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Bin Gao <bin.gao@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] mfd: intel_soc_pmic_bxtwc: Add Intel BXT WhiskeyCove PMIC ADC thermal channel-zone mapping
Date Mon, 20 Jun 2016 20:10:02 +0200
Message-ID <rMbO2-3aM-11@gated-at.bofh.it> (permalink)
References <rKNup-5dJ-5@gated-at.bofh.it> <rKX0K-3ZY-3@gated-at.bofh.it> <rLYH8-3lv-5@gated-at.bofh.it> <rM3dM-5ZG-19@gated-at.bofh.it> <rM3dM-5ZG-23@gated-at.bofh.it>
X-Original-To Lee Jones <lee.jones@linaro.org>
X-Extloop1 1
X-Ironport-Av E=Sophos;i="5.26,499,1459839600"; d="scan'208";a="722395124"
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.21 (2010-09-15)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 33
Organization linux.* mail to news gateway
X-Original-Cc Zhang Rui <rui.zhang@intel.com>, Eduardo Valentin <edubezval@gmail.com>, linux-kernel@vger.kernel.org, ysiyer <yegnesh.s.iyer@intel.com>, Ajay Thomas <ajay.thomas.david.rajamanickam@intel.com>, Bin Gao <bin.gao@intel.com>, broonie@kernel.org
X-Original-Date Mon, 20 Jun 2016 11:11:52 -0700
X-Original-Message-ID <20160620181152.GA39079@worksta>
X-Original-References <20160616215843.GA65542@worksta> <20160617080159.GF21702@dell> <20160620041140.GA237834@worksta> <20160620084949.GA1465@dell> <20160620085200.GB1465@dell>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1426891

Show key headers only | View raw


On Mon, Jun 20, 2016 at 09:52:00AM +0100, Lee Jones wrote:
> > > > > +static struct trip_config_map str3_trip_config[] = {
> > > > > +	{
> > > > > +		.irq_reg = BXTWC_THRM2IRQ,
> > > > > +		.irq_mask = 0x10,
> > > > > +		.irq_en = BXTWC_MTHRM2IRQ,
> > > > > +		.irq_en_mask = 0x10,
> > > > > +		.evt_stat = BXTWC_STHRM2IRQ,
> > > > > +		.evt_mask = 0x10,
> > > > > +		.trip_num = 0
> > > > > +	},
> > > > > +};
> > > > 
> > > > This looks like a register map to me.
> > > > 
> > > > Can you use the regmap framework instead?
> > > 
> > > These are platform data used by another driver(thermal driver) which
> > > uses regmap framework to access some of the fields of the structure(
> > > irq_reg, irq_en and evt_stat).
> > 
> > I suggest you create the regmap here and pass it to the thermal driver
> > instead.
> 
> Better yet, why don't you just create the regmap in the thermal
> driver?  There is no need (in fact, it's not even allowed) to pass
> register addresses though platform data.

We did implement regmap in the acpi opregion driver(see drivers/acpi/pmic
for details) for the PMIC device. Each individual driver, e.g. gpio,
thermal, etc. will only access registers that belong to its logic unit.
Since the shared regmap implementation is already there, a single individual
driver doesn't need to implement again.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] mfd: intel_soc_pmic_bxtwc: Add Intel BXT WhiskeyCove PMIC  ADC thermal channel-zone mapping Bin Gao <bin.gao@linux.intel.com> - 2016-06-17 00:00 +0200
  Re: [PATCH v2] mfd: intel_soc_pmic_bxtwc: Add Intel BXT WhiskeyCove  PMIC ADC thermal channel-zone mapping Lee Jones <lee.jones@linaro.org> - 2016-06-17 10:10 +0200
    Re: [PATCH v2] mfd: intel_soc_pmic_bxtwc: Add Intel BXT WhiskeyCove  PMIC ADC thermal channel-zone mapping Bin Gao <bin.gao@linux.intel.com> - 2016-06-20 06:10 +0200
      Re: [PATCH v2] mfd: intel_soc_pmic_bxtwc: Add Intel BXT WhiskeyCove  PMIC ADC thermal channel-zone mapping Lee Jones <lee.jones@linaro.org> - 2016-06-20 11:00 +0200
        Re: [PATCH v2] mfd: intel_soc_pmic_bxtwc: Add Intel BXT WhiskeyCove  PMIC ADC thermal channel-zone mapping Bin Gao <bin.gao@linux.intel.com> - 2016-06-20 20:10 +0200
      Re: [PATCH v2] mfd: intel_soc_pmic_bxtwc: Add Intel BXT WhiskeyCove  PMIC ADC thermal channel-zone mapping Lee Jones <lee.jones@linaro.org> - 2016-06-20 11:00 +0200

csiph-web