lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160620181152.GA39079@worksta>
Date:	Mon, 20 Jun 2016 11:11:52 -0700
From:	Bin Gao <bin.gao@...ux.intel.com>
To:	Lee Jones <lee.jones@...aro.org>
Cc:	Zhang Rui <rui.zhang@...el.com>,
	Eduardo Valentin <edubezval@...il.com>,
	linux-kernel@...r.kernel.org, ysiyer <yegnesh.s.iyer@...el.com>,
	Ajay Thomas <ajay.thomas.david.rajamanickam@...el.com>,
	Bin Gao <bin.gao@...el.com>, broonie@...nel.org
Subject: Re: [PATCH v2] mfd: intel_soc_pmic_bxtwc: Add Intel BXT WhiskeyCove
 PMIC ADC thermal channel-zone mapping

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ