27 May, 2016

1 commit

  • gcc-4.4 and thereabouts has issues with initializers of anonymous
    unions, and it generates the following warnings:

    drivers/pinctrl/intel/pinctrl-baytrail.c:413: error: unknown field 'simple_funcs' specified in initializer
    drivers/pinctrl/intel/pinctrl-baytrail.c:413: warning: missing braces around initializer
    drivers/pinctrl/intel/pinctrl-baytrail.c:413: warning: (near initialization for 'byt_score_groups[0].')
    drivers/pinctrl/intel/pinctrl-baytrail.c:415: error: unknown field 'simple_funcs' specified in initializer
    drivers/pinctrl/intel/pinctrl-baytrail.c:417: error: unknown field 'simple_funcs' specified in initializer
    ...

    Work around this.

    Acked-by: Mika Westerberg
    Cc: Heikki Krogerus
    Cc: Linus Walleij
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

20 May, 2016

1 commit

  • Pull pin control updates from Linus Walleij:
    "This kernel cycle was quite calm when it comes to pin control and
    there is really just one major change, and that is the introduction of
    devm_pinctrl_register() managed resources.

    Apart from that linear development, details below.

    Core changes:

    - Add the devm_pinctrl_register() API and switch all applicable
    drivers to use it, saving lots of lines of code all over the place.

    New drivers:

    - driver for the Broadcom NS2 SoC

    - subdriver for the PXA25x SoCs

    - subdriver for the AMLogic Meson GXBB SoC

    Driver improvements:

    - the Intel Baytrail driver now properly supports pin control

    - Nomadik, Rockchip, Broadcom BCM2835 support the .get_direction()
    callback in the GPIO portions

    - continued development and stabilization of several SH-PFC SoC
    subdrivers: r8a7795, r8a7790, r8a7794 etc"

    * tag 'pinctrl-v4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (85 commits)
    Revert "pinctrl: tegra: avoid parked_reg and parked_bank"
    pinctrl: meson: Fix eth_tx_en bit index
    pinctrl: tegra: avoid parked_reg and parked_bank
    pinctrl: tegra: Correctly check the supported configuration
    pinctrl: amlogic: Add support for Amlogic Meson GXBB SoC
    pinctrl: rockchip: fix pull setting error for rk3399
    pinctrl: stm32: Implement .pin_config_dbg_show()
    pinctrl: nomadik: hide nmk_gpio_get_mode when unused
    pinctrl: ns2: rename pinctrl_utils_dt_free_map
    pinctrl: at91: Merge clk_prepare and clk_enable into clk_prepare_enable
    pinctrl: at91: Make at91_gpio_template const
    pinctrl: baytrail: fix some error handling in debugfs
    pinctrl: ns2: add pinmux driver support for Broadcom NS2 SoC
    pinctrl: sirf/atlas7: trivial fix of spelling mistake on flagged
    pinctrl: sh-pfc: Kill unused variable in sh_pfc_remove()
    pinctrl: nomadik: implement .get_direction()
    pinctrl: nomadik: use BIT() with offsets consequently
    pinctrl: exynos5440: Use off-stack memory for pinctrl_gpio_range
    pinctrl: zynq: Use devm_pinctrl_register() for pinctrl registration
    pinctrl: u300: Use devm_pinctrl_register() for pinctrl registration
    ...

    Linus Torvalds
     

19 May, 2016

1 commit

  • Pull ARM SoC driver updates from Arnd Bergmann:
    "Driver updates for ARM SoCs, these contain various things that touch
    the drivers/ directory but got merged through arm-soc for practical
    reasons.

    For the most part, this is now related to power management
    controllers, which have not yet been abstracted into a separate
    subsystem, and typically require some code in drivers/soc or arch/arm
    to control the power domains.

    Another large chunk here is a rework of the NVIDIA Tegra USB3.0
    support, which was surprisingly tricky and took a long time to get
    done.

    Finally, reset controller handling as always gets merged through here
    as well"

    * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (97 commits)
    arm-ccn: Enable building as module
    soc/tegra: pmc: Add generic PM domain support
    usb: xhci: tegra: Add Tegra210 support
    usb: xhci: Add NVIDIA Tegra XUSB controller driver
    dt-bindings: usb: xhci-tegra: Add Tegra210 XUSB controller support
    dt-bindings: usb: Add NVIDIA Tegra XUSB controller binding
    PCI: tegra: Support per-lane PHYs
    dt-bindings: pci: tegra: Update for per-lane PHYs
    phy: tegra: Add Tegra210 support
    phy: Add Tegra XUSB pad controller support
    dt-bindings: phy: tegra-xusb-padctl: Add Tegra210 support
    dt-bindings: phy: Add NVIDIA Tegra XUSB pad controller binding
    phy: core: Allow children node to be overridden
    clk: tegra: Add interface to enable hardware control of SATA/XUSB PLLs
    drivers: firmware: psci: make two helper functions inline
    soc: renesas: rcar-sysc: Add support for R-Car H3 power areas
    soc: renesas: rcar-sysc: Add support for R-Car E2 power areas
    soc: renesas: rcar-sysc: Add support for R-Car M2-N power areas
    soc: renesas: rcar-sysc: Add support for R-Car M2-W power areas
    soc: renesas: rcar-sysc: Add support for R-Car H2 power areas
    ...

    Linus Torvalds
     

18 May, 2016

2 commits

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

    Core infrastructural changes:

    - Support for natively single-ended GPIO driver stages.

    This means that if the hardware has registers to configure open
    drain or open source configuration, we use that rather than (as we
    did before) try to emulate it by switching the line to an input to
    get high impedance.

    This is also documented throughly in Documentation/gpio/driver.txt
    for those of you who did not understand one word of what I just
    wrote.

    - Start to do away with the unnecessarily complex and unitelligible
    ARCH_REQUIRE_GPIOLIB and ARCH_WANT_OPTIONAL_GPIOLIB, another
    evolutional artifact from the time when the GPIO subsystem was
    unmaintained.

    Archs can now just select GPIOLIB and be done with it, cleanups to
    arches will trickle in for the next kernel. Some minor archs ACKed
    the changes immediately so these are included in this pull request.

    - Advancing the use of the data pointer inside the GPIO device for
    storing driver data by switching the PowerPC, Super-H Unicore and
    a few other subarches or subsystem drivers in ALSA SoC, Input,
    serial, SSB, staging etc to use it.

    - The initialization now reads the input/output state of the GPIO
    lines, so that each GPIO descriptor knows - if this callback is
    implemented - whether the line is input or output. This also
    reflects nicely in userspace "lsgpio".

    - It is now possible to name GPIO producer names, line names, from
    the device tree. (Platform data has been supported for a while).
    I bet we will get a similar mechanism for ACPI one of those days.
    This makes is possible to get sensible producer names for e.g.
    GPIO rails in "lsgpio" in userspace.

    New drivers:

    - New driver for the Loongson1.

    - The XLP driver now supports Broadcom Vulcan ARM64.

    - The IT87 driver now supports IT8620 and IT8628.

    - The PCA953X driver now supports Galileo Gen2.

    Driver improvements:

    - MCP23S08 was switched to use the gpiolib irqchip helpers and now
    also suppors level-triggered interrupts.

    - 74x164 and RCAR now supports the .set_multiple() callback

    - AMDPT was converted to use generic GPIO.

    - TC3589x, TPS65218, SX150X, F7188X, MENZ127, VX855, WM831X, WM8994
    support the new single ended callback for open drain and in some
    cases open source.

    - Implement the .get_direction() callback for a few more drivers like
    PL061, Xgene.

    Cleanups:

    - Paul Gortmaker combed through the drivers and de-modularized those
    who are not really modules.

    - Move the GPIO poweroff DT bindings to the power subdir where they
    belong.

    - Rename gpio-generic.c to gpio-mmio.c, which is much more to the
    point. That's what it is handling, nothing more, nothing less"

    * tag 'gpio-v4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (126 commits)
    MIPS: do away with ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB
    gpio: zevio: make it explicitly non-modular
    gpio: timberdale: make it explicitly non-modular
    gpio: stmpe: make it explicitly non-modular
    gpio: sodaville: make it explicitly non-modular
    pinctrl: sh-pfc: Let gpio_chip.to_irq() return zero on error
    gpio: dwapb: Add ACPI device ID for DWAPB GPIO controller on X-Gene platforms
    gpio: dt-bindings: add wd,mbl-gpio bindings
    gpio: of: make it possible to name GPIO lines
    gpio: make gpiod_to_irq() return negative for NO_IRQ
    gpio: xgene: implement .get_direction()
    gpio: xgene: Enable ACPI support for X-Gene GFC GPIO driver
    gpio: tegra: Implement gpio_get_direction callback
    gpio: set up initial state from .get_direction()
    gpio: rename gpio-generic.c into gpio-mmio.c
    gpio: generic: fix GPIO_GENERIC_PLATFORM is set to module case
    gpio: dwapb: add gpio-signaled acpi event support
    gpio: dwapb: convert device node to fwnode
    gpio: dwapb: remove name from dwapb_port_property
    gpio/qoriq: select IRQ_DOMAIN
    ...

    Linus Torvalds
     
  • Pull trivial tree updates from Jiri Kosina.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (21 commits)
    gitignore: fix wording
    mfd: ab8500-debugfs: fix "between" in printk
    memstick: trivial fix of spelling mistake on management
    cpupowerutils: bench: fix "average"
    treewide: Fix typos in printk
    IB/mlx4: printk fix
    pinctrl: sirf/atlas7: fix printk spelling
    serial: mctrl_gpio: Grammar s/lines GPIOs/line GPIOs/, /sets/set/
    w1: comment spelling s/minmum/minimum/
    Blackfin: comment spelling s/divsor/divisor/
    metag: Fix misspellings in comments.
    ia64: Fix misspellings in comments.
    hexagon: Fix misspellings in comments.
    tools/perf: Fix misspellings in comments.
    cris: Fix misspellings in comments.
    c6x: Fix misspellings in comments.
    blackfin: Fix misspelling of 'register' in comment.
    avr32: Fix misspelling of 'definitions' in comment.
    treewide: Fix typos in printk
    Doc: treewide : Fix typos in DocBook/filesystem.xml
    ...

    Linus Torvalds
     

13 May, 2016

1 commit


11 May, 2016

6 commits

  • Fix pinctrl eth_tx_en bit index according to Hardkernel ODROID-C1 datasheet.

    Signed-off-by: Alexander Müller
    Acked-by: Carlo Caione
    Signed-off-by: Linus Walleij

    Alexander Müller
     
  • Currrently the gpio_chip.to_irq() callback returns -ENOSYS on error,
    which causes bad interactions with the serial_mctrl_gpio helpers.

    mctrl_gpio_init() returns -ENOSYS if GPIOLIB is not enabled, which is
    intended to be ignored by its callers. However, ignoring -ENOSYS when it
    was caused by a gpiod_to_irq() failure will lead to a crash later:

    Unable to handle kernel paging request at virtual address ffffffde
    ...
    PC is at mctrl_gpio_set+0x14/0x78

    Fix this by returning zero instead, like gpiochip_to_irq() does.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Linus Walleij

    Geert Uytterhoeven
     
  • NVIDIA's Tegra210 support the park bit to make pinmux configuration
    enable/disable. If parked bit is 1 then configuration does not apply
    and if it is 0 then pinmux configuration applies. This is to support
    to avoid any glitch in pinmux configurations.

    The parked bit is part of mux register and mux bank and hence it is
    not required to have member for the parked_reg and parked bank very
    similar to other bit field of the same register.

    Remove the need of the parked register and parked bank and get whether
    parked function supported or not by parked_bit.

    This is to make the parked bit handling same as other fields of mux
    registers.

    Signed-off-by: Laxman Dewangan
    Acked-by: Stephen Warren
    Signed-off-by: Linus Walleij

    Laxman Dewangan
     
  • The pincontrol registers of Tegra chips has multiple filed per
    registers. There is two type of registers mux and drive. All
    configurations belongs to one of these registers.

    If any configurations are supported then _bit is set to
    bit position of these registers otherwise -1 to not support it.
    The member is defined as
    s32 _bit:6;

    So if config is not supported ifor given SoC then it is set to -1
    in soc pinmmux table.
    In common driver code, to find out that given config is supported
    or not, it is checked as:

    s8 bit = _bit;
    if (bit > 31) {
    /* Not supported config */
    }

    But in this case, bit is s8 and hence for non supporting it is -1.

    Correct the check as:
    if (bit < 0) {
    /* Not supported config */
    }

    Fixes: e4c02dced975cb ("pinctrl: tegra: use signed bitfields for optional fields")
    Signed-off-by: Laxman Dewangan
    Acked-by: Stephen Warren
    Signed-off-by: Linus Walleij

    Laxman Dewangan
     
  • This patch adds the basic platform file to support the pin controller
    found on the Amlogic Meson GXBB SoCs.

    Signed-off-by: Carlo Caione
    Reviewed-by: Kevin Hilman
    Tested-by: Kevin Hilman
    Signed-off-by: Linus Walleij

    Carlo Caione
     
  • This patch fixes the pinctrl pull bias setting, since the pull up/down
    setting is the contrary for gpio0(just the gpio0a and gpio0b) and
    gpio2(just the gpio2c and gpio2d).

    From the TRM said, the gpio0a pull polarity setting:
    gpio0a_p
    GPIO0A PE/PS programmation section, every
    GPIO bit corresponding to 2bits[PS:PE]
    2'b00: Z(Normal operation);
    2'b11: weak 1(pull-up);
    2'b01: weak 0(pull-down);
    2'b10: Z(Normal operation);

    Then, the other gpios setting as the following:
    gpio1a_p (e.g.: gpio1, gpio2a, gpio2b, gpio3...)
    GPIO1A PU/PD programmation section, every
    GPIO bit corresponding to 2bits
    2'b00: Z(Normal operation);
    2'b01: weak 1(pull-up);
    2'b10: weak 0(pull-down);
    2'b11: Z(Normal operation);

    For example,(rk3399evb board)
    sdmmc_cd --->gpio0_a7
    localhost / # io -r -4 0xff320040
    ff320040: 00004d5f
    In general,the value should be 0x0000cd5f since the pin has been set
    in the dts.

    Signed-off-by: David Wu
    Signed-off-by: Caesar Wang
    Cc: linux-gpio@vger.kernel.org
    Reviewed-by: Douglas Anderson
    Reviewed-by: Heiko Stuebner
    Signed-off-by: Linus Walleij

    David Wu
     

10 May, 2016

1 commit


09 May, 2016

3 commits

  • …egra/linux into next/drivers

    Merge "phy: tegra: Changes for v4.7-rc1" from Thierry Reding:

    This set of patches adds support for the Tegra XUSB pad controller. The
    controller provides a set of pads (lanes) that are used for I/O by other
    IP blocks within Tegra SoCs (PCIe, SATA and XUSB).

    * tag 'tegra-for-4.7-phy' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
    phy: tegra: Add Tegra210 support
    phy: Add Tegra XUSB pad controller support
    dt-bindings: phy: tegra-xusb-padctl: Add Tegra210 support
    dt-bindings: phy: Add NVIDIA Tegra XUSB pad controller binding
    phy: core: Allow children node to be overridden
    clk: tegra: Add interface to enable hardware control of SATA/XUSB PLLs

    Arnd Bergmann
     
  • nmk_gpio_get_mode is only used in one place, and that is conditionally
    compiled if DEBUG_FS is enabled. A recent cleanup has marked the
    definition 'static', which now leads to a warning:

    drivers/pinctrl/nomadik/pinctrl-nomadik.c:614:12: error: 'nmk_gpio_get_mode' defined but not used [-Werror=unused-function]
    static int nmk_gpio_get_mode(struct nmk_gpio_chip *nmk_chip, int offset)
    ^~~~~~~~~~~~~~~~~

    Moving the function itself inside the #ifdef shuts it up again.

    Signed-off-by: Arnd Bergmann
    Fixes: 5e81e0a0913c ("pinctrl: nomadik: use BIT() with offsets consequently")
    Signed-off-by: Linus Walleij

    Arnd Bergmann
     
  • A conflict of two patches caused a build error when a function got renamed
    but a new user appeared in the other patch:

    drivers/pinctrl/bcm/pinctrl-ns2-mux.c:540:17: error: 'pinctrl_utils_dt_free_map' undeclared here (not in a function)
    .dt_free_map = pinctrl_utils_dt_free_map,
    ^~~~~~~~~~~~~~~~~~~~~~~~~

    This renames the new user of pinctrl_utils_dt_free_map accordingly.

    Signed-off-by: Arnd Bergmann
    Fixes: d32f7fd3bbc3 ("pinctrl: Rename pinctrl_utils_dt_free_map to pinctrl_utils_free_map")
    Fixes: b5aa1006e4a9 ("pinctrl: ns2: add pinmux driver support for Broadcom NS2 SoC")
    Signed-off-by: Linus Walleij

    Arnd Bergmann
     

02 May, 2016

3 commits


30 Apr, 2016

2 commits


29 Apr, 2016

4 commits

  • Add a new driver for the XUSB pad controller found on NVIDIA Tegra SoCs.
    This hardware block used to be exposed as a pin controller, but it turns
    out that this isn't a good fit. The new driver and DT binding much more
    accurately describe the hardware and are more flexible in supporting new
    SoC generations.

    Acked-by: Kishon Vijay Abraham I
    Signed-off-by: Thierry Reding

    Thierry Reding
     
  • fix spelling mistake, flaged -> flagged

    Signed-off-by: Colin Ian King
    Signed-off-by: Linus Walleij

    Colin Ian King
     
  • The default configuration of a pin is often with a value in the
    pull-up/down field at chip reset. So, even if the internal logic of the
    controller prevents writing a configuration with pull-up and pull-down at
    the same time, we must ensure explicitly this condition before writing the
    register.

    This was leading to a pull-down condition not taken into account for
    instance.

    Signed-off-by: Ludovic Desroches
    Fixes: 776180848b57 ("pinctrl: introduce driver for Atmel PIO4 controller")
    Cc: stable@vger.kernel.org #v4.4 and later
    Acked-by: Alexandre Belloni
    Acked-by: Nicolas Ferre
    Signed-off-by: Linus Walleij

    Ludovic Desroches
     
  • If CONFIG_PINCTRL_SH_PFC_GPIO=n:

    drivers/pinctrl/sh-pfc/core.c: In function 'sh_pfc_remove':
    drivers/pinctrl/sh-pfc/core.c:649:17: warning: unused variable 'pfc' [-Wunused-variable]

    Fixes: 67ec8d7b48463904 ("pinctrl: ish-pfc: Use devm_pinctrl_register() for pinctrl registration")
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Linus Walleij

    Geert Uytterhoeven
     

28 Apr, 2016

3 commits


26 Apr, 2016

1 commit

  • The range is registered into a linked list which can be referenced
    throughout the lifetime of the driver. Ensure the range's memory is useful
    for the same lifetime by adding it to the driver's private data structure.

    The bug was introduced in the driver's initial commit, which was present in
    v3.10.

    Fixes: f0b9a7e521fa ("pinctrl: exynos5440: add pinctrl driver for Samsung EXYNOS5440 SoC")
    Cc: stable@vger.kernel.org
    Signed-off-by: Andrew Jeffery
    Acked-by: Tomasz Figa
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Linus Walleij

    Andrew Jeffery
     

21 Apr, 2016

11 commits