1. 05 Feb, 2013 2 commits
  2. 30 Jan, 2013 2 commits
  3. 18 Jan, 2013 2 commits
  4. 22 Nov, 2012 1 commit
  5. 11 Nov, 2012 1 commit
  6. 13 Oct, 2012 1 commit
  7. 01 Oct, 2012 1 commit
    • Simon Arlott's avatar
      pinctrl: add bcm2835 driver · e1b2dc70
      Simon Arlott authored
      The BCM2835 GPIO module is a combined GPIO controller, (GPIO) interrupt
      controller, and pinmux/control device.
      Original driver by Simon Arlott.
      Rewrite including GPIO chip device by Chris Boot.
      Upstreaming changes by Stephen Warren:
      * Wrote DT binding documentation.
      * Changed brcm,function to an integer to more directly match the
        datasheet, and to match brcm,pins being an integer.
      * Implemented pull-up/down pin config.
      * Removed read-only DT property and related code. The restriction this
        implemented are driven by the board, not the GPIO HW block, so don't
        really make sense of a HW block binding, were in general incomplete
        (since they could only know about the few pins hard-coded into the
        Raspberry Pi B board design and not the uncommitted GPIOS), and are
        better represented simply by not writing incorrect data into pin
        configuration nodes.
      * Don't set GPIO_IN function select in gpio_request_enable() to avoid
        glitches; defer this to gpio_set_direction(). Consequently, removed
        empty bcm2835_pmx_gpio_request_enable().
      * Simplified enabled_irq_map[]; make it explicitly 1 entry per bank.
      * Lifted use of enabled_irq_map[] outside the per-interrupt loop in
        IRQ handler, thus fixing an issue where the code was indexing into
        enabled_irq_map[] by intra-bank GPIO ID, not global GPIO ID.
      * Removed locking in IRQ handler, since all other code uses
        spin_lock_irqsave() and so guarantees it doesn't run concurrently
        with the handler.
      * Moved duplicated BUILD_BUG_ON()s into probe(). Also check size of
      * Remove range-checking from bcm2835_pctl_get_groups_count() since we've
        decided to trust the pinctrl core.
      * Made bcm2835_pmx_gpio_disable_free() call bcm2835_pinctrl_fsel_set()
        directly for simplicity.
      * Fixed body of dt_free_map() to match latest dt_node_to_map().
      * Removed GPIO ownership check from bcm2835_pmx_enable() since the pinctrl
        core owns doing this.
      * Made irq_chip and pinctrl_gpio_range .name == MODULE_NAME so it's more
      * Simplified remove(); removed call to non-existent
        pinctrl_remove_gpio_range(), remove early return on error.
      * Don't force gpiochip's base to 0. Set gpio_range.base to gpiochip's
        base GPIO number.
      * Error-handling cleanups in probe().
      * Switched to module_platform_driver() rather than open-coding.
      * Made pin, group, and function names lower-case.
      * s/broadcom/brcm/ in DT property names.
      * s/2708/2835/.
      * Fixed a couple minor checkpatch warnings, and other minor cleanup.
      Signed-off-by: default avatarSimon Arlott <simon@fire.lp0.eu>
      Signed-off-by: default avatarChris Boot <bootc@bootc.net>
      Signed-off-by: default avatarStephen Warren <swarren@wwwdotorg.org>
      Signed-off-by: Linus Walleij's avatarLinus Walleij <linus.walleij@linaro.org>
  8. 22 Sep, 2012 5 commits
  9. 13 Sep, 2012 2 commits
  10. 06 Sep, 2012 2 commits
  11. 03 Sep, 2012 3 commits
  12. 14 Jul, 2012 1 commit
  13. 20 May, 2012 2 commits
  14. 11 May, 2012 2 commits
  15. 01 May, 2012 3 commits
  16. 22 Apr, 2012 1 commit
  17. 18 Apr, 2012 2 commits
  18. 12 Mar, 2012 1 commit
    • Linus Walleij's avatar
      pinctrl: introduce generic pin config · 394349f7
      Linus Walleij authored
      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
      - 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_
  19. 06 Mar, 2012 1 commit
  20. 01 Feb, 2012 1 commit
  21. 03 Jan, 2012 3 commits
    • Linus Walleij's avatar
      pinctrl: rename U300 and SIRF pin controllers · 3bece55a
      Linus Walleij authored
      For stringent order, rename the pinmux-* pin controllers to
      pinctrl-* and also rename the Kconfig symbols and in-kernel
      Cc: Rongjun Ying <Rongjun.Ying@csr.com>
      Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
      Acked-by: default avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: Linus Walleij's avatarLinus Walleij <linus.walleij@linaro.org>
    • Linus Walleij's avatar
      pinctrl: add a pin config interface · ae6b4d85
      Linus Walleij authored
      This add per-pin and per-group pin config interfaces for biasing,
      driving and other such electronic properties. The details of passed
      configurations are passed in an opaque unsigned long which may be
      dereferences to integer types, structs or lists on either side
      of the configuration interface.
      ChangeLog v1->v2:
      - Clear split of terminology: we now have pin controllers, and
        those may support two interfaces using vtables: pin
        multiplexing and pin configuration.
      - Break out pin configuration to its own C file, controllers may
        implement only config without mux, and vice versa, so keep each
        sub-functionality of pin controllers separate. Introduce
        CONFIG_PINCONF in Kconfig.
      - Implement some core logic around pin configuration in the
        pinconf.c file.
      - Remove UNKNOWN config states, these were just surplus baggage.
      - Remove FLOAT config state - HIGH_IMPEDANCE should be enough for
      - PIN_CONFIG_POWER_SOURCE added to handle switching the power
        supply for the pin logic between different sources
      - Explicit DISABLE config enums to turn schmitt-trigger,
        wakeup etc OFF.
      - Update documentation to reflect all the recent reasoning.
      ChangeLog v2->v3:
      - Twist API around to pass around arrays of config tuples instead
        of (param, value) pairs everywhere.
      - Explicit drive strength semantics for push/pull and similar
        drive modes, this shall be the number of drive stages vs
        nominal load impedance, which should match the actual
        electronics used in push/pull CMOS or TTY totempoles.
      - Drop load capacitance configuration - I probably don't know
        what I'm doing here so leave it out.
      - Drop PIN_CONFIG_INPUT_SCHMITT_OFF, instead the argument zero to
        PIN_CONFIG_INPUT_SCHMITT turns schmitt trigger off.
      - Drop PIN_CONFIG_NORMAL_POWER_MODE and have a well defined
        argument to PIN_CONFIG_LOW_POWER_MODE to get out of it instead.
      - Drop PIN_CONFIG_WAKEUP_ENABLE/DISABLE and just use
        PIN_CONFIG_WAKEUP with defined value zero to turn wakeup off.
      - Add PIN_CONFIG_INPUT_DEBOUNCE for configuring debounce time
        on input lines.
      - Fix a bug when we tried to configure pins for pin controllers
        without pinconf support.
      - Initialized debugfs properly so it works.
      - Initialize the mutex properly and lock around config tampering
      - Check the return value from get_initial_config() properly.
      ChangeLog v3->v4:
      - Export the pin_config_get(), pin_config_set() and
        pin_config_group() functions.
      - Drop the entire concept of just getting initial config and
        keeping track of pin states internally, instead ask the pins
        what state they are in. Previous idea was plain wrong, if the
        device cannot keep track of its state, the driver should do
      - Drop the generic configuration layout, it seems this impose
        too much restriction on some pin controllers, so let them do
        things the way they want and split off support for generic
        config as an optional add-on.
      ChangeLog v4->v5:
      - Introduce two symmetric driver calls for group configuration,
        .pin_config_group_[get|set] and corresponding external calls.
      - Remove generic semantic meanings of return values from config
        calls, these belong in the generic config patch. Just pass the
        return value through instead.
      - Add a debugfs entry "pinconf-groups" to read status from group
        configuration only, also slam in a per-group debug callback in
        the pinconf_ops so custom drivers can display something
        meaningful for their pins.
      - Fix some dangling newline.
      - Drop dangling #else clause.
      - Update documentation to match the above.
      ChangeLog v5->v6:
      - Change to using a pin name as parameter for the
        [get|set]_config() functions, as suggested by Stephen Warren.
        This is more natural as names will be what a developer has
        access to in written documentation etc.
      ChangeLog v6->v7:
      - Refactor out by-pin and by-name get/set functions, only expose
        the by-name functions externally, expose the by-pin functions
      - Show supported pin control functionality in the debugfs
        pinctrl-devices file.
      Acked-by: default avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: Linus Walleij's avatarLinus Walleij <linus.walleij@linaro.org>
    • Linus Walleij's avatar
      pinctrl: move the U300 GPIO driver to pinctrl · ca402d37
      Linus Walleij authored
      This driver will be converted to a dual GPIO + pinctrl driver
      since it supports biasing and driving control options. Hopefully
      it can serve as an example.
      Signed-off-by: Linus Walleij's avatarLinus Walleij <linus.walleij@linaro.org>
  22. 08 Dec, 2011 1 commit