1. 17 9月, 2009 1 次提交
  2. 13 7月, 2009 1 次提交
  3. 03 7月, 2009 2 次提交
  4. 01 7月, 2009 2 次提交
  5. 20 6月, 2009 1 次提交
  6. 19 6月, 2009 4 次提交
  7. 21 5月, 2009 1 次提交
  8. 03 4月, 2009 2 次提交
  9. 30 3月, 2009 1 次提交
  10. 25 3月, 2009 1 次提交
  11. 30 1月, 2009 1 次提交
  12. 16 1月, 2009 1 次提交
    • B
      gpio: fix probe() error return in gpio driver probes · a342d215
      Ben Dooks 提交于
      A number of drivers in drivers/gpio return -ENODEV when confronted with
      missing setup parameters such as the platform data.  However, returning
      -ENODEV causes the driver layer to silently ignore the driver as it
      assumes the probe did not find anything and was only speculative.
      
      To make life easier to discern why a driver is not being attached, change
      to returning -EINVAL, which is a better description of the fact that the
      driver data was not valid.
      
      Also add a set of dev_dbg() statements to the error paths to provide an
      better explanation of the error as there may be more that one point in the
      driver.
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a342d215
  13. 07 1月, 2009 3 次提交
  14. 20 11月, 2008 1 次提交
  15. 13 11月, 2008 1 次提交
  16. 22 10月, 2008 1 次提交
  17. 20 10月, 2008 2 次提交
  18. 17 10月, 2008 6 次提交
  19. 16 10月, 2008 1 次提交
  20. 26 7月, 2008 5 次提交
    • E
      gpio: max732x driver · bbcd6d54
      Eric Miao 提交于
      This adds a driver supporting a family of I2C port expanders from Maxim,
      which includes the MAX7319 and MAX7320-7327 chips.
      
      [dbrownell@users.sourceforge.net: minor fixes]
      Signed-off-by: NJack Ren <jack.ren@marvell.com>
      Signed-off-by: NEric Miao <eric.miao@marvell.com>
      Acked-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bbcd6d54
    • M
      gpiolib: allow user-selection · 7444a72e
      Michael Buesch 提交于
      This patch adds functionality to the gpio-lib subsystem to make it
      possible to enable the gpio-lib code even if the architecture code didn't
      request to get it built in.
      
      The archtitecture code does still need to implement the gpiolib accessor
      functions in its asm/gpio.h file.  This patch adds the implementations for
      x86 and PPC.
      
      With these changes it is possible to run generic GPIO expansion cards on
      every architecture that implements the trivial wrapper functions.  Support
      for more architectures can easily be added.
      Signed-off-by: NMichael Buesch <mb@bu3sch.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Samuel Ortiz <sameo@openedhand.com>
      Cc: Kumar Gala <galak@gate.crashing.org>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Adrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7444a72e
    • M
      gpio: add bt8xxgpio driver · ff1d5c2f
      Michael Buesch 提交于
      This adds the bt8xxgpio driver.  The purpose of the bt8xxgpio driver is to
      export all of the 24 GPIO pins available on Brooktree 8xx chips to the
      kernel GPIO infrastructure.
      
      This makes it possible to use a physically modified BT8xx card as
      cheap digital GPIO card.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NMichael Buesch <mb@bu3sch.de>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ff1d5c2f
    • D
      gpio: mcp23s08 handles multiple chips per chipselect · 8f1cc3b1
      David Brownell 提交于
      Teach the mcp23s08 driver about a curious feature of these chips: up to
      four of them can share the same chipselect, with the SPI signals wired in
      parallel, by matching two bits in the first protocol byte against two
      address lines on the chip.
      
      This is handled by three software changes:
      
        * Platform data now holds an array of per-chip structs, not
          just one chip's address and pullup configuration.
      
        * Probe() and remove() now use another level of structure,
          wrapping an instance of the original structure for each
          mcp23s08 chip sharing that chipselect.
      
        * The HAEN bit is set, so that the hardware address bits can no
          longer be ignored (boot firmware may not have enabled them).
      
      The "one struct per chip" preserves the guts of the current code,
      but platform_data will need minor changes.
      
          OLD:
      	/* incorrect "slave" ID may not have mattered */
      	.slave = 3,
      	.pullups = BIT(3) | BIT(1) | BIT(0),
      
          NEW:
      	/* slave address _must_ match chip's wiring */
      	.chip[3] = {
      		.is_present = true,
      		.pullups = BIT(3) | BIT(1) | BIT(0),
      	},
      
      There's no change in how things _behave_ for spi_device nodes with a
      single mcp23s08 chip.  New multi-chip configurations assign GPIOs in
      sequence, without holes.  The spi_device just resembles a bigger
      controller, but internally it has multiple gpio_chip instances.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8f1cc3b1
    • D
      gpio: sysfs interface · d8f388d8
      David Brownell 提交于
      This adds a simple sysfs interface for GPIOs.
      
          /sys/class/gpio
          	/export ... asks the kernel to export a GPIO to userspace
          	/unexport ... to return a GPIO to the kernel
              /gpioN ... for each exported GPIO #N
      	    /value ... always readable, writes fail for input GPIOs
      	    /direction ... r/w as: in, out (default low); write high, low
      	/gpiochipN ... for each gpiochip; #N is its first GPIO
      	    /base ... (r/o) same as N
      	    /label ... (r/o) descriptive, not necessarily unique
      	    /ngpio ... (r/o) number of GPIOs; numbered N .. N+(ngpio - 1)
      
      GPIOs claimed by kernel code may be exported by its owner using a new
      gpio_export() call, which should be most useful for driver debugging.
      Such exports may optionally be done without a "direction" attribute.
      
      Userspace may ask to take over a GPIO by writing to a sysfs control file,
      helping to cope with incomplete board support or other "one-off"
      requirements that don't merit full kernel support:
      
        echo 23 > /sys/class/gpio/export
      	... will gpio_request(23, "sysfs") and gpio_export(23);
      	use /sys/class/gpio/gpio-23/direction to (re)configure it,
      	when that GPIO can be used as both input and output.
        echo 23 > /sys/class/gpio/unexport
      	... will gpio_free(23), when it was exported as above
      
      The extra D-space footprint is a few hundred bytes, except for the sysfs
      resources associated with each exported GPIO.  The additional I-space
      footprint is about two thirds of the current size of gpiolib (!).  Since
      no /dev node creation is involved, no "udev" support is needed.
      
      Related changes:
      
        * This adds a device pointer to "struct gpio_chip".  When GPIO
          providers initialize that, sysfs gpio class devices become children of
          that device instead of being "virtual" devices.
      
        * The (few) gpio_chip providers which have such a device node have
          been updated.
      
        * Some gpio_chip drivers also needed to update their module "owner"
          field ...  for which missing kerneldoc was added.
      
        * Some gpio_chips don't support input GPIOs.  Those GPIOs are now
          flagged appropriately when the chip is registered.
      
      Based on previous patches, and discussion both on and off LKML.
      
      A Documentation/ABI/testing/sysfs-gpio update is ready to submit once this
      merges to mainline.
      
      [akpm@linux-foundation.org: a few maintenance build fixes]
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
      Cc: Greg KH <greg@kroah.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d8f388d8
  21. 23 7月, 2008 2 次提交