17 Sep, 2009

1 commit

  • Add support for the GPIO pins on the WM831x. No direct support is
    currently supplied for configuring non-gpiolib functionality such
    as pull configuration and alternate functions, soft configuration
    of these will be provided in a future patch.

    Currently use of these pins as interrupts is not supported due to
    the ongoing issues with generic irq not support interrupt controllers
    on interrupt driven buses. Users can directly request the interrupts
    with the wm831x-specific APIs currently provided if required.

    Signed-off-by: Mark Brown
    Acked-by: David Brownell
    Signed-off-by: Samuel Ortiz

    Mark Brown
     

13 Jul, 2009

1 commit

  • * Remove smp_lock.h from files which don't need it (including some headers!)
    * Add smp_lock.h to files which do need it
    * Make smp_lock.h include conditional in hardirq.h
    It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT

    This will make hardirq.h inclusion cheaper for every PREEMPT=n config
    (which includes allmodconfig/allyesconfig, BTW)

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

03 Jul, 2009

2 commits


01 Jul, 2009

2 commits


20 Jun, 2009

1 commit

  • This is a driver for the ARM PrimeCell PL061 GPIO AMBA peripheral. The
    driver is implemented using the gpiolib framework.

    This driver also includes support for the use of the PL061 as an interrupt
    controller (secondary).

    Signed-off-by: Baruch Siach
    Cc: David Brownell
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Baruch Siach
     

19 Jun, 2009

4 commits

  • PCA9556 is the software-compatible predecessor to the PCA9557, so add it
    to the supported I2C device ID table.

    Signed-off-by: Nate Case
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nate Case
     
  • On OpenFirmware platforms, it makes the most sense to get platform_data
    from the device tree. Make an attempt to translate OF node properties
    into platform_data struct before bailing out.

    Note that the implementation approach taken differs from other device
    drivers that make use of device tree information. This is because I2C
    chips are already registered automatically by of_i2c, so we can get by
    with a small translator function in the driver.

    [akpm@linux-foundation.org: coding-style fixes]
    [akpm@linux-foundation.org: kfree(NULL) is legal]
    Signed-off-by: Nate Case
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nate Case
     
  • The remove member of the spi_driver max7301_driver uses __devexit_p(), so
    the remove function itself should be marked with __devexit. Even more so
    considering the probe function is marked with __devinit.

    Signed-off-by: Mike Frysinger
    Acked-by: Juergen Beisert
    Cc: Dmitry Baryshkov
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • Add support to the PCA953x driver to use the GPIOLIB naming facility for
    GPIOs.

    Signed-off-by: Daniel Silverstone
    Cc: Ben Gardner
    Cc: Jean Delvare
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Silverstone
     

21 May, 2009

1 commit


04 Apr, 2009

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (28 commits)
    trivial: Update my email address
    trivial: NULL noise: drivers/mtd/tests/mtd_*test.c
    trivial: NULL noise: drivers/media/dvb/frontends/drx397xD_fw.h
    trivial: Fix misspelling of "Celsius".
    trivial: remove unused variable 'path' in alloc_file()
    trivial: fix a pdlfush -> pdflush typo in comment
    trivial: jbd header comment typo fix for JBD_PARANOID_IOFAIL
    trivial: wusb: Storage class should be before const qualifier
    trivial: drivers/char/bsr.c: Storage class should be before const qualifier
    trivial: h8300: Storage class should be before const qualifier
    trivial: fix where cgroup documentation is not correctly referred to
    trivial: Give the right path in Documentation example
    trivial: MTD: remove EOL from MODULE_DESCRIPTION
    trivial: Fix typo in bio_split()'s documentation
    trivial: PWM: fix of #endif comment
    trivial: fix typos/grammar errors in Kconfig texts
    trivial: Fix misspelling of firmware
    trivial: cgroups: documentation typo and spelling corrections
    trivial: Update contact info for Jochen Hein
    trivial: fix typo "resgister" -> "register"
    ...

    Linus Torvalds
     

03 Apr, 2009

2 commits

  • We want to phase out the GPIO "autorequest" mechanism in gpiolib and
    require all callers to use gpio_request().

    - Update feature-removal-schedule
    - Update the documentation now
    - Convert the relevant pr_warning() in gpiolib to a WARN()
    so folk using this mechanism get a noisy stack dump

    Some drivers and board init code will probably need to change.
    Implementations not using gpiolib will still be fine; they are already
    required to implement gpio_{request,free}() stubs.

    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Allow GPIOs in GPIOLIB chips to be named. This name is then used when the
    GPIO is exported to sysfs, although it could be used elsewhere if deemed
    useful.

    Signed-off-by: Daniel Silverstone
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Silverstone
     

30 Mar, 2009

1 commit


25 Mar, 2009

1 commit


30 Jan, 2009

1 commit


16 Jan, 2009

1 commit

  • 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: Ben Dooks
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     

07 Jan, 2009

4 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (60 commits)
    uio: make uio_info's name and version const
    UIO: Documentation for UIO ioport info handling
    UIO: Pass information about ioports to userspace (V2)
    UIO: uio_pdrv_genirq: allow custom irq_flags
    UIO: use pci_ioremap_bar() in drivers/uio
    arm: struct device - replace bus_id with dev_name(), dev_set_name()
    libata: struct device - replace bus_id with dev_name(), dev_set_name()
    avr: struct device - replace bus_id with dev_name(), dev_set_name()
    block: struct device - replace bus_id with dev_name(), dev_set_name()
    chris: struct device - replace bus_id with dev_name(), dev_set_name()
    dmi: struct device - replace bus_id with dev_name(), dev_set_name()
    gadget: struct device - replace bus_id with dev_name(), dev_set_name()
    gpio: struct device - replace bus_id with dev_name(), dev_set_name()
    gpu: struct device - replace bus_id with dev_name(), dev_set_name()
    hwmon: struct device - replace bus_id with dev_name(), dev_set_name()
    i2o: struct device - replace bus_id with dev_name(), dev_set_name()
    IA64: struct device - replace bus_id with dev_name(), dev_set_name()
    i7300_idle: struct device - replace bus_id with dev_name(), dev_set_name()
    infiniband: struct device - replace bus_id with dev_name(), dev_set_name()
    ISDN: struct device - replace bus_id with dev_name(), dev_set_name()
    ...

    Linus Torvalds
     
  • Minor updates to the pca953x GPIO expander driver: handle several more
    compatible parts, and stop assuming that the I2C layer's return codes are
    garbage (that's now been fixed).

    Signed-off-by: David Brownell
    Cc: Eric Miao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Provide a static debounce configuration mechanism for twl4030 GPIOs,
    replacing the previous dynamic one. The single user of that mechanism was
    for MMC card detect debouncing.

    Boards can provide a bitmask saying which GPIOs to debounce (30 msec).
    It's always enabled for pins with the MMC card-detect/VMMCx link active,
    so most boards won't need to set the debounce mask.

    This is a net code shrink, including runtime footprint.

    Signed-off-by: David Brownell
    Signed-off-by: Tony Lindgren
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

20 Nov, 2008

1 commit

  • There are already various drivers having bigger label than 12 bytes. Most
    of them fit well under 20 bytes but make column width exact so that
    oversized labels don't mess up output alignment.

    Signed-off-by: Jarkko Nikula
    Acked-by: David Brownell
    Cc: [2.6.26.x, 2.6.26.x, 2.6.27.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jarkko Nikula
     

13 Nov, 2008

1 commit

  • This driver supports the Xilinx XPS GPIO IP core which has the typical
    GPIO features.

    Signed-off-by: Kiran Sutariya
    Signed-off-by: John Linn
    Cc: David Brownell
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Kumar Gala
    Cc: "Grant Likely"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    John Linn
     

22 Oct, 2008

1 commit

  • This adds basic support for the GPIOs in the twl4030 power management
    chip. That includes two open drain LED drivers, and the use of GPIO-0
    (and GPIO-1) as MMC/SD card detect switches which can control whether
    the VMMC1 (and VMMC2) regulators are active.

    This version of the code has a debounce call that will probably be
    replaced before long, when a more generic interface exists.

    Signed-off-by: David Brownell
    Signed-off-by: Tony Lindgren
    Signed-off-by: Samuel Ortiz

    David Brownell
     

21 Oct, 2008

1 commit

  • …/git/tip/linux-2.6-tip

    This merges branches irq/genirq, irq/sparseirq-v4, timers/hpet-percpu
    and x86/uv.

    The sparseirq branch is just preliminary groundwork: no sparse IRQs are
    actually implemented by this tree anymore - just the new APIs are added
    while keeping the old way intact as well (the new APIs map 1:1 to
    irq_desc[]). The 'real' sparse IRQ support will then be a relatively
    small patch ontop of this - with a v2.6.29 merge target.

    * 'genirq-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (178 commits)
    genirq: improve include files
    intr_remapping: fix typo
    io_apic: make irq_mis_count available on 64-bit too
    genirq: fix name space collisions of nr_irqs in arch/*
    genirq: fix name space collision of nr_irqs in autoprobe.c
    genirq: use iterators for irq_desc loops
    proc: fixup irq iterator
    genirq: add reverse iterator for irq_desc
    x86: move ack_bad_irq() to irq.c
    x86: unify show_interrupts() and proc helpers
    x86: cleanup show_interrupts
    genirq: cleanup the sparseirq modifications
    genirq: remove artifacts from sparseirq removal
    genirq: revert dynarray
    genirq: remove irq_to_desc_alloc
    genirq: remove sparse irq code
    genirq: use inline function for irq_to_desc
    genirq: consolidate nr_irqs and for_each_irq_desc()
    x86: remove sparse irq from Kconfig
    genirq: define nr_irqs for architectures with GENERIC_HARDIRQS=n
    ...

    Linus Torvalds
     

20 Oct, 2008

2 commits

  • We can get the following oops from gpio_get_value_cansleep() when a GPIO
    controller doesn't provide a get() callback:

    Unable to handle kernel paging request for instruction fetch
    Faulting instruction address: 0x00000000
    Oops: Kernel access of bad area, sig: 11 [#1]
    [...]
    NIP [00000000] 0x0
    LR [c0182fb0] gpio_get_value_cansleep+0x40/0x50
    Call Trace:
    [c7b79e80] [c0183f28] gpio_value_show+0x5c/0x94
    [c7b79ea0] [c01a584c] dev_attr_show+0x30/0x7c
    [c7b79eb0] [c00d6b48] fill_read_buffer+0x68/0xe0
    [c7b79ed0] [c00d6c54] sysfs_read_file+0x94/0xbc
    [c7b79ef0] [c008f24c] vfs_read+0xb4/0x16c
    [c7b79f10] [c008f580] sys_read+0x4c/0x90
    [c7b79f40] [c0013a14] ret_from_syscall+0x0/0x38

    It's OK to request the value of *any* GPIO; most GPIOs are bidirectional,
    so configuring them as outputs just enables an output driver and doesn't
    disable the input logic.

    So the problem is that gpio_get_value_cansleep() isn't making the same
    sanity check that gpio_get_value() does: making sure this GPIO isn't one
    of the atypical "no input logic" cases.

    Reported-by: Anton Vorontsov
    Signed-off-by: David Brownell
    Cc: [2.6.27.x, 2.6.26.x, 2.6.25.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • gpiolib can export GPIOs to userspace via sysfs. This patch modifies the
    gpio_value_show() so that any non-zero value is explicitly printed as "1",
    rather than whatever numerical value the lower-level driver returns.

    Signed-off-by: Steve Falco
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Steven A. Falco
     

17 Oct, 2008

6 commits

  • Add a new internal mechanism to gpiolib to support low power
    operations by letting gpio_chip instances see when their GPIOs
    are in use. When no GPIOs are active, chips may be able to
    enter lower powered runtime states by disabling clocks and/or
    power domains.

    Signed-off-by: David Brownell
    Cc: "Magnus Damm"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Add a new gpiolib mechanism: gpio_chip instances can provide mappings
    between their (input) GPIOs and any associated IRQs. This makes it easier
    for platforms to support IRQs that are provided by board-specific external
    chips instead of as part of their core (such as SOC-integrated GPIOs).

    Also update the irq_to_gpio() description, saying to avoid it because it's
    not always supported.

    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Make the I2C external GPIO expander drivers register themselves at
    subsys_initcall() time when they're statically linked.

    SOC-integrated GPIOs are available starting very early -- early in
    arch_initcall() at latest, but often even before initcalls start to run --
    so this improves consistency, so more subsystems can rely on GPIOs in
    their own subsys_initcall() code.

    (This isn't a theoretical problem. This is one of several patches needed
    to resolve oopsing observed when statically linking kernels on a DaVinci
    EVM. Its pcf857x GPIOs needed to be available well before some other
    drivers initialized.)

    Signed-off-by: David Brownell
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • According to the documentation gpio_free should only be called from task
    context only. To make this more explicit add a might sleep to all
    implementations.

    This is the generic part which changes gpiolib and the fallback
    implementation only.

    Signed-off-by: Uwe Kleine-König
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • There is a small race and code ugliness in max7301: pins are reconfigured
    after the chip is registered. Swap these calls so that the device is
    registered in correct state.

    Also this fixes the comile-time warning about unchecked gpiochip_remove.

    Signed-off-by: Dmitry Baryshkov
    Cc: Juergen Beisert
    Cc: Guennadi Liakhovetski
    Cc: Russell King
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Baryshkov
     
  • Make the SPI external GPIO expander drivers register themselves at
    subsys_initcall() time when they're statically linked, and make the SPI
    core do its driver model initialization earlier so that's safe.

    SOC-integrated GPIOs are available starting very early -- often before
    initcalls start to run, or earily in arch_initcall() at latest -- so this
    improves consistency, letting more subsystems rely on GPIOs being usable
    by their own subsys_initcall() code.

    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

16 Oct, 2008

1 commit

  • add CONFIG_HAVE_SPARSE_IRQ to for use condensed array.
    Get rid of irq_desc[] array assumptions.

    Preallocate 32 irq_desc, and irq_desc() will try to get more.

    ( No change in functionality is expected anywhere, except the odd build
    failure where we missed a code site or where a crossing commit itroduces
    new irq_desc[] usage. )

    v2: according to Eric, change get_irq_desc() to irq_desc()

    Signed-off-by: Yinghai Lu
    Signed-off-by: Ingo Molnar

    Yinghai Lu
     

26 Jul, 2008

4 commits

  • 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: Jack Ren
    Signed-off-by: Eric Miao
    Acked-by: Jean Delvare
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Miao
     
  • 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: Michael Buesch
    Cc: Benjamin Herrenschmidt
    Cc: Stephen Rothwell
    Cc: David Brownell
    Cc: Russell King
    Cc: Haavard Skinnemoen
    Cc: Jesper Nilsson
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Jean Delvare
    Cc: Samuel Ortiz
    Cc: Kumar Gala
    Cc: Sam Ravnborg
    Cc: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    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: Michael Buesch
    Cc: David Brownell
    Cc: Stephen Rothwell
    Cc: Mauro Carvalho Chehab
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Buesch
     
  • 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: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell