1. 14 8月, 2017 2 次提交
  2. 29 6月, 2017 1 次提交
  3. 29 5月, 2017 1 次提交
    • P
      pinctrl: bcm: clean up modular vs. non-modular distinctions · 34f46848
      Paul Gortmaker 提交于
      Fixups here tend to be more of a conglomerate of some of the other
      repeated/systematic ones we've seen in the earlier pinctrl cleanups.
      
      We remove module.h from code that isn't doing anything modular at
      all;  if they have __init sections, then replace it with init.h
      
      One driver has a .remove that would be dispatched on module_exit,
      and as that code is essentially orphaned, so we remove it.  In case
      anyone was previously doing the (pointless) unbind to get to that
      function, we disable unbind for this one driver as well.
      
      A couple bool drivers (hence non-modular) are converted over to
      to builtin_platform_driver().
      
      Since module_platform_driver() uses the same init level priority as
      builtin_platform_driver() the init ordering remains unchanged with
      this commit.
      
      Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
      
      We also delete the MODULE_LICENSE tag etc. since all that information
      was (or is now) contained at the top of the file in the comments.
      
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Jon Mason <jonmason@broadcom.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Ray Jui <rjui@broadcom.com>
      Cc: Scott Branden <sbranden@broadcom.com>
      Cc: Sherman Yin <syin@broadcom.com>
      Cc: bcm-kernel-feedback-list@broadcom.com
      Cc: linux-gpio@vger.kernel.org
      Cc: linux-rpi-kernel@lists.infradead.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Tested-by: NStefan Wahren <stefan.wahren@i2se.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      34f46848
  4. 07 12月, 2016 1 次提交
    • L
      pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP · 85ae9e51
      Linus Walleij 提交于
      It should be possible to use the GPIOLIB_IRQCHIP helper
      library with the BCM2835 driver since it is a pretty straight
      forward cascaded irqchip.
      
      The only difference from other drivers is that the BCM2835
      has several banks for a single gpiochip, and each bank has
      a separate IRQ line. Instead of creating one gpiochip per
      bank, a single gpiochip covers all banks GPIO lines. This
      makes it necessary to resolve the bank ID in the IRQ
      handler.
      
      The GPIOLIB_IRQCHIP allows several IRQs to be cascaded off
      the same gpiochip by calling gpiochip_set_chained_irqchip()
      repeatedly, but we have been a bit short on examples
      for how this should be handled in practice, so this is intended
      as an example of how this can be achieved.
      
      The old code did not model the chip as a chained interrupt
      handler, but this patch also rectifies that situation.
      
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Tested-by: NStefan Wahren <stefan.wahren@i2se.com>
      Tested-by: NEric Anholt <eric@anholt.net>
      Acked-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      85ae9e51
  5. 15 11月, 2016 2 次提交
  6. 04 11月, 2016 1 次提交
  7. 18 10月, 2016 1 次提交
  8. 21 4月, 2016 1 次提交
  9. 01 4月, 2016 1 次提交
  10. 08 3月, 2016 1 次提交
  11. 05 1月, 2016 1 次提交
  12. 22 12月, 2015 1 次提交
  13. 14 12月, 2015 1 次提交
  14. 19 11月, 2015 1 次提交
    • L
      gpio: change member .dev to .parent · 58383c78
      Linus Walleij 提交于
      The name .dev in a struct is normally reserved for a struct device
      that is let us say a superclass to the thing described by the struct.
      struct gpio_chip stands out by confusingly using a struct device *dev
      to point to the parent device (such as a platform_device) that
      represents the hardware. As we want to give gpio_chip:s real devices,
      this is not working. We need to rename this member to parent.
      
      This was done by two coccinelle scripts, I guess it is possible to
      combine them into one, but I don't know such stuff. They look like
      this:
      
      @@
      struct gpio_chip *var;
      @@
      -var->dev
      +var->parent
      
      and:
      
      @@
      struct gpio_chip var;
      @@
      -var.dev
      +var.parent
      
      and:
      
      @@
      struct bgpio_chip *var;
      @@
      -var->gc.dev
      +var->gc.parent
      
      Plus a few instances of bgpio that I couldn't figure out how
      to teach Coccinelle to rewrite.
      
      This patch hits all over the place, but I *strongly* prefer this
      solution to any piecemal approaches that just exercise patch
      mechanics all over the place. It mainly hits drivers/gpio and
      drivers/pinctrl which is my own backyard anyway.
      
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Rafał Miłecki <zajec5@gmail.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
      Cc: Alek Du <alek.du@intel.com>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.com>
      Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: NLee Jones <lee.jones@linaro.org>
      Acked-by: NJiri Kosina <jkosina@suse.cz>
      Acked-by: NHans-Christian Egtvedt <egtvedt@samfundet.no>
      Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      58383c78
  15. 17 10月, 2015 1 次提交
  16. 28 7月, 2015 1 次提交
    • R
      pinctrl: kill off set_irq_flags usage · 9458120e
      Rob Herring 提交于
      set_irq_flags is ARM specific with custom flags which have genirq
      equivalents. Convert drivers to use the genirq interfaces directly, so we
      can kill off set_irq_flags. The translation of flags is as follows:
      
      IRQF_VALID -> !IRQ_NOREQUEST
      IRQF_PROBE -> !IRQ_NOPROBE
      IRQF_NOAUTOEN -> IRQ_NOAUTOEN
      
      For IRQs managed by an irqdomain, the irqdomain core code handles clearing
      and setting IRQ_NOREQUEST already, so there is no need to do this in
      .map() functions and we can simply remove the set_irq_flags calls. Some
      users also modify IRQ_NOPROBE and this has been maintained although it
      is not clear that is really needed. There appears to be a great deal of
      blind copy and paste of this code.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Lee Jones <lee@kernel.org>
      Cc: Matthias Brugger <matthias.bgg@gmail.com>
      Cc: Tomasz Figa <tomasz.figa@gmail.com>
      Cc: Thomas Abraham <thomas.abraham@linaro.org>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: linux-gpio@vger.kernel.org
      Cc: linux-rpi-kernel@lists.infradead.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-mediatek@lists.infradead.org
      Cc: linux-samsung-soc@vger.kernel.org
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      9458120e
  17. 20 7月, 2015 1 次提交
  18. 18 7月, 2015 1 次提交
  19. 10 6月, 2015 1 次提交
  20. 08 4月, 2015 1 次提交
  21. 27 3月, 2015 1 次提交
  22. 18 3月, 2015 1 次提交
  23. 20 10月, 2014 1 次提交
  24. 04 9月, 2014 1 次提交
  25. 11 7月, 2014 1 次提交
    • 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
  26. 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
  27. 28 8月, 2013 1 次提交
  28. 18 6月, 2013 1 次提交
  29. 04 4月, 2013 1 次提交
  30. 07 3月, 2013 1 次提交
  31. 23 1月, 2013 1 次提交
  32. 04 1月, 2013 1 次提交
    • G
      Drivers: pinctrl: remove __dev* attributes. · 150632b0
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
      Cc: Barry Song <baohua.song@csr.com>
      Cc: Viresh Kumar <viresh.linux@gmail.com>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      150632b0
  33. 29 11月, 2012 2 次提交
  34. 12 11月, 2012 1 次提交
  35. 15 10月, 2012 3 次提交