1. 03 12月, 2014 1 次提交
  2. 29 10月, 2014 2 次提交
  3. 20 10月, 2014 1 次提交
  4. 23 9月, 2014 3 次提交
  5. 05 9月, 2014 2 次提交
  6. 04 9月, 2014 1 次提交
  7. 17 8月, 2014 1 次提交
  8. 11 7月, 2014 3 次提交
    • R
      pinctrl: pinctrl-at91.c: Cleaning up values that are never used · 445d2026
      Rickard Strandqvist 提交于
      Remove variable that are never used
      
      This was found using a static code analysis program called cppcheck.
      Signed-off-by: NRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      445d2026
    • R
      pinctrl: pinctrl-at91.c: Cleaning up if unsigned is less than zero · ca7162ad
      Rickard Strandqvist 提交于
      Remove checking if a unsigned is less than zero
      
      This was found using a static code analysis program called cppcheck.
      Signed-off-by: NRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      ca7162ad
    • F
      pinctrl: avoid duplicated calling enable_pinmux_setting for a pin · 2243a87d
      Fan Wu 提交于
      What the patch does:
      1. Call pinmux_disable_setting ahead of pinmux_enable_setting
        each time pinctrl_select_state is called
      2. Remove the HW disable operation in pinmux_disable_setting function.
      3. Remove the disable ops in struct pinmux_ops
      4. Remove all the disable ops users in current code base.
      
      Notes:
      1. Great thanks for the suggestion from Linus, Tony Lindgren and
         Stephen Warren and Everyone that shared comments on this patch.
      2. The patch also includes comment fixes from Stephen Warren.
      
      The reason why we do this:
      1. To avoid duplicated calling of the enable_setting operation
         without disabling operation inbetween which will let the pin
         descriptor desc->mux_usecount increase monotonously.
      2. The HW pin disable operation is not useful for any of the
         existing platforms.
         And this can be used to avoid the HW glitch after using the
         item #1 modification.
      
      In the following case, the issue can be reproduced:
      1. There is a driver that need to switch pin state dynamically,
         e.g. between "sleep" and "default" state
      2. The pin setting configuration in a DTS node may be like this:
      
        component a {
      	pinctrl-names = "default", "sleep";
      	pinctrl-0 = <&a_grp_setting &c_grp_setting>;
      	pinctrl-1 = <&b_grp_setting &c_grp_setting>;
        }
      
        The "c_grp_setting" config node is totally identical, maybe like
        following one:
      
        c_grp_setting: c_grp_setting {
      	pinctrl-single,pins = <GPIO48 AF6>;
        }
      
      3. When switching the pin state in the following official pinctrl
         sequence:
      	pin = pinctrl_get();
      	state = pinctrl_lookup_state(wanted_state);
      	pinctrl_select_state(state);
      	pinctrl_put();
      
      Test Result:
      1. The switch is completed as expected, that is: the device's
         pin configuration is changed according to the description in the
         "wanted_state" group setting
      2. The "desc->mux_usecount" of the corresponding pins in "c_group"
         is increased without being decreased, because the "desc" is for
         each physical pin while the setting is for each setting node
         in the DTS.
         Thus, if the "c_grp_setting" in pinctrl-0 is not disabled ahead
         of enabling "c_grp_setting" in pinctrl-1, the desc->mux_usecount
         will keep increasing without any chance to be decreased.
      
      According to the comments in the original code, only the setting,
      in old state but not in new state, will be "disabled" (calling
      pinmux_disable_setting), which is correct logic but not intact. We
      still need consider case that the setting is in both old state
      and new state. We can do this in the following two ways:
      
      1. Avoid to "enable"(calling pinmux_enable_setting) the "same pin
         setting" repeatedly
      2. "Disable"(calling pinmux_disable_setting) the "same pin setting",
         actually two setting instances, ahead of enabling them.
      
      Analysis:
      1. The solution #2 is better because it can avoid too much
         iteration.
      2. If we disable all of the settings in the old state and one of
         the setting(s) exist in the new state, the pins mux function
         change may happen when some SoC vendors defined the
         "pinctrl-single,function-off"
         in their DTS file.
         old_setting => disabled_setting => new_setting.
      3. In the pinmux framework, when a pin state is switched, the
         setting in the old state should be marked as "disabled".
      
      Conclusion:
      1. To Remove the HW disabling operation to above the glitch mentioned
         above.
      2. Handle the issue mentioned above by disabling all of the settings
         in old state and then enable the all of the settings in new state.
      Signed-off-by: NFan Wu <fwu@marvell.com>
      Acked-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NPatrice Chotard <patrice.chotard@st.com>
      Acked-by: NHeiko Stuebner <heiko@sntech.de>
      Acked-by: NMaxime Coquelin <maxime.coquelin@st.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      2243a87d
  9. 27 5月, 2014 1 次提交
    • A
      pinctrl/at91: Fix lockup when IRQ on PIOC and PIOD occurs · cccb0c3e
      Alexander Stein 提交于
      With commit 80cc3732 (pinctrl/at91: convert driver to use gpiolib irqchip)
      gpiochip_set_chained_irqchip is called for PIOC, PIOD and PIOE. The
      associated GPIO chip for the IRQ chip is overwritten each time, because
      they share the same hard IRQ line.
      Thus if an IRQ occurs on PIOC or PIOD, gpio_irq_handler will only check on
      PIOE (the assigned GPIO chip) where no event occured. Thus the IRQ will
      not be cleared, retriggering the ISR.
      Fix that (like done before) by only set the PIOC GPIO chip to the IRQ chip
      and walk the list in the irq handler.
      Signed-off-by: NAlexander Stein <alexanders83@web.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      cccb0c3e
  10. 23 4月, 2014 2 次提交
    • A
      pinctrl/at91: Fix mask creation in at91_gpio_dbg_show · 47f22716
      Alexander Stein 提交于
      pin_to_mask expects a bank pin number. So do not add the chip base.
      
      Without that patch cat /sys/kernel/debug/gpio looks like that:
      GPIOs 0-31, platform/fffff200.gpio, fffff200.gpio:
      [spi32766.0] GPIOfffff200.gpio5: [gpio] set
      [ads7846_pendown] GPIOfffff200.gpio15: [gpio] set
      [ohci_vbus] GPIOfffff200.gpio21: [gpio] set
      [ohci_vbus] GPIOfffff200.gpio24: [gpio] set
      [button1] GPIOfffff200.gpio28: [gpio] clear
      [button2] GPIOfffff200.gpio29: [gpio] clear
      
      GPIOs 32-63, platform/fffff400.gpio, fffff400.gpio:
      [sda] GPIOfffff400.gpio4: [periph A]
      [scl] GPIOfffff400.gpio5: [periph A]
      [spi32766.3] GPIOfffff400.gpio11: [periph A]
      [error] GPIOfffff400.gpio22: [periph A]
      [run] GPIOfffff400.gpio23: [periph A]
      
      GPIOs 64-95, platform/fffff600.gpio, fffff600.gpio:
      [reset_pin] GPIOfffff600.gpio29: [periph A]
      
      GPIOs 96-127, platform/fffff800.gpio, fffff800.gpio:
      [led1] GPIOfffff800.gpio5: [periph A]
      [led2] GPIOfffff800.gpio6: [periph A]
      [led3] GPIOfffff800.gpio7: [periph A]
      [led4] GPIOfffff800.gpio8: [periph A]
      
      GPIOs 128-159, platform/fffffa00.gpio, fffffa00.gpio:
      [button3] GPIOfffffa00.gpio10: [periph A]
      [button4] GPIOfffffa00.gpio12: [periph A]
      
      Note that every bank despite bank 0 only shows "periph A" which are
      obviously used as GPIOs.
      Signed-off-by: NAlexander Stein <alexanders83@web.de>
      Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      47f22716
    • A
      pinctrl/at91: convert driver to use gpiolib irqchip · 80cc3732
      Alexander Stein 提交于
      This converts the AT91 pin control driver to register its
      chained irq handler and irqchip using the helpers in the
      gpiolib core.
      Signed-off-by: NAlexander Stein <alexanders83@web.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      80cc3732
  11. 25 2月, 2014 1 次提交
  12. 10 2月, 2014 1 次提交
  13. 03 2月, 2014 1 次提交
  14. 16 12月, 2013 2 次提交
  15. 13 12月, 2013 1 次提交
  16. 12 12月, 2013 2 次提交
  17. 04 12月, 2013 1 次提交
    • L
      gpio/pinctrl: make gpio_chip members typed boolean · 9fb1f39e
      Linus Walleij 提交于
      This switches the two members of struct gpio_chip that were
      defined as unsigned foo:1 to bool, because that is indeed what
      they are. Switch all users in the gpio and pinctrl subsystems
      to assign these values with true/false instead of 0/1. The
      users outside these subsystems will survive since true/false
      is 1/0, atleast we set some kind of more strict typing example.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      9fb1f39e
  18. 05 11月, 2013 1 次提交
  19. 23 10月, 2013 1 次提交
  20. 08 10月, 2013 1 次提交
    • S
      pinctrl: remove redundant of_match_ptr · 606fca94
      Sachin Kamat 提交于
      The data structure of_match_ptr() protects is always compiled in.
      Hence of_match_ptr() is not needed.
      
      This is a squash commit of:
      pinctrl: at91: Remove redundant of_match_ptr
      pinctrl: exynos5440: Remove redundant of_match_ptr
      pinctrl: imx35: Remove redundant of_match_ptr
      pinctrl: imx51: Remove redundant of_match_ptr
      pinctrl: imx53: Remove redundant of_match_ptr
      pinctrl: imx6dl: Remove redundant of_match_ptr
      pinctrl: imx6q: Remove redundant of_match_ptr
      pinctrl: samsung: Remove redundant of_match_ptr
      pinctrl: vf610: Remove redundant of_match_ptr
      pinctrl: imx6sl: Remove redundant of_match_ptr
      pinctrl: plgpio: Remove redundant of_match_ptr
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      606fca94
  21. 27 9月, 2013 2 次提交
  22. 29 8月, 2013 1 次提交
  23. 28 8月, 2013 1 次提交
  24. 08 8月, 2013 1 次提交
  25. 16 6月, 2013 1 次提交
  26. 28 3月, 2013 2 次提交
  27. 27 3月, 2013 1 次提交
  28. 14 3月, 2013 1 次提交
  29. 07 3月, 2013 1 次提交