Thread (16 messages) 16 messages, 11 authors, 2014-09-16

Re: a case for a common efuse API?

From: Maxime Ripard <hidden>
Date: 2014-07-10 15:10:08
Also in: linux-arm-kernel, linux-arm-msm, lkml

On Thu, Jul 10, 2014 at 06:41:55PM +0300, Grygorii Strashko wrote:
On 07/10/2014 05:26 PM, Maxime Ripard wrote:
quoted
On Wed, Jul 09, 2014 at 04:32:03PM -0700, Stephen Boyd wrote:
quoted
On 07/09/14 01:35, Maxime Ripard wrote:
quoted
Hi Stephen,

On Tue, Jul 08, 2014 at 01:00:23PM -0700, Stephen Boyd wrote:
quoted
Hi,

On MSM chips we have some efuses (called qfprom) where we store things
like calibration data, speed bins, etc. We need to read out data from
the efuses in various drivers like the cpufreq, thermal, etc. This
essentially boils down to a bunch of readls on the efuse from a handful
of different drivers. In devicetree this looks a little odd because
these drivers end up having an extra reg property (or two) that points
to a register in the efuse and some length, i.e you see this:

thermal-sensor@34000 {
	compatible = "sensor";
	reg = <0x34000 0x1000>, <0x10018 0xc>;
	reg-names = "sensor", "efuse_calib";
}


I imagine in DT we want something more like this:

efuse: efuse@10000 {
	compatible = "efuse";
	reg = <0x10000 0x1000>;
}

thermal-sensor@34000 {
	compatible = "sensor";
	reg = <0x34000 0x1000>;
	efuse = <&efuse 0x18>;
}
Why don't use "syscon" framework for your needs? (mfd/syscon.c)
Because syscon is restricted to MMIO, and not really meant to be used
for this.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help