28 Aug, 2017

2 commits

  • missing err.h header file can cause simillar errors like below
    in some configurations.
    "error: implicit declaration of function 'ERR_PTR'
    [-Werror=implicit-function-declaration]"

    This adds the missing include to ensure we can always include
    the header.

    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Srinivas Kandagatla
     
  • This function does a quick and easy read of an u32 value without any
    kind of resource management code on the consumer side.

    Signed-off-by: Leonard Crestez
    Reviewed-by: Shawn Guo
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Leonard Crestez
     

25 Jun, 2016

1 commit

  • nvmem_cell_read() is declared as void * if CONFIG_NVMEM is enabled, and
    as char * otherwise. This can result in a build warning if CONFIG_NVMEM
    is not enabled and a caller asigns the result to a type other than char *
    without using a typecast. Use a consistent declaration to avoid the
    problem.

    Fixes: e2a5402ec7c6 ("nvmem: Add nvmem_device based consumer apis.")
    Cc: Srinivas Kandagatla
    Signed-off-by: Guenter Roeck
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Guenter Roeck
     

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