1. 08 6月, 2016 2 次提交
  2. 29 4月, 2016 2 次提交
  3. 23 2月, 2016 1 次提交
  4. 05 1月, 2016 2 次提交
    • L
      gpio: generic: factor into gpio_chip struct · 0f4630f3
      Linus Walleij 提交于
      The separate struct bgpio_chip has been a pain to handle, both
      by being confusingly similar in name to struct gpio_chip and
      for being contained inside a struct so that struct gpio_chip
      is contained in a struct contained in a struct, making several
      steps of dereferencing necessary.
      
      Make things simpler: include the fields directly into
      <linux/gpio/driver.h>, #ifdef:ed for CONFIG_GENERIC_GPIO, and
      get rid of the <linux/basic_mmio_gpio.h> altogether. Prefix
      some of the member variables with bgpio_* and add proper
      kerneldoc while we're at it.
      
      Modify all users to handle the change and use a struct
      gpio_chip directly. And while we're at it: replace all
      container_of() dereferencing by gpiochip_get_data() and
      registering the gpio_chip with gpiochip_add_data().
      
      Cc: arm@kernel.org
      Cc: Alexander Shiyan <shc_work@mail.ru>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
      Cc: Rabin Vincent <rabin@rab.in>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-omap@vger.kernel.org
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: bcm-kernel-feedback-list@broadcom.com
      Acked-by: NGregory Fong <gregory.0xf0@gmail.com>
      Acked-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Acked-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Acked-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Acked-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      0f4630f3
    • L
      gpio: generic: fix signedness bug found by cppcheck · 4b63739e
      Linus Walleij 提交于
      cppcheck reports this:
      
      (style) int result is returned as long value. If the return
      value is long to avoid loss of information, then you have
      loss of information.
      
      This can be fixed with (1UL << pin) but that is the same
      as using <linux/bitops.h> that already use 1UL so take
      this approach.
      Reported-by: NDavid Binderman <dcb314@hotmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      4b63739e
  5. 17 12月, 2015 1 次提交
  6. 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
  7. 27 10月, 2015 1 次提交
    • G
      gpio: generic: Revert to old error handling in bgpio_map · b2f68b63
      Guenter Roeck 提交于
      Returning an error instead of NULL in bgpio_map if
      platform_get_resource_byname does not find a resource was introduced with
      commit cf3f2a2c ("gpio: generic: improve error handling in bgpio_map").
      This results in several qemu runtime failures with default and non-default
      configurations, if attempts are made to boot from mmcblk0. Examples for
      failures with multi_v7_defconfig are
      
      Machine: vexpress-a9	dtb: vexpress-v2p-ca9
      Machine: vexpress-a15	dtb: vexpress-v2p-ca15-tc1
      
      Crash:
      
      VFS: Cannot open root device "mmcblk0" or unknown-block(0,0): error -6
      Please append a correct "root=" boot option; here are the available partitions:
      Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
      
      Looking into the code, always returning an error if bgpio_map fails
      does not appear to make much sense, since the code in bgpio_setup_io
      specifically supports some of the resources to be NULL.
      
      Fixes: cf3f2a2c ("gpio: generic: improve error handling in bgpio_map")
      Cc: Heiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      b2f68b63
  8. 05 10月, 2015 3 次提交
  9. 27 7月, 2015 1 次提交
  10. 16 7月, 2015 1 次提交
  11. 11 5月, 2015 1 次提交
  12. 19 1月, 2015 1 次提交
  13. 22 7月, 2014 1 次提交
  14. 23 5月, 2014 1 次提交
  15. 18 3月, 2014 1 次提交
  16. 06 2月, 2014 2 次提交
  17. 12 4月, 2013 1 次提交
  18. 11 4月, 2013 1 次提交
  19. 29 11月, 2012 3 次提交
  20. 20 5月, 2012 1 次提交
    • S
      gpio/generic: initialize basic_mmio_gpio shadow variables properly · 3e11f7b8
      Shawn Guo 提交于
      It fixes the issue in gpio-generic that commit fb149218 (gpio/mxc: add
      missing initialization of basic_mmio_gpio shadow variables) manged to
      fix in gpio-mxc driver, so that other platform specific drivers do not
      suffer from the same problem over and over again.
      
      Changes since v1:
      * Turn the last parameter of bgpio_init() "bool big_endian" into
        "unsigned long flags" and give those really quirky hardwares a
        chance to tell that reg_set and reg_dir are unreadable.
      Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
      [grant.likely: Fix big-endian usage to explicitly set BBGPIOF_BIG_ENDIAN]
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      3e11f7b8
  21. 02 1月, 2012 1 次提交
  22. 15 9月, 2011 1 次提交
  23. 07 6月, 2011 1 次提交
  24. 20 5月, 2011 9 次提交