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


Groups > linux.kernel > #1426351

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

From Lee Jones <lee.jones@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] mfd: intel_soc_pmic_bxtwc: Add Intel BXT WhiskeyCove PMIC ADC thermal channel-zone mapping
Date 2016-06-20 11:00 +0200
Message-ID <rM3dM-5ZG-19@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>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, 19 Jun 2016, Bin Gao wrote:

> On Fri, Jun 17, 2016 at 09:01:59AM +0100, Lee Jones wrote:
> > > +static struct trip_config_map str0_trip_config[] = {
> > > +	{
> > > +		.irq_reg = BXTWC_THRM0IRQ,
> > > +		.irq_mask = 0x01,
> > > +		.irq_en = BXTWC_MTHRM0IRQ,
> > > +		.irq_en_mask = 0x01,
> > > +		.evt_stat = BXTWC_STHRM0IRQ,
> > > +		.evt_mask = 0x01,
> > > +		.trip_num = 0
> > > +	},
> > > +	{
> > > +		.irq_reg = BXTWC_THRM0IRQ,
> > > +		.irq_mask = 0x10,
> > > +		.irq_en = BXTWC_MTHRM0IRQ,
> > > +		.irq_en_mask = 0x10,
> > > +		.evt_stat = BXTWC_STHRM0IRQ,
> > > +		.evt_mask = 0x10,
> > > +		.trip_num = 1
> > > +	}
> > > +};
> > > +
> > > +static struct trip_config_map str1_trip_config[] = {
> > > +	{
> > > +		.irq_reg = BXTWC_THRM0IRQ,
> > > +		.irq_mask = 0x02,
> > > +		.irq_en = BXTWC_MTHRM0IRQ,
> > > +		.irq_en_mask = 0x02,
> > > +		.evt_stat = BXTWC_STHRM0IRQ,
> > > +		.evt_mask = 0x02,
> > > +		.trip_num = 0
> > > +	},
> > > +	{
> > > +		.irq_reg = BXTWC_THRM0IRQ,
> > > +		.irq_mask = 0x20,
> > > +		.irq_en = BXTWC_MTHRM0IRQ,
> > > +		.irq_en_mask = 0x20,
> > > +		.evt_stat = BXTWC_STHRM0IRQ,
> > > +		.evt_mask = 0x20,
> > > +		.trip_num = 1
> > > +	},
> > > +};
> > > +
> > > +static struct trip_config_map str2_trip_config[] = {
> > > +	{
> > > +		.irq_reg = BXTWC_THRM0IRQ,
> > > +		.irq_mask = 0x04,
> > > +		.irq_en = BXTWC_MTHRM0IRQ,
> > > +		.irq_en_mask = 0x04,
> > > +		.evt_stat = BXTWC_STHRM0IRQ,
> > > +		.evt_mask = 0x04,
> > > +		.trip_num = 0
> > > +	},
> > > +	{
> > > +		.irq_reg = BXTWC_THRM0IRQ,
> > > +		.irq_mask = 0x40,
> > > +		.irq_en = BXTWC_MTHRM0IRQ,
> > > +		.irq_en_mask = 0x40,
> > > +		.evt_stat = BXTWC_STHRM0IRQ,
> > > +		.evt_mask = 0x40,
> > > +		.trip_num = 1
> > > +	},
> > > +};
> > > +
> > > +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.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Back to linux.kernel | Previous | NextPrevious 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