06 Oct, 2019

1 commit

  • platform_get_irq() can return an error code. Allow for this when getting
    the irq.

    Fixes: 6f265e5d4da7 ("pinctrl: bcm-iproc: Pass irqchip when adding gpiochip")
    Signed-off-by: Chris Packham
    Link: https://lore.kernel.org/r/20191003000310.17099-2-chris.packham@alliedtelesis.co.nz
    Acked-by: Scott Branden
    Signed-off-by: Linus Walleij

    Chris Packham
     

05 Oct, 2019

2 commits

  • The pinctrl->functions[] array has pinctrl->num_functions elements and
    the pinctrl->groups[] array is the same way. These are set in
    ns2_pinmux_probe(). So the > comparisons should be >= so that we don't
    read one element beyond the end of the array.

    Fixes: b5aa1006e4a9 ("pinctrl: ns2: add pinmux driver support for Broadcom NS2 SoC")
    Signed-off-by: Dan Carpenter
    Link: https://lore.kernel.org/r/20190926081426.GB2332@mwanda
    Acked-by: Scott Branden
    Signed-off-by: Linus Walleij

    Dan Carpenter
     
  • This convert the BCM IPROC driver to use the SPDX header
    for indicating GPL v2.0 only licensing.

    Cc: Pramod Kumar
    Cc: Ray Jui
    Cc: Scott Branden
    Signed-off-by: Linus Walleij
    Acked-by: Scott Branden
    Link: https://lore.kernel.org/r/20191002130217.4491-1-linus.walleij@linaro.org

    Linus Walleij
     

12 Sep, 2019

2 commits


11 Sep, 2019

2 commits

  • When multiple instance of iproc-gpio chips are present, a fix up
    message[1] is printed during the probe of second and later instances.

    This issue is because driver sharing same irq_chip data structure
    among multiple instances of driver.

    Fix this by allocating irq_chip data structure per instance of
    iproc-gpio.

    [1] fix up message addressed by this patch
    [ 7.862208] gpio gpiochip2: (689d0000.gpio): detected irqchip that
    is shared with multiple gpiochips: please fix the driver.

    Fixes: 616043d58a89 ("pinctrl: Rename gpio driver from cygnus to iproc")
    Signed-off-by: Rayagonda Kokatanur
    Link: https://lore.kernel.org/r/1567054348-19685-3-git-send-email-srinath.mannam@broadcom.com
    [Rebased on top of new irq chip set-up code]
    Signed-off-by: Linus Walleij

    Rayagonda Kokatanur
     
  • Fix drive strength for AON/CRMU controller; fix pull-up/down setting
    for CCM/CDRU controller.

    Fixes: 616043d58a89 ("pinctrl: Rename gpio driver from cygnus to iproc")
    Signed-off-by: Li Jin
    Link: https://lore.kernel.org/r/1567054348-19685-2-git-send-email-srinath.mannam@broadcom.com
    Signed-off-by: Linus Walleij

    Li Jin
     

26 Aug, 2019

1 commit

  • We need to convert all old gpio irqchips to pass the irqchip
    setup along when adding the gpio_chip. For more info see
    drivers/gpio/TODO.

    For chained irqchips this is a pretty straight-forward
    conversion. The BCM2835 has multiple parents so let's
    exploit the new facility in the GPIO_IRQCHIP to actually
    deal with multiple parents.

    Cc: Eric Anholt
    Cc: Thierry Reding
    [Rebased on changes in the pinctrl tree]
    Signed-off-by: Linus Walleij
    Tested-by: Stefan Wahren
    Link: https://lore.kernel.org/r/20190812062729.1892-1-linus.walleij@linaro.org

    Linus Walleij
     

21 Aug, 2019

1 commit

  • We need to convert all old gpio irqchips to pass the irqchip
    setup along when adding the gpio_chip. For more info see
    drivers/gpio/TODO.

    For chained irqchips this is a pretty straight-forward
    conversion.

    Cc: Pramod Kumar
    Cc: Ray Jui
    Cc: Scott Branden
    Cc: Thierry Reding
    Signed-off-by: Linus Walleij
    Link: https://lore.kernel.org/r/20190812132554.18313-1-linus.walleij@linaro.org
    Acked-by: Scott Branden
    Signed-off-by: Linus Walleij

    Linus Walleij
     

05 Aug, 2019

1 commit

  • The BCM2711 has a new way of selecting the pull-up/pull-down setting
    for a GPIO pin. The registers used for the BCM2835, GP_PUD and
    GP_PUDCLKn0, are no longer connected. A new set of registers,
    GP_GPIO_PUP_PDN_CNTRL_REGx must be used. This commit will add
    a new compatible string "brcm,bcm2711-gpio" and the kernel
    driver will use it to select which method is used to select
    pull-up/pull-down.

    This patch based on a patch by Al Cooper which was intended for the
    BCM7211. This is a bugfixed and improved version.

    Signed-off-by: Stefan Wahren
    Link: https://lore.kernel.org/r/1563776607-8368-3-git-send-email-wahrenst@gmx.net
    Signed-off-by: Linus Walleij

    Stefan Wahren
     

14 Jul, 2019

1 commit

  • Pull pin control updates from Linus Walleij:
    "This is the bulk of pin control changes for the v5.3 kernel cycle:

    Core changes:

    - Device links can optionally be added between a pin control producer
    and its consumers. This will affect how the system power management
    is handled: a pin controller will not suspend before all of its
    consumers have been suspended.

    This was necessary for the ST Microelectronics STMFX expander and
    need to be tested on other systems as well: it makes sense to make
    this default in the long run.

    Right now it is opt-in per driver.

    - Drive strength can be specified in microamps. With decreases in
    silicon technology, milliamps isn't granular enough, let's make it
    possible to select drive strengths in microamps.

    Right now the Meson (AMlogic) driver needs this.

    New drivers:

    - New subdriver for the Tegra 194 SoC.

    - New subdriver for the Qualcomm SDM845.

    - New subdriver for the Qualcomm SM8150.

    - New subdriver for the Freescale i.MX8MN (Freescale is now a product
    line of NXP).

    - New subdriver for Marvell MV98DX1135.

    Driver improvements:

    - The Bitmain BM1880 driver now supports pin config in addition to
    muxing.

    - The Qualcomm drivers can now reserve some GPIOs as taken aside and
    not usable for users. This is used in ACPI systems to take out some
    GPIO lines used by the BIOS so that noone else (neither kernel nor
    userspace) will play with them by mistake and crash the machine.

    - A slew of refurbishing around the Aspeed drivers (board management
    controllers for servers) in preparation for the new Aspeed AST2600
    SoC.

    - A slew of improvements over the SH PFC drivers as usual.

    - Misc cleanups and fixes"

    * tag 'pinctrl-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (106 commits)
    pinctrl: aspeed: Strip moved macros and structs from private header
    pinctrl: aspeed: Fix missed include
    pinctrl: baytrail: Use GENMASK() consistently
    pinctrl: baytrail: Re-use data structures from pinctrl-intel.h
    pinctrl: baytrail: Use defined macro instead of magic in byt_get_gpio_mux()
    pinctrl: qcom: Add SM8150 pinctrl driver
    dt-bindings: pinctrl: qcom: Add SM8150 pinctrl binding
    dt-bindings: pinctrl: qcom: Document missing gpio nodes
    pinctrl: aspeed: Add implementation-related documentation
    pinctrl: aspeed: Split out pinmux from general pinctrl
    pinctrl: aspeed: Clarify comment about strapping W1C
    pinctrl: aspeed: Correct comment that is no longer true
    MAINTAINERS: Add entry for ASPEED pinctrl drivers
    dt-bindings: pinctrl: aspeed: Convert AST2500 bindings to json-schema
    dt-bindings: pinctrl: aspeed: Convert AST2400 bindings to json-schema
    dt-bindings: pinctrl: aspeed: Split bindings document in two
    pinctrl: qcom: Add irq_enable callback for msm gpio
    pinctrl: madera: Fixup SPDX headers
    pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard
    pinctrl: tegra: Add bitmask support for parked bits
    ...

    Linus Torvalds
     

08 Jun, 2019

1 commit


02 Jun, 2019

1 commit

  • drivers/pinctrl/bcm/pinctrl-bcm2835.c: In function bcm2835_pctl_dt_node_to_map:
    drivers/pinctrl/bcm/pinctrl-bcm2835.c:720:8: error: implicit declaration of function pinconf_generic_dt_node_to_map_all;
    drivers/pinctrl/bcm/pinctrl-bcm2835.c: In function bcm2835_pinctrl_probe:
    drivers/pinctrl/bcm/pinctrl-bcm2835.c:1022:15: error: struct gpio_chip has no member named of_node
    pc->gpio_chip.of_node = np;

    Reported-by: Hulk Robot
    Fixes: 0de704955ee4 ("pinctrl: bcm2835: Add support for generic pinctrl binding")
    Signed-off-by: YueHaibing
    Signed-off-by: Linus Walleij

    YueHaibing
     

23 May, 2019

1 commit

  • ARCH_BRCMSTB needs to use the BCM2835 pin controller for chips
    like BCM7211 which adopted that pin controller for GPIO. This
    commit makes the option menu configurable with default enabled
    for ARCH_BRCMSTB and ARCH_BCM2835.

    Signed-off-by: Doug Berger
    Signed-off-by: Florian Fainelli
    Reviewed-by: Eric Anholt
    Signed-off-by: Linus Walleij

    Doug Berger
     

21 May, 2019

1 commit


08 Feb, 2019

2 commits


21 Dec, 2018

1 commit


17 Nov, 2018

1 commit


09 Nov, 2018

1 commit

  • Clang warns when one enumerated type is implicitly converted to another:

    drivers/pinctrl/bcm/pinctrl-bcm2835.c:707:40: warning: implicit
    conversion from enumeration type 'enum bcm2835_pinconf_param' to
    different enumeration type 'enum pin_config_param' [-Wenum-conversion]
    configs[0] = pinconf_to_config_packed(BCM2835_PINCONF_PARAM_PULL, pull);
    ~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
    1 warning generated.

    It is expected that pinctrl drivers can extend pin_config_param because
    of the gap between PIN_CONFIG_END and PIN_CONFIG_MAX so this conversion
    isn't an issue. Most drivers that take advantage of this define the
    PIN_CONFIG variables as constants, rather than enumerated values. Do the
    same thing here so that Clang no longer warns.

    Signed-off-by: Nathan Chancellor
    Acked-by: Stefan Wahren
    Signed-off-by: Linus Walleij

    Nathan Chancellor
     

05 Nov, 2018

1 commit

  • The BCM2835 pinctrl driver acquires a spinlock in its ->irq_enable,
    ->irq_disable and ->irq_set_type callbacks. Spinlocks become sleeping
    locks with CONFIG_PREEMPT_RT_FULL=y, therefore invocation of one of the
    callbacks in atomic context may cause a hard lockup if at least two GPIO
    pins in the same bank are used as interrupts. The issue doesn't occur
    with just a single interrupt pin per bank because the lock is never
    contended. I'm experiencing such lockups with GPIO 8 and 28 used as
    level-triggered interrupts, i.e. with ->irq_disable being invoked on
    reception of every IRQ.

    The critical section protected by the spinlock is very small (one bitop
    and one RMW of an MMIO register), hence converting to a raw spinlock
    seems a better trade-off than converting the driver to threaded IRQ
    handling (which would increase latency to handle an interrupt).

    Cc: Mathias Duckeck
    Signed-off-by: Lukas Wunner
    Acked-by: Julia Cartwright
    Signed-off-by: Linus Walleij

    Lukas Wunner
     

12 Oct, 2018

1 commit


10 Oct, 2018

1 commit


14 Jul, 2018

2 commits

  • platform_get_resource() may fail and return NULL, so we should
    better check it's return value to avoid a NULL pointer dereference
    a bit later in the code.

    This is detected by Coccinelle semantic patch.

    @@
    expression pdev, res, n, t, e, e1, e2;
    @@

    res = platform_get_resource(pdev, t, n);
    + if (!res)
    + return -EINVAL;
    ... when != res == NULL
    e = devm_ioremap_nocache(e1, res->start, e2);

    Fixes: cc4fa83f66e9 ("pinctrl: nsp: add pinmux driver support for Broadcom NSP SoC")
    Signed-off-by: Wei Yongjun
    Reviewed-by: Ray Jui
    Signed-off-by: Linus Walleij

    Wei Yongjun
     
  • The > comparisons should be >= or else we read beyond the end of the
    pinctrl->functions[] array.

    Fixes: cc4fa83f66e9 ("pinctrl: nsp: add pinmux driver support for Broadcom NSP SoC")
    Signed-off-by: Dan Carpenter
    Reviewed-by: Ray Jui
    Signed-off-by: Linus Walleij

    Dan Carpenter
     

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
     

16 May, 2018

2 commits

  • Properties to set initial value of pin output buffer.
    This can be useful for configure hardware in overlay files, and in early
    boot for checking it states in QA sanity tests.

    Signed-off-by: Matheus Castello
    Reviewed-by: Eric Anholt
    Acked-by: Stefan Wahren
    Signed-off-by: Linus Walleij

    Matheus Castello
     
  • To keep driver up to date we add generic pinctrl binding support, which
    covers the features used in this driver and has additional node properties
    that this SoC has compatibility, so enabling future implementations of
    these properties without the need to create new node properties in the
    device trees.

    The logic of this change maintain the old brcm legacy binding support in
    order to keep the ABI stable.

    Signed-off-by: Matheus Castello
    Reviewed-by: Eric Anholt
    Acked-by: Stefan Wahren
    Signed-off-by: Linus Walleij

    Matheus Castello
     

17 Nov, 2017

1 commit

  • Pull pin control updates from Linus Walleij:
    "This is the bulk of pin control changes for the v4.15 kernel cycle:

    Core:

    - The pin control Kconfig entry PINCTRL is now turned into a
    menuconfig option. This obviously has the implication of making the
    subsystem menu visible in menuconfig. This is happening because of
    two things:

    (a) Intel have started to deploy and depend on pin controllers in
    a way that is affecting users directly. This happens on the
    highly integrated laptop chipsets named after geographical
    places: baytrail, broxton, cannonlake, cedarfork, cherryview,
    denverton, geminilake, lewisburg, merrifield, sunrisepoint...
    It started a while back and now it is ever more evident that
    this is crucial infrastructure for x86 laptops and not an
    embedded obscurity anymore. Users need to be aware.

    (b) Pin control expanders on I2C and SPI that are arch-agnostic.
    Currently Semtech SX150X and Microchip MCP28x08 but more are
    expected. Users will have to be able to configure these in
    directly for their set-up.

    - Just go and select GPIOLIB now that we made sure that GPIOLIB is a
    very vanilla subsystem. Do not depend on it, if we need it, select
    it.

    - Exposing the pin control subsystem in menuconfig uncovered a bunch
    of obscure bugs that are now hopefully fixed, all more or less
    pertaining to Blackfin.

    - Unified namespace for cross-calls between pin control and GPIO.

    - New support for clock skew/delay generic DT bindings and generic
    pin config options for this.

    - Minor documentation improvements.

    Various:

    - The Renesas SH-PFC pin controller has evolved a lot. It seems
    Renesas are churning out new SoCs by the minute.

    - A bunch of non-critical fixes for the Rockchip driver.

    - Improve the use of library functions instead of open coding.

    - Support the MCP28018 variant in the MCP28x08 driver.

    - Static constifying"

    * tag 'pinctrl-v4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (91 commits)
    pinctrl: gemini: Fix missing pad descriptions
    pinctrl: Add some depends on HAS_IOMEM
    pinctrl: samsung/s3c24xx: add CONFIG_OF dependency
    pinctrl: gemini: Fix GMAC groups
    pinctrl: qcom: spmi-gpio: Add pmi8994 gpio support
    pinctrl: ti-iodelay: remove redundant unused variable dev
    pinctrl: max77620: Use common error handling code in max77620_pinconf_set()
    pinctrl: gemini: Implement clock skew/delay config
    pinctrl: gemini: Use generic DT parser
    pinctrl: Add skew-delay pin config and bindings
    pinctrl: armada-37xx: Add edge both type gpio irq support
    pinctrl: uniphier: remove eMMC hardware reset pin-mux
    pinctrl: rockchip: Add iomux-route switching support for rk3288
    pinctrl: intel: Add Intel Cedar Fork PCH pin controller support
    pinctrl: intel: Make offset to interrupt status register configurable
    pinctrl: sunxi: Enforce the strict mode by default
    pinctrl: sunxi: Disable strict mode for old pinctrl drivers
    pinctrl: sunxi: Introduce the strict flag
    pinctrl: sh-pfc: Save/restore registers for PSCI system suspend
    pinctrl: sh-pfc: r8a7796: Use generic IOCTRL register description
    ...

    Linus Torvalds
     

15 Nov, 2017

1 commit

  • Pull GPIO updates from Linus Walleij:
    "This is the bulk of GPIO changes for the v4.15 kernel cycle:

    Core:

    - Fix the semantics of raw GPIO to actually be raw. No inversion
    semantics as before, but also no open draining, and allow the raw
    operations to affect lines used for interrupts as the caller
    supposedly knows what they are doing if they are getting the big
    hammer.

    - Rewrote the __inner_function() notation calls to names that make
    more sense. I just find this kind of code disturbing.

    - Drop the .irq_base() field from the gpiochip since now all IRQs are
    mapped dynamically. This is nice.

    - Support for .get_multiple() in the core driver API. This allows us
    to read several GPIO lines with a single register read. This has
    high value for some usecases: it can be used to create
    oscilloscopes and signal analyzers and other things that rely on
    reading several lines at exactly the same instant. Also a generally
    nice optimization. This uses the new assign_bit() macro from the
    bitops lib that was ACKed by Andrew Morton and is implemented for
    two drivers, one of them being the generic MMIO driver so everyone
    using that will be able to benefit from this.

    - Do not allow requests of Open Drain and Open Source setting of a
    GPIO line simultaneously. If the hardware actually supports
    enabling both at the same time the electrical result would be
    disastrous.

    - A new interrupt chip core helper. This will be helpful to deal with
    "banked" GPIOs, which means GPIO controllers with several logical
    blocks of GPIO inside them. This is several gpiochips per device in
    the device model, in contrast to the case when there is a 1-to-1
    relationship between a device and a gpiochip.

    New drivers:

    - Maxim MAX3191x industrial serializer, a very interesting piece of
    professional I/O hardware.

    - Uniphier GPIO driver. This is the GPIO block from the recent
    Socionext (ex Fujitsu and Panasonic) platform.

    - Tegra 186 driver. This is based on the new banked GPIO
    infrastructure.

    Other improvements:

    - Some documentation improvements.

    - Wakeup support for the DesignWare DWAPB GPIO controller.

    - Reset line support on the DesignWare DWAPB GPIO controller.

    - Several non-critical bug fixes and improvements for the Broadcom
    BRCMSTB driver.

    - Misc non-critical bug fixes like exotic errorpaths, removal of dead
    code etc.

    - Explicit comments on fall-through switch() statements"

    * tag 'gpio-v4.15-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (65 commits)
    gpio: tegra186: Remove tegra186_gpio_lock_class
    gpio: rcar: Add r8a77995 (R-Car D3) support
    pinctrl: bcm2835: Fix some merge fallout
    gpio: Fix undefined lock_dep_class
    gpio: Automatically add lockdep keys
    gpio: Introduce struct gpio_irq_chip.first
    gpio: Disambiguate struct gpio_irq_chip.nested
    gpio: Add Tegra186 support
    gpio: Export gpiochip_irq_{map,unmap}()
    gpio: Implement tighter IRQ chip integration
    gpio: Move lock_key into struct gpio_irq_chip
    gpio: Move irq_valid_mask into struct gpio_irq_chip
    gpio: Move irq_nested into struct gpio_irq_chip
    gpio: Move irq_chained_parent to struct gpio_irq_chip
    gpio: Move irq_default_type to struct gpio_irq_chip
    gpio: Move irq_handler to struct gpio_irq_chip
    gpio: Move irqdomain into struct gpio_irq_chip
    gpio: Move irqchip into struct gpio_irq_chip
    gpio: Introduce struct gpio_irq_chip
    pinctrl: armada-37xx: remove unused variable
    ...

    Linus Torvalds
     

09 Nov, 2017

2 commits


08 Nov, 2017

1 commit


02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

07 Oct, 2017

1 commit


22 Sep, 2017

1 commit


21 Sep, 2017

1 commit

  • This patch fix the following build warning:
    drivers/pinctrl/bcm/pinctrl-bcm2835.c:376:15: warning: variable 'type' set but not used [-Wunused-but-set-variable]

    Furthermore, it is unused for a long time, at least since commit 85ae9e512f43 ("pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP")
    where a "FIXME no clue why the code looks up the type here" was added.
    A year after, nobody answeered this question, so its time to remove it.

    Signed-off-by: Corentin Labbe
    Acked-by: Stefan Wahren
    Signed-off-by: Linus Walleij

    Corentin Labbe
     

22 Aug, 2017

1 commit


14 Aug, 2017

2 commits

  • The irq_group field stores a 1:1 mapping. Use the loop variable to
    derive the values instead of storing them in an extra array.

    Signed-off-by: Thierry Reding
    Signed-off-by: Linus Walleij

    Thierry Reding
     
  • Now that we have a custom printf format specifier, convert users of
    full_name to use %pOF instead. This is preparation to remove storing
    of the full path string for each node.

    Signed-off-by: Rob Herring
    Cc: Linus Walleij
    Cc: Lee Jones
    Cc: Stefan Wahren
    Cc: Florian Fainelli
    Cc: Ray Jui
    Cc: Scott Branden
    Cc: bcm-kernel-feedback-list@broadcom.com
    Cc: Tomasz Figa
    Cc: Sylwester Nawrocki
    Cc: Laurent Pinchart
    Cc: Barry Song
    Cc: linux-gpio@vger.kernel.org
    Cc: linux-rpi-kernel@lists.infradead.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: kernel@stlinux.com
    Cc: linux-samsung-soc@vger.kernel.org
    Cc: linux-renesas-soc@vger.kernel.org
    Acked-by: Krzysztof Kozlowski
    Acked-by: Ludovic Desroches
    Acked-by: Patrice Chotard
    Reviewed-by: Geert Uytterhoeven
    Acked-by: Geert Uytterhoeven
    Acked-by: Eric Anholt
    Signed-off-by: Linus Walleij

    Rob Herring