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
     

31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    license terms gnu general public license gpl version 2

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 161 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Alexios Zavras
    Reviewed-by: Steve Winslow
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190528170027.447718015@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

23 May, 2019

1 commit


08 Nov, 2017

1 commit

  • Some pin controllers (such as the Gemini) can control the
    expected clock skew and output delay on certain pins with a
    sub-nanosecond granularity. This is typically done by shunting
    in a number of double inverters in front of or behind the pin.
    Make it possible to configure this with a generic binding.

    Cc: devicetree@vger.kernel.org
    Acked-by: Rob Herring
    Acked-by: Hans Ulli Kroll
    Signed-off-by: Linus Walleij

    Linus Walleij
     

31 Aug, 2017

1 commit

  • In some scenarios, we should set some pins as input/output/pullup/pulldown
    when the specified system goes into deep sleep mode, then when the system
    goes into deep sleep mode, these pins will be set automatically by hardware.

    That means some pins are not controlled by any specific driver in the OS, but
    need to be controlled when entering sleep mode. Thus we introduce one sleep
    state config into pinconf-generic for users to configure.

    Signed-off-by: Baolin Wang
    Signed-off-by: Linus Walleij

    Baolin Wang
     

14 Aug, 2017

1 commit

  • 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
     

29 Jun, 2017

1 commit

  • Add output-enable generic pin configuration property.
    This properties allows enabling/disabling pin's output capabilities
    without actually driving any value on the line.

    Acked-by: Rob Herring
    [Added inline elaborations on buffer enabling/disabling]
    Signed-off-by: Linus Walleij

    Jacopo Mondi
     

22 May, 2017

1 commit


11 Apr, 2017

1 commit

  • Add bi-directional and output-enable pin configuration properties.

    bi-directional allows to specify when a pin shall operate in input and
    output mode at the same time. This is particularly useful in platforms
    where input and output buffers have to be manually enabled.

    output-enable is just syntactic sugar to specify that a pin shall
    operate in output mode, ignoring the provided argument.
    This pairs with input-enable pin configuration option.

    Signed-off-by: Jacopo Mondi
    Acked-by: Rob Herring
    Signed-off-by: Linus Walleij

    Jacopo Mondi
     

14 Mar, 2017

1 commit


29 Oct, 2016

1 commit

  • During pinmux registration, pinmux table is parsed from DT
    for making the pinmux table configuration of pins.

    Parse the only those node whose status is not disabled.
    This will help on reusing the pin configuration table across
    platform and disabling the node by status property if that node
    is not needed on given platform.

    Signed-off-by: Laxman Dewangan
    Signed-off-by: Linus Walleij

    Laxman Dewangan
     

23 Jun, 2016

2 commits


31 May, 2016

1 commit

  • To improve debugfs readability, use commas instead of whitespaces
    for separating configuration parameters.

    For example, the "pinconf-pins" dump on my board will change as follows:

    Without this commit:

    # head -5 pinconf-pins
    Pin config settings per pin
    Format: pin (name): configs
    pin 0 (ED0): input bias pull down output drive strength (8 mA) input enabled
    pin 1 (ED1): input bias pull down output drive strength (8 mA) input enabled
    pin 2 (ED2): input bias pull down output drive strength (8 mA) input enabled

    With this commit:

    # head -5 pinconf-pins
    Pin config settings per pin
    Format: pin (name): configs
    pin 0 (ED0): input bias pull down, output drive strength (8 mA), input enabled
    pin 1 (ED1): input bias pull down, output drive strength (8 mA), input enabled
    pin 2 (ED2): input bias pull down, output drive strength (8 mA), input enabled

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Linus Walleij

    Masahiro Yamada
     

01 Apr, 2016

1 commit


01 Dec, 2015

1 commit


03 Oct, 2015

2 commits


27 Mar, 2015

2 commits


14 Jan, 2015

1 commit

  • New pin controllers such as ACPI-based may also have custom properties
    to parse, and should be able to use generic pin config. Let's make the
    code compile on !OF systems and rename members a bit to underscore it
    is custom parameters and not necessarily DT parameters.

    This fixes a build regression for x86_64 on the zeroday kernel builds.

    Reported-by: kbuild test robot
    Reviewed-and-tested-by: Soren Brinkmann
    Signed-off-by: Linus Walleij

    Linus Walleij
     

12 Jan, 2015

2 commits

  • Additionally to the generic DT parameters, allow drivers to provide
    driver-specific DT parameters to be used with the generic parser
    infrastructure.

    To achieve this 'struct pinctrl_desc' is extended to pass custom pinconf
    option to the core. In order to pass this kind of information, the
    related data structures - 'struct pinconf_generic_dt_params',
    'pin_config_item' - are moved from pinconf internals to the
    pinconf-generic header.

    Additionally pinconfg-generic is refactored to not only iterate over the
    generic pinconf parameters but also take the parameters into account
    that are provided through the driver's 'struct pinctrl_desc'.
    In particular 'pinconf_generic_parse_dt_config()' and
    'pinconf_generic_dump' helpers are split into two parts each. In order
    to have a more generic helper that can be used to process the generic
    parameters as well as the driver-specific ones.

    v2:
    - fix typo
    - add missing documentation for @conf_items member in struct
    - rebase to pinctrl/devel: conflict in abx500
    - rename _pinconf_generic_dump() to pinconf_generic_dump_one()
    - removed '_' from _parse_dt_cfg()
    - removed BUG_ONs, error condition is handled in if statements
    - removed pinconf_generic_dump_group() & pinconf_generic_dump_pin
    helpers
    - fixed up corresponding call sites
    - renamed pinconf_generic_dump() to pinconf_generic_dump_pins()
    - added kernel-doc to pinconf_generic_dump_pins()
    - add kernel-doc
    - more verbose commit message

    Signed-off-by: Soren Brinkmann
    Tested-by: Andreas Färber
    Signed-off-by: Linus Walleij

    Soren Brinkmann
     
  • With the new 'groups' property, the DT parser can infer the map type
    from the fact whether 'pins' or 'groups' is used to specify the pin
    group to work on.

    To maintain backwards compatibitliy with current usage of the DT
    binding, this is only done when PIN_MAP_TYPE_INVALID is passed to the
    parsing function as type.

    Also, a new helper 'pinconf_generic_dt_node_to_map_all()' is introduced,
    which can be used by drivers as generic callback for dt_node_to_map() to
    leverage the new feature.

    Changes since v2:
    - rename dt_pin_specifier to subnode_target_type
    - add additional comment in header file explaining passing an invalid
    map type
    - mention map_all() helper in commit message
    Changes since RFC v2:
    - none

    Signed-off-by: Soren Brinkmann
    Tested-by: Andreas Färber
    Signed-off-by: Linus Walleij

    Soren Brinkmann
     

11 Nov, 2014

1 commit


28 Oct, 2014

1 commit

  • When dumping pinconf information in debugfs, config arguments are only
    printed when a unit is present and the argument is != 0. For parameters
    like the slew rate, this does not work. The slew rate uses a driver
    specific format for the argument, i.e. 0 can be a valid argument and a
    unit is not provided for it.
    For that reason, add a flag to enable printing the argument instead of
    inferring it from the presence of a unit and the value of the argument.

    Signed-off-by: Soren Brinkmann
    Signed-off-by: Linus Walleij

    Soren Brinkmann
     

28 May, 2014

1 commit


27 May, 2014

1 commit


16 Dec, 2013

1 commit


29 Aug, 2013

1 commit


23 Aug, 2013

1 commit

  • Add support to pass the config type like GROUP or PIN when using
    the utils or generic pin configuration APIs. This will make the
    APIs more generic.

    Added additional inline APIs such that it can be use directly as
    callback for the pinctrl_ops.

    Changes from V1:
    - Remove separate implementation for pins and group for
    pinctrl_utils_dt_free_map and improve this function
    to support both i.e. PINS and GROUPs.

    Signed-off-by: Laxman Dewangan
    Reviewed-by: Stephen Warren
    Tested-by: Stephen Warren
    Signed-off-by: Linus Walleij

    Laxman Dewangan
     

15 Aug, 2013

1 commit

  • Add generic APIs to map the DT node and its sub node in pinconf generic
    driver. These APIs can be used from driver to parse the DT node who
    uses the pinconf generic APIs for defining their nodes.

    Changes from V1:
    - Add generic property for pins and functions in pinconf-generic.
    - Add APIs to map the DT and subnode.
    - Move common utils APIs to the pinctrl-utils from this file.
    - Update the binding document accordingly.
    Changes from V2:
    - Rebased the pinctrl binding doc on top of Stephen's cleanup.
    - Rename properties "pinctrl-pins" and "pinctrl-function" to
    "pins" and "function".

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

    Laxman Dewangan
     

25 Jun, 2013

2 commits

  • Some options currently take arguments in unspecified driver-specific units.
    As pointed out by Stephen Warren, driver specific values should not be part
    of generic devicetree bindings describing the hardware.

    Therefore remove the critical bindings again, before they become part of
    an official release.

    Signed-off-by: Heiko Stuebner
    Reviewed-by: James Hogan
    Signed-off-by: Linus Walleij

    Heiko Stübner
     
  • Currently the debounce time pinconfig option uses an unspecified
    "time units" unit. As pinconfig options should use SI units and a
    real unit is also necessary for generic dt bindings, change it
    to usec. Currently no driver is using the generic pinconfig option
    for this, so the unit change is safe to do.

    Signed-off-by: Heiko Stuebner
    Reviewed-by: James Hogan
    Signed-off-by: Linus Walleij

    Heiko Stübner
     

18 Jun, 2013

3 commits

  • Allocating the temorary array in pinconf_generic_parse_dt_config on stack
    might cause problems later on, when the number of options grows over time.
    Therefore also allocate this array dynamically to be on the safe side.

    Suggested-by: Laurent Pinchart
    Signed-off-by: Heiko Stuebner
    Reviewed-by: James Hogan
    Signed-off-by: Linus Walleij

    Heiko Stübner
     
  • This adds a shortcut when no valid pinconf properties are found
    in the parsed dt node, to set the values immediately and return.

    Suggested-by: Laurent Pinchart
    Signed-off-by: Heiko Stuebner
    Reviewed-by: James Hogan
    Signed-off-by: Linus Walleij

    Heiko Stübner
     
  • The bias-pull-* options use values > 0 to indicate that the pull should
    be activated and optionally also indicate the strength of the pull.
    Therefore use an default value of 1 for these options.

    Split the low-power-mode option into low-power-enable and -disable.

    Update the documentation to describe the param arguments better.

    Reported-by: James Hogan
    Signed-off-by: Heiko Stuebner
    Signed-off-by: Linus Walleij

    Heiko Stübner
     

16 Jun, 2013

4 commits

  • pinconf_generic_parse_dt_config() takes a node as input and generates an
    array of generic pinconfig values from the properties of this node.

    As I couldn't find a mechanism to count the number of properties of a node
    the function uses internally an array to accept one of parameter and copies
    the real present options to a smaller variable at its end.

    Signed-off-by: Heiko Stuebner
    Signed-off-by: Linus Walleij

    Heiko Stübner
     
  • There exist controllers that don't support to set the pull to up or down
    separately but instead automatically set the pull direction based on
    embedded knowledge inside the controller, for example depending on the
    selected mux function of the pin.

    Therefore this patch adds another config option to use this default
    pull-state for a pin where it is not possible to know or decide if the
    pin will be pulled up or down.

    Signed-off-by: Heiko Stuebner
    Reviewed-by: Stephen Warren
    Signed-off-by: Linus Walleij

    Heiko Stübner
     
  • Add a new PIN_CONFIG_BIAS_BUS_HOLD pin configuration for a bus holder
    pin mode (also known as bus keeper, or repeater). This is a weak latch
    which drives the last value on a tristate bus. Another device on the bus
    can drive the bus high or low before going tristate to change the value
    driven by the pin.

    Signed-off-by: James Hogan
    Cc: Linus Walleij
    Signed-off-by: Linus Walleij

    James Hogan
     
  • Add the drive strength pinconf to debugfs output (with the unit "mA").

    Signed-off-by: James Hogan
    Cc: Linus Walleij
    Signed-off-by: Linus Walleij

    James Hogan