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

17 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
     
  • Add a GPIO driver to support the GPIOs on the TC35892 I/O Expander.

    Acked-by: Linus Walleij
    Signed-off-by: Rabin Vincent
    Signed-off-by: Samuel Ortiz

    Rabin Vincent
     
  • Implicit slab.h inclusion via percpu.h is about to go away. Make sure
    gfp.h or slab.h is included as necessary.

    Signed-off-by: Samuel Ortiz
    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • The Janz VMOD-TTL is a MODULbus daughterboard which fits onto any MODULbus
    carrier board. It essentially consists of some various logic and a Zilog
    Z8536 CIO Counter/Timer and Parallel IO Unit.

    The board must be physically configured with jumpers to enable a user to
    drive output signals. I am only interested in outputs, so I have made this
    driver as simple as possible. It only supports a very minimal subset of the
    features provided by the Z8536 chip.

    Signed-off-by: Ira W. Snyder
    Signed-off-by: Samuel Ortiz

    Ira W. Snyder
     
  • This patch adds a new GPIO driver for the RDC321x SoC GPIO controller.

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

    Florian Fainelli
     
  • This eliminates the following build warning:

    drivers/gpio/it8761e_gpio.c: In function `it8761e_gpio_exit':
    drivers/gpio/it8761e_gpio.c:220: warning: ignoring return value of `gpiochip_remove', declared with attribute warn_unused_result

    Signed-off-by: Daniel Mack
    Cc: Denis Turischev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Mack
     
  • Intel Penwell chip has two 96 pins GPIO blocks, which are very similiar as
    Intel Langwell chip GPIO block, except for pin number difference. This
    patch expends the original Langwell GPIO driver to support Penwell's.

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

    Alek Du
     
  • A few architectures, like OMAP, allow you to set a debouncing time for the
    gpio before generating the IRQ. Teach gpiolib about that.

    Mark said:
    : This would be generally useful for embedded systems, especially where
    : the interrupt concerned is a wake source. It allows drivers to avoid
    : spurious interrupts from noisy sources so if the hardware supports it
    : the driver can avoid having to explicitly wait for the signal to become
    : stable and software has to cope with fewer events. We've lived without
    : it for quite some time, though.

    David said:
    : I looked at adding debounce support to the generic GPIO calls (and thus
    : gpiolib) some time back, but decided against it. I forget why at this
    : time (check list archives) but it wasn't because of lack of utility in
    : certain contexts.
    :
    : One thing to watch out for is just how variable the hardware capabilities
    : are. Atmel GPIOs have something like a fixed number of 32K clock cycles
    : for debounce, twl4030 had something odd, OMAPs were more like the Atmel
    : chips but with a different clock. In some cases debouncing had to be
    : ganged, not per-GPIO. And so forth.

    Signed-off-by: Felipe Balbi
    Cc: Tony Lindgren
    Cc: David Brownell
    Reviewed-by: Mark Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Felipe Balbi
     
  • The current message, 'not registered' is confusing as it implies it was
    not registered with something, whereas printing 'failed to register'
    implies it was the gpiochip_add() call that did not work correctly.

    Signed-off-by: Ben Dooks
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Fix a bug I noticed while hacking on the max732x driver for interrupt
    support. According to the datasheets, open-drain pins have to be
    configured as output-high (which in that case is actually high impedance)
    to be used as input.

    Signed-off-by: Marc Zyngier
    Acked-by: Eric Miao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marc Zyngier
     
  • Setup both client_group_a and client_group_b if nr_port > 8 (not including
    nr_port==8).

    Signed-off-by: Axel Lin
    Cc: Eric Miao
    Cc: Ben Dooks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • The valid offset value is 0..PL061_GPIO_NR-1, this patch corrects the
    offset value range checking.

    Signed-off-by: Axel Lin
    Acked-by: Baruch Siach
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

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

    Uwe Kleine-König
     
  • gpiolib doesn't need to modify the names and I assume most initializers
    use string constants that shouldn't be modified anyhow.

    [akpm@linux-foundation.org: fix drivers/gpio/cs5535-gpio.c]
    Signed-off-by: Uwe Kleine-König
    Cc: Kevin Wells
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • Most of the GPIO expanders supported by the max732x driver have interrupt
    generation capability by reporting changes on input pins through an INT#
    pin. This patch implements the irq_chip functionnality (edge detection
    only).

    Signed-off-by: Marc Zyngier
    Cc: Eric Miao
    Cc: Jebediah Huang
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marc Zyngier
     

22 May, 2010

2 commits

  • Merging in current state of Linus' tree to deal with merge conflicts and
    build failures in vio.c after merge.

    Conflicts:
    drivers/i2c/busses/i2c-cpm.c
    drivers/i2c/busses/i2c-mpc.c
    drivers/net/gianfar.c

    Also fixed up one line in arch/powerpc/kernel/vio.c to use the
    correct node pointer.

    Signed-off-by: Grant Likely

    Grant Likely
     
  • The problem. When implementing a network namespace I need to be able
    to have multiple network devices with the same name. Currently this
    is a problem for /sys/class/net/*, /sys/devices/virtual/net/*, and
    potentially a few other directories of the form /sys/ ... /net/*.

    What this patch does is to add an additional tag field to the
    sysfs dirent structure. For directories that should show different
    contents depending on the context such as /sys/class/net/, and
    /sys/devices/virtual/net/ this tag field is used to specify the
    context in which those directories should be visible. Effectively
    this is the same as creating multiple distinct directories with
    the same name but internally to sysfs the result is nicer.

    I am calling the concept of a single directory that looks like multiple
    directories all at the same path in the filesystem tagged directories.

    For the networking namespace the set of directories whose contents I need
    to filter with tags can depend on the presence or absence of hotplug
    hardware or which modules are currently loaded. Which means I need
    a simple race free way to setup those directories as tagged.

    To achieve a reace free design all tagged directories are created
    and managed by sysfs itself.

    Users of this interface:
    - define a type in the sysfs_tag_type enumeration.
    - call sysfs_register_ns_types with the type and it's operations
    - sysfs_exit_ns when an individual tag is no longer valid

    - Implement mount_ns() which returns the ns of the calling process
    so we can attach it to a sysfs superblock.
    - Implement ktype.namespace() which returns the ns of a syfs kobject.

    Everything else is left up to sysfs and the driver layer.

    For the network namespace mount_ns and namespace() are essentially
    one line functions, and look to remain that.

    Tags are currently represented a const void * pointers as that is
    both generic, prevides enough information for equality comparisons,
    and is trivial to create for current users, as it is just the
    existing namespace pointer.

    The work needed in sysfs is more extensive. At each directory
    or symlink creating I need to check if the directory it is being
    created in is a tagged directory and if so generate the appropriate
    tag to place on the sysfs_dirent. Likewise at each symlink or
    directory removal I need to check if the sysfs directory it is
    being removed from is a tagged directory and if so figure out
    which tag goes along with the name I am deleting.

    Currently only directories which hold kobjects, and
    symlinks are supported. There is not enough information
    in the current file attribute interfaces to give us anything
    to discriminate on which makes it useless, and there are
    no potential users which makes it an uninteresting problem
    to solve.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Benjamin Thery
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     

20 May, 2010

1 commit


19 May, 2010

1 commit