Re: a case for a common efuse API?
From: Maxime Ripard
Date: Thu Jul 10 2014 - 11:10:17 EST
On Thu, Jul 10, 2014 at 06:41:55PM +0300, Grygorii Strashko wrote:
> On 07/10/2014 05:26 PM, Maxime Ripard wrote:
> >On Wed, Jul 09, 2014 at 04:32:03PM -0700, Stephen Boyd wrote:
> >>On 07/09/14 01:35, Maxime Ripard wrote:
> >>>Hi Stephen,
> >>>
> >>>On Tue, Jul 08, 2014 at 01:00:23PM -0700, Stephen Boyd wrote:
> >>>>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
Attachment:
signature.asc
Description: Digital signature