29 Jul, 2019

1 commit


19 Apr, 2019

1 commit

  • i.MX7ULP is a new SoC of i.MX family which has 8 kbit eFuse OTP,
    enable ocotp driver support for this SoC.

    Signed-off-by: Anson Huang
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman
    (cherry picked from commit c8b63ddc91190d4022d456bf6abbc2085b4f56b5)

    Anson Huang
     

18 Apr, 2019

7 commits

  • The i.MX OCOTP controller is used in numerous Freescale/NXP
    SoCs from the MXC family, so the strict dependency on the
    i.MX6 SoC is too narrow. Broaden it to cover all the MXC
    familiy members.

    Signed-off-by: Lucas Stach
    Reviewed-by: Abel Vesa
    Signed-off-by: Srinivas Kandagatla
    (cherry picked from commit af6e0fd10a116fa8756171a2fe53e00b1d55ae96)

    Lucas Stach
     
  • The imx-ocotp nvmem driver supports the i.MX 7D SoC too. Allow to select
    the imx-ocotp driver even if only the i.MX 7D SoC has been selected.

    Fixes: 711d45477931 ("nvmem: octop: Add i.MX7D support")
    Signed-off-by: Stefan Agner
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman
    (cherry picked from commit 9f23379c67fa20b367ea53cfd989da5212316e6f)

    Stefan Agner
     
  • Add i.MX8MQ support and Fix read.

    When offset is not 4 bytes aligned, directly shift righty by 2 bits
    will cause reading out wrong data. Since imx ocotp only supports
    4 bytes reading once, we need handle offset is not 4 bytes aligned
    and enlarge the bytes to 4 bytes aligned. After finished reading,
    copy the needed data from buffer to caller and free buffer.

    Signed-off-by: Peng Fan
    (cherry picked from commit 23bcfaac856f3f0de9f3113c9c447a6133157019)

    Peng Fan
     
  • Enable ocotp driver support for imx6ull SoC.

    Signed-off-by: Vipul Kumar
    (cherry picked from commit 762d03271d6eed397ab76a3bb6f14bdb26cb7957)

    Vipul Kumar
     
  • Upstream rejected ARCH_MXC_ARM64 in favor of defining ARCH_MXC for
    arm64 so the current condition is never enabled.

    Make it depend on HAVE_IMX_SC instead because it depends on SCFW API.

    Signed-off-by: Leonard Crestez

    Leonard Crestez
     
  • Fix: hexdump: /sys/bus/nvmem/devices/imx-ocotp0/nvmem: Input/output error

    Address space [272,543] is invalid address space on 8QXP, reading from SCU
    will get SC_ERR_PARAM. So ignore these words when reading fuse.

    BuildInfo:
    - SCFW 8dcff26, IMX-MKIMAGE ea027c4b, ATF
    - U-Boot 2017.03-imx_v2017.03_4.9.51_imx8_beta1+g6dc7b0f

    Signed-off-by: Peng Fan
    Signed-off-by: Arulpandiyan Vadivel

    Peng Fan
     
  • Add imx-scu-ocotp driver to support i.MX8QM/QXP.

    The usage, add an entry in ocotp node, such as the test_1 entry:
    ocotp: ocotp {
    #address-cells = ;
    #size-cells = ;
    compatible = "fsl,imx8qm-ocotp", "syscon";

    test_1: test_1@40 {
    reg = ;
    bits = ;
    };
    };

    Then in your device node, add this:
    node: node {
    .....
    nvmem-cells = ;
    nvmem-cell-names = "test_1";
    };

    Then in your driver, using the following piece code:

    +#include

    struct nvmem_cell *cell;
    u8 *val;
    size_t len;
    int i;
    cell = devm_nvmem_cell_get(&pdev->dev, "test_1");
    if (IS_ERR(cell)) {
    if (PTR_ERR(cell) == -EPROBE_DEFER)
    return -EPROBE_DEFER;
    }
    val = nvmem_cell_read(cell, &len);

    The val points the contents that you need.

    After shutdown or driver remove, use this:
    devm_nvmem_cell_put(&pdev->dev, cell);

    Note: we not reuse the imx-ocotp driver, because mix scu api with
    legacy code will cost many maintenance efforts. When we have common
    api support, we could merge the two.

    Signed-off-by: Peng Fan
    Signed-off-by: Arulpandiyan Vadivel

    Peng Fan
     

14 Nov, 2018

1 commit

  • [ Upstream commit fa72d847d68d7833b77a4bef944cf2c5baf56f49 ]

    This function can fail so check its return value in nvmem_register()
    and act accordingly.

    Signed-off-by: Bartosz Golaszewski
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Bartosz Golaszewski
     

16 Jul, 2018

1 commit


15 Jul, 2018

2 commits


07 Jul, 2018

4 commits

  • At over 4000 #includes, is the 9th most
    #included header file in the Linux kernel. It does not need
    , so drop that header and explicitly add
    to source files that need it.

    4146 #include

    After this patch, there are 225 files that use ,
    for a reduction of around 3900 times that
    does not have to be read & parsed.

    225 #include

    This patch was build-tested on 20 different arch-es.

    It also makes these drivers SubmitChecklist#1 compliant.

    Signed-off-by: Randy Dunlap
    Reported-by: kbuild test robot # drivers/media/platform/vimc/
    Reported-by: kbuild test robot # drivers/pinctrl/pinctrl-u300.c
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     
  • nvmem ncells can be over written by calling nvmem_add_cells()
    multiple times. I see there is no real point of maintaining count
    of cells when we have a list of cell.

    Remove this to avoid any confusion!

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

    Srinivas Kandagatla
     
  • In the quest to remove all stack VLA usage from the kernel[1], this
    uses the maximum allocation size for the stack and adds a sanity check,
    similar to what has already be done for the regular rave-sp driver.

    [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com

    Signed-off-by: Kees Cook
    Reviewed-by: Andrey Smirnov
    Tested-by: Andrey Smirnov
    Signed-off-by: Greg Kroah-Hartman

    Kees Cook
     
  • In commit ca04d9d3e1b1 ("phy: qcom-qusb2: New driver for QUSB2 PHY on
    Qcom chips") you can see a call like:

    devm_nvmem_cell_get(dev, NULL);

    Note that the cell ID passed to the function is NULL. This is because
    the qcom-qusb2 driver is expected to work only on systems where the
    PHY node is hooked up via device-tree and is nameless.

    This works OK for the most part. The first thing nvmem_cell_get()
    does is to call of_nvmem_cell_get() and there it's documented that a
    NULL name is fine. The problem happens when the call to
    of_nvmem_cell_get() returns -EINVAL. In such a case we'll fall back
    to nvmem_cell_get_from_list() and eventually might (if nvmem_cells
    isn't an empty list) crash with something that looks like:

    strcmp
    nvmem_find_cell
    __nvmem_device_get
    nvmem_cell_get_from_list
    nvmem_cell_get
    devm_nvmem_cell_get
    qusb2_phy_probe

    There are several different ways we could fix this problem:

    One could argue that perhaps the qcom-qusb2 driver should be changed
    to use of_nvmem_cell_get() which is allowed to have a NULL name. In
    that case, we'd need to add a patche to introduce
    devm_of_nvmem_cell_get() since the qcom-qusb2 driver is using devm
    managed resources.

    One could also argue that perhaps we could just add a name to
    qcom-qusb2. That would be OK but I believe it effectively changes the
    device tree bindings, so maybe it's a no-go.

    In this patch I have chosen to fix the problem by simply not crashing
    when a NULL cell_id is passed to nvmem_cell_get().

    NOTE: that for the qcom-qusb2 driver the "nvmem-cells" property is
    defined to be optional and thus it's expected to be a common case that
    we would hit this crash and this is more than just a theoretical fix.

    Fixes: ca04d9d3e1b1 ("phy: qcom-qusb2: New driver for QUSB2 PHY on Qcom chips")
    Signed-off-by: Douglas Anderson
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Douglas Anderson
     

13 Jun, 2018

1 commit

  • The kzalloc() function has a 2-factor argument form, kcalloc(). This
    patch replaces cases of:

    kzalloc(a * b, gfp)

    with:
    kcalloc(a * b, gfp)

    as well as handling cases of:

    kzalloc(a * b * c, gfp)

    with:

    kzalloc(array3_size(a, b, c), gfp)

    as it's slightly less ugly than:

    kzalloc_array(array_size(a, b), c, gfp)

    This does, however, attempt to ignore constant size factors like:

    kzalloc(4 * 1024, gfp)

    though any constants defined via macros get caught up in the conversion.

    Any factors with a sizeof() of "unsigned char", "char", and "u8" were
    dropped, since they're redundant.

    The Coccinelle script used for this was:

    // Fix redundant parens around sizeof().
    @@
    type TYPE;
    expression THING, E;
    @@

    (
    kzalloc(
    - (sizeof(TYPE)) * E
    + sizeof(TYPE) * E
    , ...)
    |
    kzalloc(
    - (sizeof(THING)) * E
    + sizeof(THING) * E
    , ...)
    )

    // Drop single-byte sizes and redundant parens.
    @@
    expression COUNT;
    typedef u8;
    typedef __u8;
    @@

    (
    kzalloc(
    - sizeof(u8) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(__u8) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(char) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(unsigned char) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(u8) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(__u8) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(char) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(unsigned char) * COUNT
    + COUNT
    , ...)
    )

    // 2-factor product with sizeof(type/expression) and identifier or constant.
    @@
    type TYPE;
    expression THING;
    identifier COUNT_ID;
    constant COUNT_CONST;
    @@

    (
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (COUNT_ID)
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * COUNT_ID
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (COUNT_CONST)
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * COUNT_CONST
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (COUNT_ID)
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * COUNT_ID
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (COUNT_CONST)
    + COUNT_CONST, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * COUNT_CONST
    + COUNT_CONST, sizeof(THING)
    , ...)
    )

    // 2-factor product, only identifiers.
    @@
    identifier SIZE, COUNT;
    @@

    - kzalloc
    + kcalloc
    (
    - SIZE * COUNT
    + COUNT, SIZE
    , ...)

    // 3-factor product with 1 sizeof(type) or sizeof(expression), with
    // redundant parens removed.
    @@
    expression THING;
    identifier STRIDE, COUNT;
    type TYPE;
    @@

    (
    kzalloc(
    - sizeof(TYPE) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    )

    // 3-factor product with 2 sizeof(variable), with redundant parens removed.
    @@
    expression THING1, THING2;
    identifier COUNT;
    type TYPE1, TYPE2;
    @@

    (
    kzalloc(
    - sizeof(TYPE1) * sizeof(TYPE2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    kzalloc(
    - sizeof(THING1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(THING1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    )

    // 3-factor product, only identifiers, with redundant parens removed.
    @@
    identifier STRIDE, SIZE, COUNT;
    @@

    (
    kzalloc(
    - (COUNT) * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    )

    // Any remaining multi-factor products, first at least 3-factor products,
    // when they're not all constants...
    @@
    expression E1, E2, E3;
    constant C1, C2, C3;
    @@

    (
    kzalloc(C1 * C2 * C3, ...)
    |
    kzalloc(
    - (E1) * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - (E1) * (E2) * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - (E1) * (E2) * (E3)
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - E1 * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    )

    // And then all remaining 2 factors products when they're not all constants,
    // keeping sizeof() as the second factor argument.
    @@
    expression THING, E1, E2;
    type TYPE;
    constant C1, C2, C3;
    @@

    (
    kzalloc(sizeof(THING) * C2, ...)
    |
    kzalloc(sizeof(TYPE) * C2, ...)
    |
    kzalloc(C1 * C2 * C3, ...)
    |
    kzalloc(C1 * C2, ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (E2)
    + E2, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * E2
    + E2, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (E2)
    + E2, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * E2
    + E2, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - (E1) * E2
    + E1, E2
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - (E1) * (E2)
    + E1, E2
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - E1 * E2
    + E1, E2
    , ...)
    )

    Signed-off-by: Kees Cook

    Kees Cook
     

14 May, 2018

7 commits

  • Function nvmem_reg_read can return a non zero value indicating an error.
    This returned value must be read and error propagated to
    nvmem_cell_prepare_write_buffer. Silence the following gcc warning (W=1):

    drivers/nvmem/core.c:1093:9: warning: variable 'rc' set but
    not used [-Wunused-but-set-variable]

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

    Mathieu Malaterre
     
  • Document dev parameter which not described in devm_nvmem_unregister
    and devm_nvmem_register functions.

    Fix below warnings when kernel is compiled with W=1
    drivers/nvmem/core.c:579: warning: Function parameter or member
    'dev' not described in 'devm_nvmem_register'
    nvmem/core.c:615: warning: Function parameter or member 'dev'
    not described in 'devm_nvmem_unregister'

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

    Srinivas Kandagatla
     
  • Add write support to the meson-gx efuse driver.
    Beware, this efuse is one time programmable !

    Reviewed-by: Kevin Hilman
    Signed-off-by: Jerome Brunet
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Jerome Brunet
     
  • Most of the code and variables in the read callback is not necessary.
    Keep only what is required.

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

    Jerome Brunet
     
  • Having a global structure holding a reference to the device
    structure is not very nice. Allocate the econfig instead and fill
    the nvmem information as before

    Reviewed-by: Kevin Hilman
    Signed-off-by: Jerome Brunet
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Jerome Brunet
     
  • Add driver providing access to EEPROMs connected to RAVE SP devices

    Cc: Srinivas Kandagatla
    Cc: linux-kernel@vger.kernel.org
    Cc: Chris Healy
    Cc: Lucas Stach
    Cc: Aleksander Morgado
    Signed-off-by: Andrey Smirnov
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Andrey Smirnov
     
  • Not all platforms use device tree. It is useful to be able to add
    cells to a NVMEM device from code. Export nvmem_add_cells() so making
    this possible.

    This required changing the parameters a bit, so that just the cells
    and the number of cells are passed, not the whole nvmem config
    structure.

    Signed-off-by: Andrew Lunn
    Reviewed-by: Andrey Smirnov
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Andrew Lunn
     

05 Apr, 2018

1 commit

  • Pull char/misc updates from Greg KH:
    "Here is the big set of char/misc driver patches for 4.17-rc1.

    There are a lot of little things in here, nothing huge, but all
    important to the different hardware types involved:

    - thunderbolt driver updates

    - parport updates (people still care...)

    - nvmem driver updates

    - mei updates (as always)

    - hwtracing driver updates

    - hyperv driver updates

    - extcon driver updates

    - ... and a handful of even smaller driver subsystem and individual
    driver updates

    All of these have been in linux-next with no reported issues"

    * tag 'char-misc-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (149 commits)
    hwtracing: Add HW tracing support menu
    intel_th: Add ACPI glue layer
    intel_th: Allow forcing host mode through drvdata
    intel_th: Pick up irq number from resources
    intel_th: Don't touch switch routing in host mode
    intel_th: Use correct method of finding hub
    intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate
    stm class: Make dummy's master/channel ranges configurable
    stm class: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate
    MAINTAINERS: Bestow upon myself the care for drivers/hwtracing
    hv: add SPDX license id to Kconfig
    hv: add SPDX license to trace
    Drivers: hv: vmbus: do not mark HV_PCIE as perf_device
    Drivers: hv: vmbus: respect what we get from hv_get_synint_state()
    /dev/mem: Avoid overwriting "err" in read_mem()
    eeprom: at24: use SPDX identifier instead of GPL boiler-plate
    eeprom: at24: simplify the i2c functionality checking
    eeprom: at24: fix a line break
    eeprom: at24: tweak newlines
    eeprom: at24: refactor at24_probe()
    ...

    Linus Torvalds
     

04 Apr, 2018

1 commit

  • The new of_get_nvmem_mac_address() helper function causes a link error
    with CONFIG_NVMEM=m:

    drivers/of/of_net.o: In function `of_get_nvmem_mac_address':
    of_net.c:(.text+0x168): undefined reference to `of_nvmem_cell_get'
    of_net.c:(.text+0x19c): undefined reference to `nvmem_cell_read'
    of_net.c:(.text+0x1a8): undefined reference to `nvmem_cell_put'

    I could not come up with a good solution for this, as the code is always
    built-in. Using an #if IS_REACHABLE() check around it would solve the
    link time issue but then stop it from working in that configuration.
    Making of_nvmem_cell_get() an inline function could also solve that, but
    seems a bit ugly since it's somewhat larger than most inline functions,
    and it would just bring that problem into the callers. Splitting the
    function into a separate file might be an alternative.

    This uses the big hammer by making CONFIG_NVMEM itself a 'bool' symbol,
    which avoids the problem entirely but makes the vmlinux larger for anyone
    that might use NVMEM support but doesn't need it built-in otherwise.

    Fixes: 9217e566bdee ("of_net: Implement of_get_nvmem_mac_address helper")
    Cc: Mike Looijmans
    Cc: Florian Fainelli
    Cc: Andrew Lunn
    Cc: David S. Miller
    Cc: netdev@vger.kernel.org
    Signed-off-by: Arnd Bergmann
    Acked-by: Mike Looijmans
    Signed-off-by: David S. Miller

    Arnd Bergmann
     

15 Mar, 2018

13 commits

  • remove unused dead code

    Cc: Srinivas Kandagatla
    Cc: Shawn Guo
    Signed-off-by: Dong Aisheng
    Acked-by: Shawn Guo
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Dong Aisheng
     
  • It seems that doing some operation will make the value pre-read on H3
    SID controller wrong again, so all operation should be performed by
    register.

    Change the SID reading to use register only.

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

    Icenowy Zheng
     
  • The i.MX7 family has similar SNVS hardware so make the snvs-lpgpr
    support it along with the i.MX6 family. The register interface is the
    same except for the number and offset of the general purpose registers.

    Signed-off-by: Andrey Yurovsky
    Reviewed-by: Oleksij Rempel
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Andrey Yurovsky
     
  • There's "dev" variable for this already. Use it.

    Cc: Srinivas Kandagatla
    Cc: Heiko Stuebner
    Cc: Masahiro Yamada
    Cc: Carlo Caione
    Cc: Kevin Hilman
    Cc: Matthias Brugger
    Cc: cphealy@gmail.com
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mediatek@lists.infradead.org
    Cc: linux-rockchip@lists.infradead.org
    Cc: linux-amlogic@lists.infradead.org
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Andrey Smirnov
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Andrey Smirnov
     
  • There's already "dev" variable for that. Use it.

    Cc: Srinivas Kandagatla
    Cc: Heiko Stuebner
    Cc: Masahiro Yamada
    Cc: Carlo Caione
    Cc: Kevin Hilman
    Cc: Matthias Brugger
    Cc: cphealy@gmail.com
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mediatek@lists.infradead.org
    Cc: linux-rockchip@lists.infradead.org
    Cc: linux-amlogic@lists.infradead.org
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Andrey Smirnov
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Andrey Smirnov
     
  • There's "dev" variable for this already. Use it.

    Cc: Srinivas Kandagatla
    Cc: Heiko Stuebner
    Cc: Masahiro Yamada
    Cc: Carlo Caione
    Cc: Kevin Hilman
    Cc: Matthias Brugger
    Cc: cphealy@gmail.com
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mediatek@lists.infradead.org
    Cc: linux-rockchip@lists.infradead.org
    Cc: linux-amlogic@lists.infradead.org
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Andrey Smirnov
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Andrey Smirnov
     
  • There already a "dev" variable for that. Use it.

    Cc: Srinivas Kandagatla
    Cc: Heiko Stuebner
    Cc: Masahiro Yamada
    Cc: Carlo Caione
    Cc: Kevin Hilman
    Cc: Matthias Brugger
    Cc: cphealy@gmail.com
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mediatek@lists.infradead.org
    Cc: linux-rockchip@lists.infradead.org
    Cc: linux-amlogic@lists.infradead.org
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Andrey Smirnov
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Andrey Smirnov
     
  • Simplify code a bit by using of_device_get_match_data() instead of
    of_match_device().

    Cc: Srinivas Kandagatla
    Cc: Heiko Stuebner
    Cc: Masahiro Yamada
    Cc: Carlo Caione
    Cc: Kevin Hilman
    Cc: Matthias Brugger
    Cc: cphealy@gmail.com
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mediatek@lists.infradead.org
    Cc: linux-rockchip@lists.infradead.org
    Cc: linux-amlogic@lists.infradead.org
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Andrey Smirnov
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Andrey Smirnov
     
  • Looks like commas were accidentally used where semicolons were
    supposed to be. Fix that.

    Cc: Srinivas Kandagatla
    Cc: Heiko Stuebner
    Cc: Masahiro Yamada
    Cc: Carlo Caione
    Cc: Kevin Hilman
    Cc: Matthias Brugger
    Cc: cphealy@gmail.com
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mediatek@lists.infradead.org
    Cc: linux-rockchip@lists.infradead.org
    Cc: linux-amlogic@lists.infradead.org
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Andrey Smirnov
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Andrey Smirnov
     
  • Drop all of the code related to .remove hook and make use of
    devm_nvmem_register() instead.

    Cc: Srinivas Kandagatla
    Cc: Heiko Stuebner
    Cc: Masahiro Yamada
    Cc: Carlo Caione
    Cc: Kevin Hilman
    Cc: Matthias Brugger
    Cc: cphealy@gmail.com
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mediatek@lists.infradead.org
    Cc: linux-rockchip@lists.infradead.org
    Cc: linux-amlogic@lists.infradead.org
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Andrey Smirnov
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Andrey Smirnov
     
  • Drop all of the code related to .remove hook and make use of
    devm_nvmem_register() instead.

    Cc: Srinivas Kandagatla
    Cc: Heiko Stuebner
    Cc: Masahiro Yamada
    Cc: Carlo Caione
    Cc: Kevin Hilman
    Cc: Matthias Brugger
    Cc: cphealy@gmail.com
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mediatek@lists.infradead.org
    Cc: linux-rockchip@lists.infradead.org
    Cc: linux-amlogic@lists.infradead.org
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Andrey Smirnov
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Andrey Smirnov
     
  • Drop all of the code related to .remove hook and make use of
    devm_nvmem_register() instead.

    Cc: Srinivas Kandagatla
    Cc: Heiko Stuebner
    Cc: Masahiro Yamada
    Cc: Carlo Caione
    Cc: Kevin Hilman
    Cc: Matthias Brugger
    Cc: cphealy@gmail.com
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mediatek@lists.infradead.org
    Cc: linux-rockchip@lists.infradead.org
    Cc: linux-amlogic@lists.infradead.org
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Andrey Smirnov
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Andrey Smirnov
     
  • Drop all of the code related to .remove hook and make use of
    devm_nvmem_register() instead.

    Cc: Srinivas Kandagatla
    Cc: Heiko Stuebner
    Cc: Masahiro Yamada
    Cc: Carlo Caione
    Cc: Kevin Hilman
    Cc: Matthias Brugger
    Cc: cphealy@gmail.com
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mediatek@lists.infradead.org
    Cc: linux-rockchip@lists.infradead.org
    Cc: linux-amlogic@lists.infradead.org
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Andrey Smirnov
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Andrey Smirnov