06 Aug, 2015

3 commits

  • This patch adds read/write apis which are based on nvmem_device. It is
    common that the drivers like omap cape manager or qcom cpr driver to
    access bytes directly at particular offset in the eeprom and not from
    nvmem cell info in DT. These driver would need to get access to the nvmem
    directly, which is what these new APIS provide.

    These wrapper apis would help such users to avoid code duplication in
    there drivers and also avoid them reading a big eeprom blob and parsing
    it internally in there driver.

    Signed-off-by: Srinivas Kandagatla
    Tested-by: Stefan Wahren
    Tested-by: Philipp Zabel
    Tested-by: Rajendra Nayak
    Signed-off-by: Greg Kroah-Hartman

    Srinivas Kandagatla
     
  • This patch adds just consumers part of the framework just to enable easy
    review.

    Up until now, nvmem drivers were stored in drivers/misc, where they all
    had to duplicate pretty much the same code to register a sysfs file,
    allow in-kernel users to access the content of the devices they were
    driving, etc.

    This was also a problem as far as other in-kernel users were involved,
    since the solutions used were pretty much different from on driver to
    another, there was a rather big abstraction leak.

    This introduction of this framework aims at solving this. It also
    introduces DT representation for consumer devices to go get the data they
    require (MAC Addresses, SoC/Revision ID, part numbers, and so on) from
    the nvmems.

    Having regmap interface to this framework would give much better
    abstraction for nvmems on different buses.

    Signed-off-by: Maxime Ripard
    [Maxime Ripard: intial version of the framework]
    Signed-off-by: Srinivas Kandagatla
    Tested-by: Stefan Wahren
    Tested-by: Philipp Zabel
    Tested-by: Rajendra Nayak
    Signed-off-by: Greg Kroah-Hartman

    Srinivas Kandagatla
     
  • This patch adds just providers part of the framework just to enable easy
    review.

    Up until now, NVMEM drivers like eeprom were stored in drivers/misc,
    where they all had to duplicate pretty much the same code to register
    a sysfs file, allow in-kernel users to access the content of the devices
    they were driving, etc.

    This was also a problem as far as other in-kernel users were involved,
    since the solutions used were pretty much different from on driver to
    another, there was a rather big abstraction leak.

    This introduction of this framework aims at solving this. It also
    introduces DT representation for consumer devices to go get the data
    they require (MAC Addresses, SoC/Revision ID, part numbers, and so on)
    from the nvmems.

    Having regmap interface to this framework would give much better
    abstraction for nvmems on different buses.

    Signed-off-by: Maxime Ripard
    [Maxime Ripard: intial version of eeprom framework]
    Signed-off-by: Srinivas Kandagatla
    Tested-by: Stefan Wahren
    Tested-by: Philipp Zabel
    Tested-by: Rajendra Nayak
    Signed-off-by: Greg Kroah-Hartman

    Srinivas Kandagatla