06 Jul, 2020

2 commits

  • Kerneldoc syntax is used, but not complete. Arg descriptions are required.

    Fixes the following W=1 build warnings:

    drivers/mfd/altera-sysmgr.c:95: warning: Function parameter or member 'np' not described in 'altr_sysmgr_regmap_lookup_by_phandle'
    drivers/mfd/altera-sysmgr.c:95: warning: Function parameter or member 'property' not described in 'altr_sysmgr_regmap_lookup_by_phandle'

    Cc: Thor Thayer
    Signed-off-by: Lee Jones

    Lee Jones
     
  • Sparse reports:

    drivers/mfd/altera-sysmgr.c:150:30: warning: incorrect type in assignment (different address spaces)
    drivers/mfd/altera-sysmgr.c:150:30: expected unsigned int [usertype] *base
    drivers/mfd/altera-sysmgr.c:150:30: got void [noderef] *
    drivers/mfd/altera-sysmgr.c:156:26: warning: incorrect type in argument 3 (different address spaces)
    drivers/mfd/altera-sysmgr.c:156:26: expected void [noderef] *regs
    drivers/mfd/altera-sysmgr.c:156:26: got unsigned int [usertype] *base

    It appears as though the driver data property 'resource_size_t *base'
    was being used to store 2 different types of addresses (physical and
    IO-mapped) under a single declared type.

    Fortunately, no value is recalled from the driver data entry, so it
    can be easily omitted. Instead we can use the value obtained directly
    from the platform resource to pass through Regmap into the call-backs
    to be used for the SMCC call and use a local dedicated __iomem
    variable for IO-remapping.

    Cc: Thor Thayer
    Signed-off-by: Lee Jones

    Lee Jones
     

30 Jul, 2019

1 commit

  • Introduce wrappers for {bus/driver/class}_find_device() to
    locate devices by its of_node.

    Cc: Maarten Lankhorst
    Cc: Maxime Ripard
    Cc: dri-devel@lists.freedesktop.org
    Cc: David Airlie
    Cc: Daniel Vetter
    Cc: devicetree@vger.kernel.org
    Cc: Florian Fainelli
    Cc: Frank Rowand
    Cc: Heiko Stuebner
    Cc: Liam Girdwood
    Cc: linux-i2c@vger.kernel.org
    Cc: linux-rockchip@lists.infradead.org
    Cc: linux-spi@vger.kernel.org
    Cc: Mathieu Poirier
    Cc: Rob Herring
    Cc: Srinivas Kandagatla
    Cc: Takashi Iwai
    Cc: Alan Tull
    Cc: linux-fpga@vger.kernel.org
    Cc: Peter Rosin
    Cc: Florian Fainelli
    Cc: Heiner Kallweit
    Cc: "David S. Miller"
    Cc: Andrew Lunn
    Cc: Liam Girdwood
    Cc: "Rafael J. Wysocki"
    Cc: Thor Thayer
    Cc: Jiri Slaby
    Cc: Andrew Lunn
    Cc: Peter Rosin
    Signed-off-by: Suzuki K Poulose
    Acked-by: Lee Jones
    Acked-by: Wolfram Sang # I2C part
    Acked-by: Moritz Fischer # For FPGA part
    Acked-by: Mark Brown
    Link: https://lore.kernel.org/r/20190723221838.12024-3-suzuki.poulose@arm.com
    Signed-off-by: Greg Kroah-Hartman

    Suzuki K Poulose
     

24 Jun, 2019

1 commit

  • The driver_find_device() accepts a match function pointer to
    filter the devices for lookup, similar to bus/class_find_device().
    However, there is a minor difference in the prototype for the
    match parameter for driver_find_device() with the now unified
    version accepted by {bus/class}_find_device(), where it doesn't
    accept a "const" qualifier for the data argument. This prevents
    us from reusing the generic match functions for driver_find_device().

    For this reason, change the prototype of the driver_find_device() to
    make the "match" parameter in line with {bus/class}_find_device()
    and adjust its callers to use the const qualifier. Also, we could
    now promote the "data" parameter to const as we pass it down
    as a const parameter to the match functions.

    Cc: Corey Minyard
    Cc: Russell King
    Cc: Thierry Reding
    Cc: Greg Kroah-Hartman
    Cc: "Rafael J. Wysocki"
    Cc: Will Deacon
    Cc: Joerg Roedel
    Cc: Peter Oberparleiter
    Cc: Sebastian Ott
    Cc: David Airlie
    Cc: Daniel Vetter
    Cc: Nehal Shah
    Cc: Shyam Sundar S K
    Cc: Lee Jones
    Cc: Christian Borntraeger
    Signed-off-by: Suzuki K Poulose
    Signed-off-by: Greg Kroah-Hartman

    Suzuki K Poulose
     

02 Apr, 2019

1 commit

  • The SOCFPGA System Manager register block aggregates different
    peripheral functions into one area.
    On 32 bit ARM parts, handle in the same way as syscon.
    On 64 bit ARM parts, the System Manager can only be accessed by
    EL3 secure mode. Since a SMC call to EL3 is required, this new
    driver uses regmaps similar to syscon to handle the SMC call.

    Since regmaps abstract out the underlying register access, the
    changes to drivers accessing the System Manager are minimal.

    Signed-off-by: Thor Thayer
    Reviewed-by: Arnd Bergmann
    Signed-off-by: Lee Jones

    Thor Thayer