1. 11 5月, 2012 2 次提交
    • L
      pinctrl/nomadik: implement pin multiplexing · dbfe8ca2
      Linus Walleij 提交于
      Implements basic pinmux for the Nomadik pin controller.
      
      The plan is to split the existing singular pin config interface
      nmk_config_pin(), nmk_config_pins(), that will configure muxing
      and other settings at the same time, into two interfaces
      by splitting the code in pinmux and pinctrl and eventually
      deleting the old interface and its helper functions when all
      users are gone.
      
      nmk_gpio_set_mode() and nmk_gpio_get_mode() are two older
      interfaces for just configuring muxing/altfunctions that
      will also be replaced in the end.
      
      We take some extra care to handle the glitch-avoidance here,
      but it is simpler now since there is only one altsetting per
      pingroup so we know immediately if we need to avoid altfunc
      C glitches for a certain group.
      
      As part of the makeover implement the .request() and .free()
      calls on the GPIO chips and have them call back into the
      pinctrl layer to reserve GPIOs.
      
      ChangeLog v1->v2:
      - Rebased on pinctrl-mergebase-20120418 so we get the latest
        driver infrastructure where function count is done by a fixed
        value and we can drop a few range checks since this is now
        handled by the core.
      - Include a GPIO muxing hunk erroneously part of the pin config
        patch.
      Acked-by: NStephen Warren <swarren@wwwdotorg.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      dbfe8ca2
    • L
      pinctrl/nomadik: basic Nomadik pinctrl interface · e98ea774
      Linus Walleij 提交于
      This adds a scratch pin control interface to the Nomadik pinctrl
      driver, and defines the pins and groups in the DB8500 ASIC. We
      define GPIO ranges to cover the pins exposed. The DB8500 has
      more pins than this but we restrict the driver to the pins that
      can be controlled from the combined GPIO and pin control hardware
      to begin with.
      
      ChangeLog v1->v2:
      - Base on the latest pinctrl development from
        pinctrl-mergebase-20120418 so we can get rid of legacy
        group count mechanism. Also drop the range checks for group
        index, this is handled by the core now.
      Acked-by: NStephen Warren <swarren@wwwdotorg.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      e98ea774