24 Sep, 2008

2 commits


06 Sep, 2008

1 commit

  • * 'sh/for-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
    i2c: fix i2c-sh_mobile timing issues
    sh64: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.
    sh: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.
    sh: fix semtimedop syscall
    sh: update AP325RXA defconfig
    sh: update Migo-R defconfig
    sh: fix platform_resource_setup_memory() section mismatch
    sh: fix kexec entry point for crash kernels
    sh: crash kernel resource fix
    sh: fix ptrace_64.c:user_disable_single_step()
    sh64: re-add the __strnlen_user() prototype

    Linus Torvalds
     

05 Sep, 2008

1 commit

  • This patch teaches the i2c-sh_mobile driver to make use of wait irqs.
    Without this patch only dte irqs are used which may lead to overruns
    and cases of missing stop and extra bytes being read on the i2c bus.

    Use of wait irqs forces the hardware to pause and wait until the cpu
    is ready. Polling is also reworked in this patch to fix ms delay issues.

    Verified with bus analyzer and tested on MigoR and AP325RXA boards.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     

28 Aug, 2008

2 commits

  • Some DVB adapters do not support the special I2C transaction that we
    use for probing purposes. There's no point in logging this event, as
    there's nothing the user can do and in general there is no actual
    problem. So, degrade one of these messages to a debug message, and
    move the other one around so that it is only printed on bogus drivers.

    Signed-off-by: Jean Delvare
    Acked-by: Uwe Bugla

    Jean Delvare
     
  • device_init_wakeup must be called after device_register.

    Signed-off-by: Marc Pignat
    Acked-by: David Brownell
    Signed-off-by: Jean Delvare

    Marc Pignat
     

24 Aug, 2008

1 commit


14 Aug, 2008

1 commit


11 Aug, 2008

5 commits

  • Fix various printk format strings where %zd was passed a size_t;
    those should be %zu instead. (Courtesy of a version of GCC which
    warns when these details are wrong.)

    Signed-off-by: David Brownell
    Signed-off-by: Jean Delvare

    David Brownell
     
  • We check for address business in i2c_probe_address(),
    i2c_detect_address() and i2c_new_probed_device(), but this isn't
    sufficient. Drivers can call i2c_attach_client() and
    i2c_new_device() on any address, so we must check the address there
    as well.

    This fixes bug #11239:
    http://bugzilla.kernel.org/show_bug.cgi?id=11239

    Signed-off-by: Jean Delvare

    Jean Delvare
     
  • In kernel 2.6.26, the ability to select I2C algorithm drivers manually
    was removed, as all in-kernel drivers do that automatically. However
    there were some complaints that it was a problem for out-of-tree I2C
    bus drivers. In order to address these complaints, let's allow manual
    selection of these drivers again, but still hide them by default for
    better general user experience.

    This closes bug #11140:
    http://bugzilla.kernel.org/show_bug.cgi?id=11140

    Signed-off-by: Jean Delvare

    Jean Delvare
     
  • Fix a NULL pointer dereference that happened when calling
    i2c_new_probed_device on one of the addresses for which we use byte
    reads instead of quick write for detection purpose (that is: 0x30-0x37
    and 0x50-0x5f).

    Signed-off-by: Hans Verkuil
    Signed-off-by: Jean Delvare

    Hans Verkuil
     
  • The two I2C bus multiplexer drivers (i2c-amd756-s4882 and
    i2c-nforce2-s4985) make use of the bus they want to multiplex before
    checking if it is really present. Swap the instructions to test for
    presence first. This fixes a oops reported by Ingo Molnar.

    Signed-off-by: Jean Delvare
    Cc: Ingo Molnar

    Jean Delvare
     

07 Aug, 2008

4 commits


28 Jul, 2008

4 commits

  • PM_SUSPEND_MEM: Blackfin does not maintain register state through
    Hibernate. Save and restore peripheral base initialization during
    PM transitions.

    Signed-off-by: Michael Hennerich
    Signed-off-by: Bryan Wu
    Signed-off-by: Ben Dooks

    Michael Hennerich
     
  • Add support for CPU frequency scaling to the S3C24XX I2C driver.

    Signed-off-by: Ben Dooks

    Ben Dooks
     
  • Change the i2c_gpio driver to use platform_driver_register()
    instead of platform_driver_probe() to ensure that is can
    attach to any devices that may be loaded after it has initialised.

    Acked-by: Haavard Skinnemoen
    Signed-off-by: Ben Dooks

    Ben Dooks
     
  • Allow the platform data to specify the bus bumber that the
    new I2C bus will be given. This is to allow the use of the
    board registration mechanism to specify the new style of
    I2C device registration which allows boards to provide a
    list of attached devices.

    Note, as discussed on the mailing list, we have dropped
    backwards compatibility of adding an dynamic bus number
    as it should not affect most boards to have the bus pinned
    to 0 if they have either not specified platform data for
    driver. Any board supplying platform data will automatically
    have the bus_num field set to 0, and anyone who needs the
    driver on a different bus number can supply platform data
    to set bus_num.

    Signed-off-by: Ben Dooks

    Ben Dooks
     

26 Jul, 2008

2 commits

  • 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 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: David Brownell
    Cc: Guennadi Liakhovetski
    Cc: Greg KH
    Cc: Kay Sievers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

22 Jul, 2008

2 commits


17 Jul, 2008

7 commits


16 Jul, 2008

2 commits

  • Manual merge of:

    arch/powerpc/Kconfig
    arch/powerpc/kernel/stacktrace.c
    arch/powerpc/mm/slice.c
    arch/ppc/kernel/smp.c

    Benjamin Herrenschmidt
     
  • * 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: (56 commits)
    i2c: Add detection capability to new-style drivers
    i2c: Call client_unregister for new-style devices too
    i2c: Clean up old chip drivers
    i2c-ibm_iic: Register child nodes
    i2c: New-style EEPROM driver using device IDs
    i2c: Export the i2c_bus_type symbol
    i2c-au1550: Fix PM support
    i2c-dev: Delete empty detach_client callback
    i2c: Drop stray references to lm_sensors
    i2c: Check for ACPI resource conflicts
    i2c-ocores: basic PM support
    i2c-sibyte: SWARM I2C board initialization
    i2c-i801: Fix handling of error conditions
    i2c-i801: Rename local variable temp to status
    i2c-i801: Properly report bus arbitration loss
    i2c-i801: Remove verbose debugging messages
    i2c-algo-pcf: Drop unused struct members
    i2c-algo-pcf: Multi-master lost-arbitration improvement
    i2c: Deprecate the legacy gpio drivers
    i2c-pxa: Initialize early
    ...

    Linus Torvalds
     

15 Jul, 2008

6 commits

  • Manual fixup of:

    arch/powerpc/Kconfig

    Benjamin Herrenschmidt
     
  • Benjamin Herrenschmidt
     
  • * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (241 commits)
    [ARM] 5171/1: ep93xx: fix compilation of modules using clocks
    [ARM] 5133/2: at91sam9g20 defconfig file
    [ARM] 5130/4: Support for the at91sam9g20
    [ARM] 5160/1: IOP3XX: gpio/gpiolib support
    [ARM] at91: Fix NAND FLASH timings for at91sam9x evaluation kits.
    [ARM] 5084/1: zylonite: Register AC97 device
    [ARM] 5085/2: PXA: Move AC97 over to the new central device declaration model
    [ARM] 5120/1: pxa: correct platform driver names for PXA25x and PXA27x UDC drivers
    [ARM] 5147/1: pxaficp_ir: drop pxa_gpio_mode calls, as pin setting
    [ARM] 5145/1: PXA2xx: provide api to control IrDA pins state
    [ARM] 5144/1: pxaficp_ir: cleanup includes
    [ARM] pxa: remove pxa_set_cken()
    [ARM] pxa: allow clk aliases
    [ARM] Feroceon: don't disable BPU on boot
    [ARM] Orion: LED support for HP mv2120
    [ARM] Orion: add RD88F5181L-FXO support
    [ARM] Orion: add RD88F5181L-GE support
    [ARM] Orion: add Netgear WNR854T support
    [ARM] s3c2410_defconfig: update for current build
    [ARM] Acer n30: Minor style and indentation fixes.
    ...

    Linus Torvalds
     
  • This includes PXA work up to the SPI changes for the initial merge,
    since e172274ccc55d20536fbdceb6131f38e288541e0 depends on the SPI
    tree being merged.

    Conflicts:

    arch/arm/configs/em_x270_defconfig
    arch/arm/configs/xm_x270_defconfig

    Russell King
     
  • Jonathan Corbet
     
  • Add a mechanism to let new-style i2c drivers optionally autodetect
    devices they would support on selected buses and ask i2c-core to
    instantiate them. This is a replacement for legacy i2c drivers, much
    cleaner.

    Where drivers had to implement both a legacy i2c_driver and a
    new-style i2c_driver so far, this mechanism makes it possible to get
    rid of the legacy i2c_driver and implement both enumerated and
    detected device support with just one (new-style) i2c_driver.

    Here is a quick conversion guide for these drivers, step by step:

    * Delete the legacy driver definition, registration and removal.
    Delete the attach_adapter and detach_client methods of the legacy
    driver.

    * Change the prototype of the legacy detect function from
    static int foo_detect(struct i2c_adapter *adapter, int address, int kind);
    to
    static int foo_detect(struct i2c_client *client, int kind,
    struct i2c_board_info *info);

    * Set the new-style driver detect callback to this new function, and
    set its address_data to &addr_data (addr_data is generally provided
    by I2C_CLIENT_INSMOD.)

    * Add the appropriate class to the new-style driver. This is
    typically the class the legacy attach_adapter method was checking
    for. Class checking is now mandatory (done by i2c-core.) See
    for the list of available classes.

    * Remove the i2c_client allocation and freeing from the detect
    function. A pre-allocated client is now handed to you by i2c-core,
    and is freed automatically.

    * Make the detect function fill the type field of the i2c_board_info
    structure it was passed as a parameter, and return 0, on success. If
    the detection fails, return -ENODEV.

    Signed-off-by: Jean Delvare

    Jean Delvare