29 Oct, 2010

5 commits


28 Oct, 2010

7 commits

  • In this case the logic is very similar but the IRQs are not exposed and
    the device is not picked up via PCI

    Based on a separate internal whitney point driver by Yin Kangkai.

    Signed-off-by: Alan Cox
    Cc: Yin Kangkai
    Cc: Alek Du
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Deweird this driver.

    Cc: Alek Du
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Topcliff PCH is the platform controller hub that is going to be used in
    Intel's upcoming general embedded platform. All IO peripherals in
    Topcliff PCH are actually devices sitting on AMBA bus. Topcliff PCH has
    GPIO I/F. Using this I/F, it is able to access system devices connected
    to GPIO.

    [akpm@linux-foundation.org: ese DEFINE_PCI_DEVICE_TABLE (per Joe Perches)]
    Signed-off-by: Tomoya MORINAGA
    Reviewed-by: Mark Brown
    Cc: Rabin Vincent
    Cc: Samuel Ortiz
    Cc: Linus Walleij
    Cc: Tomoya MORINAGA
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tomoya MORINAGA
     
  • Implement irq_chip functionality on ADP5588/5587 GPIO expanders. Only
    level sensitive interrupts are supported. Interrupts provided by this
    irq_chip must be requested using request_threaded_irq().

    Signed-off-by: Michael Hennerich
    Signed-off-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Hennerich
     
  • Add support for generic 74x164 serial-in/parallel-out 8-bits shift
    register. This driver can be used as a GPIO output expander.

    [akpm@linux-foundation.org: remove unused local `refresh']
    Signed-off-by: Miguel Gaio
    Signed-off-by: Juhos Gabor
    Signed-off-by: Florian Fainelli
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miguel Gaio
     
  • Some versions of the hardware can trash the IER register if simultaneous
    interrupts occur. This patch works around it by using a local copy of the
    register and restoring it after every interrupt.

    Signed-off-by: Tomas Hallenberg
    Acked-by: Richard Röjfors
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tomas Hallenberg
     
  • The basic GPIO controllers may be found in various on-board FPGA and ASIC
    solutions that are used to control board's switches, LEDs, chip-selects,
    Ethernet/USB PHY power, etc.

    These controllers may not provide any means of pin setup
    (in/out/open drain).

    The driver supports:
    - 8/16/32/64 bits registers;
    - GPIO controllers with clear/set registers;
    - GPIO controllers with a single "data" register;
    - Big endian bits/GPIOs ordering (mostly used on PowerPC).

    Signed-off-by: Anton Vorontsov
    Reviewed-by: Mark Brown
    Cc: David Brownell
    Cc: Samuel Ortiz ,
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     

27 Oct, 2010

1 commit

  • Our Moorestown platform has two max7315 chips which is covered by pca953x
    i2c gpio driver.

    A while ago this driver got updated with nested irq thread support, and it
    broke the compatibity with "request_irq". For example, the gpio_keys.c
    driver can not work with this driver now. This patch fixes the issue by
    switching to generic_handle_irq.

    Also fix the irq_base issue: irq_base == 0 is valid, and a "-1" value
    should mean invalid. IRQ 0 is not a valid IRQ, irq_base of 0 is valid.

    Signed-off-by: Alek Du
    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alek Du
     

25 Oct, 2010

1 commit

  • * 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6:
    mtd/m25p80: add support to parse the partitions by OF node
    of/irq: of_irq.c needs to include linux/irq.h
    of/mips: Cleanup some include directives/files.
    of/mips: Add device tree support to MIPS
    of/flattree: Eliminate need to provide early_init_dt_scan_chosen_arch
    of/device: Rework to use common platform_device_alloc() for allocating devices
    of/xsysace: Fix OF probing on little-endian systems
    of: use __be32 types for big-endian device tree data
    of/irq: remove references to NO_IRQ in drivers/of/platform.c
    of/promtree: add package-to-path support to pdt
    of/promtree: add of_pdt namespace to pdt code
    of/promtree: no longer call prom_ functions directly; use an ops structure
    of/promtree: make drivers/of/pdt.c no longer sparc-only
    sparc: break out some PROM device-tree building code out into drivers/of
    of/sparc: convert various prom_* functions to use phandle
    sparc: stop exporting openprom.h header
    powerpc, of_serial: Endianness issues setting up the serial ports
    of: MTD: Fix OF probing on little-endian systems
    of: GPIO: Fix OF probing on little-endian systems

    Linus Torvalds
     

19 Oct, 2010

1 commit


29 Sep, 2010

1 commit


19 Sep, 2010

1 commit


10 Sep, 2010

1 commit

  • Replace the arbitrary software-reset call from the device-probe
    method, because:

    - It is defective. To work correctly, it should be two byte writes,
    not a single word write. As it stands, it does nothing.

    - Some devices with sx150x expanders installed have their NRESET pins
    ganged on the same line, so resetting one causes the others to reset -
    not a nice thing to do arbitrarily!

    - The probe, usually taking place at boot, implies a recent hard-reset,
    so a software reset at this point is just a waste of energy anyway.

    Therefore, make it optional, defaulting to off, as this will match the
    common case of probing at powerup and also matches the current broken
    no-op behavior.

    Signed-off-by: Gregory Bean
    Reviewed-by: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gregory Bean
     

12 Aug, 2010

2 commits


11 Aug, 2010

6 commits

  • Add support for Semtech SX150-series I2C GPIO expanders. Compatible
    models include:

    8 bits: sx1508q
    16 bits: sx1509q

    Signed-off-by: Gregory Bean
    Cc: David Brownell
    Cc: Jean Delvare
    Cc: Trilok Soni
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gregory Bean
     
  • The pca953x driver requires the use of threaded irqs as its irq
    demultiplexer can sleep. Our irq handler can be called from any context,
    so use request_any_context_irq to allow threaded irqs as well.

    Signed-off-by: Daniel Gl?ckner
    Reported-by: Ian Jeffray
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Gl?ckner
     
  • As sysfs_notify_dirent has been made irq safe, there is no reason to not
    call it directly from irq. With the work_struct removed, the remaining
    element in poll_desc is a sysfs_dirent pointer which may not be NULL. We
    can therefore store it directly in the idr and pass it as context to the
    irq handler.

    Most part of the patch deals with renaming defines and variables to
    reflect their new use without functional change.

    I also took the opportunity to initialize the idr statically.

    Signed-off-by: Daniel Gl?ckner
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Gl?ckner
     
  • Be more consistent about runtime programming interface abuse warnings,
    which can reduce some confusion and trigger bugfixes. Based on an
    observation and patch from Jani Nikula.

    Also update doc to highlight some sleeping-call issues and to match some
    recent changes.

    Signed-off-by: David Brownell
    Cc: Jani Nikula
    Cc: "Ryan Mallon"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Provide sane defaults for pcf857x, so the driver can be used w/o providing
    platform data (and thus can be simply bound via OF tree).

    Signed-off-by: Dmitry Eremin-Solenikov
    Cc: Jean Delvare
    Cc: David Brownell
    Cc: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Eremin-Solenikov
     
  • The gpios on the max730x chips have support for internal pullups while in
    input mode.

    This patch adds support for configuring these pullups via platform data.
    A new member ("input_pullup_active") to the platform data struct is
    introduced. A set bit in this variable activates the pullups while the
    respective port is in input mode. This is a compatible enhancement since
    unset bits lead to disables pullups which was the default in the original
    driver.

    _Note_: the 4 lowest bits in "input_pullup_active" are unused because the
    first 4 ports of the controller are not used, too.

    Signed-off-by: Marc Kleine-Budde
    Reviewed-by: Wolfram Sang
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marc Kleine-Budde
     

06 Aug, 2010

1 commit

  • * 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (63 commits)
    of/platform: Register of_platform_drivers with an "of:" prefix
    of/address: Clean up function declarations
    of/spi: call of_register_spi_devices() from spi core code
    of: Provide default of_node_to_nid() implementation.
    of/device: Make of_device_make_bus_id() usable by other code.
    of/irq: Fix endian issues in parsing interrupt specifiers
    of: Fix phandle endian issues
    of/flattree: fix of_flat_dt_is_compatible() to match the full compatible string
    of: remove of_default_bus_ids
    of: make of_find_device_by_node generic
    microblaze: remove references to of_device and to_of_device
    sparc: remove references to of_device and to_of_device
    powerpc: remove references to of_device and to_of_device
    of/device: Replace of_device with platform_device in includes and core code
    of/device: Protect against binding of_platform_drivers to non-OF devices
    of: remove asm/of_device.h
    of: remove asm/of_platform.h
    of/platform: remove all of_bus_type and of_platform_bus_type references
    of: Merge of_platform_bus_type with platform_bus_type
    drivercore/of: Add OF style matching to platform bus
    ...

    Fix up trivial conflicts in arch/microblaze/kernel/Makefile due to just
    some obj-y removals by the devicetree branch, while the microblaze
    updates added a new file.

    Linus Torvalds
     

31 Jul, 2010

1 commit


28 Jul, 2010

1 commit

  • When freeing a gpio that has not been exported, gpio_unexport() prints a
    debug message when it should just fall through silently.

    Example spurious message:

    gpio_unexport: gpio0 status -22

    Signed-off-by: Jon Povey
    Cc: David Brownell
    Acked-by: Uwe Kleine-K?nig
    Cc: Gregory Bean
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jon Povey
     

27 Jul, 2010

1 commit

  • Found in the Versatile build:

    WARNING: drivers/built-in.o(.data+0x14c): Section mismatch in reference from the variable pl061_gpio_driver to the (unknown reference) .init.data:(unknown)
    The variable pl061_gpio_driver references
    the (unknown reference) __initdata (unknown)

    WARNING: drivers/built-in.o(.data+0x40f8): Section mismatch in reference from the variable pl011_driver to the (unknown reference) .init.data:(unknown)
    The variable pl011_driver references
    the (unknown reference) __initdata (unknown)

    WARNING: drivers/built-in.o(.data+0x5ab4): Section mismatch in reference from the variable pl031_driver to the (unknown reference) .init.data:(unknown)
    The variable pl031_driver references
    the (unknown reference) __initdata (unknown)

    Basically, amba_id structures must not be __initdata. Also fix:

    WARNING: drivers/built-in.o(.data+0x138): Section mismatch in reference from the variable pl061_gpio_driver to the function .init.text:pl061_probe()
    The variable pl061_gpio_driver references
    the function __init pl061_probe()

    which is an incorrectly annotated probe function. Fix it to reflect
    the other AMBA bus probe functions by removing the __init attributation.

    Signed-off-by: Russell King

    Russell King
     

24 Jul, 2010

1 commit


21 Jul, 2010

1 commit

  • My Collabora address is no longer enabled - update the MODULE_AUTHOR
    fields of drivers to my current email address.

    Signed-off-by: Andres Salomon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andres Salomon
     

06 Jul, 2010

4 commits

  • Implement generic OF gpio hooks and thus make device-enabled GPIO chips
    (i.e. the ones that have gpio_chip->dev specified) automatically attach
    to the OpenFirmware subsystem. Which means that now we can handle I2C and
    SPI GPIO chips almost* transparently.

    * "Almost" because some chips still require platform data, and for these
    chips OF-glue is still needed, though with this change the glue will
    be much smaller.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: Grant Likely
    Cc: David Brownell
    Cc: Bill Gatliff
    Cc: Dmitry Eremin-Solenikov
    Cc: Benjamin Herrenschmidt
    Cc: Jean Delvare
    Cc: Andrew Morton
    CC: linux-kernel@vger.kernel.org
    CC: devicetree-discuss@lists.ozlabs.org

    Anton Vorontsov
     
  • Currently the kernel uses the struct device_node.data pointer to resolve
    a struct gpio_chip pointer from a device tree node. However, the .data
    member doesn't provide any type checking and there aren't any rules
    enforced on what it should be used for. There's no guarantee that the
    data stored in it actually points to an gpio_chip pointer.

    Instead of relying on the .data pointer, this patch modifies the code
    to add a lookup function which scans through the registered gpio_chips
    and returns the gpio_chip that has a pointer to the specified
    device_node.

    Signed-off-by: Grant Likely
    CC: Andrew Morton
    CC: Anton Vorontsov
    CC: Grant Likely
    CC: David Brownell
    CC: Bill Gatliff
    CC: Dmitry Eremin-Solenikov
    CC: Benjamin Herrenschmidt
    CC: Jean Delvare
    CC: linux-kernel@vger.kernel.org
    CC: devicetree-discuss@lists.ozlabs.org

    Grant Likely
     
  • The OF gpio infrastructure is great for describing GPIO connections within
    the device tree. However, using a GPIO binding still requires changes to
    the gpio controller just to add an of_gpio structure. In most cases, the
    gpio controller doesn't actually need any special support and the simple
    OF gpio mapping function is more than sufficient. Additional, the current
    scheme of using of_gpio_chip requires a convoluted scheme to maintain
    1:1 mappings between of_gpio_chip and gpio_chip instances.

    If the struct of_gpio_chip data members were moved into struct gpio_chip,
    then it would simplify the processing of OF gpio bindings, and it would
    make it trivial to use device tree OF connections on existing gpiolib
    controller drivers.

    This patch eliminates the of_gpio_chip structure and moves the relevant
    fields into struct gpio_chip (conditional on CONFIG_OF_GPIO). This move
    simplifies the existing code and prepares for adding automatic device tree
    support to existing drivers.

    Signed-off-by: Grant Likely
    Cc: Andrew Morton
    Cc: Anton Vorontsov
    Cc: Grant Likely
    Cc: David Brownell
    Cc: Bill Gatliff
    Cc: Dmitry Eremin-Solenikov
    Cc: Benjamin Herrenschmidt
    Cc: Jean Delvare

    Anton Vorontsov
     
  • Hopefully it makes the code look nicer and makes it easier to extend
    this function.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: Andrew Morton
    Signed-off-by: Grant Likely
    CC: devicetree-discuss@lists.ozlabs.org
    CC: linux-kernel@vger.kernel.org

    Anton Vorontsov
     

30 Jun, 2010

1 commit

  • Update Kconfig and Makefile in drivers/gpio to discourage inappropriate
    addition of platform-specific code.

    [akpm@linux-foundation.org: fix tpyo]
    Signed-by: David Brownell

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

    David Brownell
     

28 May, 2010

3 commits

  • rdc_gpio_set_value_impl has the gpio data registers 1 and 2 inverted, fix this.

    Signed-off-by: Bernhard Loos
    Signed-off-by: Florian Fainelli
    Signed-off-by: Samuel Ortiz

    Florian Fainelli
     
  • The rdc321x southbridge PCI device has no MEM PCI resources that we could
    pass to mfd_add_devices. Since 33254dd5, mfd_add_device checks for the
    mem_base argument that we set to NULL. Changing the resources passed to
    our MFD cells from IORESOURCE_MEM to IORESOURCE_IO fixes that. Since we use
    those resources as offsets to the PCI configuration space base address of
    the southbridge device this is also more adequate.

    Signed-off-by: Florian Fainelli
    Signed-off-by: Samuel Ortiz

    Florian Fainelli
     
  • Fix rdc321x-southbridge build: GPIO_RDC321X needs to select
    MFD_CORE so that the core is built at the same (or higher)
    tristate level.

    rdc321x-southbridge.c:(.devinit.text+0x6103): undefined reference to `mfd_add_devices'
    rdc321x-southbridge.c:(.devexit.text+0xe5f): undefined reference to `mfd_remove_devices'

    Signed-off-by: Randy Dunlap
    Cc: Florian Fainelli
    Signed-off-by: Samuel Ortiz

    Randy Dunlap