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
     

28 Mar, 2013

2 commits


07 Mar, 2013

1 commit


15 Feb, 2013

1 commit


21 Jan, 2013

1 commit


12 Jan, 2013

1 commit

  • This adds a definition of a generic output configuration
    for a certain pin when using the generic pin configuration
    library. Whereas driving pins low/high is usually a GPIO
    business, you may want to set up pins into a default state
    using hogs, and never touch them again. This helps out
    with that scenario.

    Based on a patch from Patrice Chotard.

    Signed-off-by: Patrice Chotard
    Reviewed-by: Stephen Warren
    Signed-off-by: Linus Walleij

    Linus Walleij
     

21 Nov, 2012

1 commit


13 Mar, 2012

1 commit

  • This is a split-off from the earlier patch set which adds generic
    pin configuration for the pin controllers that want it. Since
    we may have a system with mixed generic and custom pin controllers,
    we pass a boolean in the pin controller ops vtable to indicate
    if it is generic.

    ChangeLog v1->v5:
    - Follow parent patch versioning number system.
    - Document the semantic meaning of return values from pin config
    get functions, so we can iterate over pins and check their
    properties from debugfs as part of the generic config code.
    - Use proper cast functions in the generic debugfs pin config
    file.
    - Expand generic config to optionally cover groups too.
    ChangeLog v5->v6:
    - Update to match underlying changes.
    ChangeLog v6->v7:
    - Drop DRIVE_OFF parameter, use bias high impedance for this
    - Delete argument for drive modes push-pull, od and os. These
    are now just state transitions.
    - Delete slew rate rising/falling due to discussions on on
    proper semantics
    - Drop config wakeup, struct irq_chip does this for now, add
    back if need be.
    - Set PIN_CONFIG_END to 0x7fff making room for custom config
    parameters from 0x8000 and up.
    - Prefix accessor functions with pinconf_

    Linus Walleij