16 Nov, 2010

2 commits


01 Nov, 2010

3 commits


30 Oct, 2010

2 commits

  • * 'for-2637/i2c-all' of git://git.fluff.org/bjdooks/linux:
    i2c-intel-mid: Driver depends on PCI
    i2c-intel-mid: support for Moorestown and Medfield platform
    i2c-nomadik: fixup bus delays
    i2c-nomadik: support smbus emulation
    i2c-nomadik: dynamic clocking
    i2c-nomadik: documentation fixes
    i2c-s3c2410: Enable i2c clock only when doing some transfert

    Linus Torvalds
     
  • i2c-intel-mid driver uses PCI data structs and interfaces,
    so it should depend on PCI. Fixes these build errors:

    drivers/i2c/busses/i2c-intel-mid.c:977: error: implicit declaration of function 'pci_request_region'
    drivers/i2c/busses/i2c-intel-mid.c:1077: error: implicit declaration of function 'pci_release_region'

    Signed-off-by: Randy Dunlap
    Cc: Ba Zheng
    Cc: Jean Delvare
    Cc: Ben Dooks
    Cc: linux-i2c@vger.kernel.org
    Signed-off-by: Ben Dooks

    Randy Dunlap
     

29 Oct, 2010

1 commit

  • * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (27 commits)
    x86: allocate space within a region top-down
    x86: update iomem_resource end based on CPU physical address capabilities
    x86/PCI: allocate space from the end of a region, not the beginning
    PCI: allocate bus resources from the top down
    resources: support allocating space within a region from the top down
    resources: handle overflow when aligning start of available area
    resources: ensure callback doesn't allocate outside available space
    resources: factor out resource_clip() to simplify find_resource()
    resources: add a default alignf to simplify find_resource()
    x86/PCI: MMCONFIG: fix region end calculation
    PCI: Add support for polling PME state on suspended legacy PCI devices
    PCI: Export some PCI PM functionality
    PCI: fix message typo
    PCI: log vendor/device ID always
    PCI: update Intel chipset names and defines
    PCI: use new ccflags variable in Makefile
    PCI: add PCI_MSIX_TABLE/PBA defines
    PCI: add PCI vendor id for STmicroelectronics
    x86/PCI: irq and pci_ids patch for Intel Patsburg DeviceIDs
    PCI: OLPC: Only enable PCI configuration type override on XO-1
    ...

    Linus Torvalds
     

28 Oct, 2010

3 commits

  • Ben Dooks
     
  • Ben Dooks
     
  • (Updated to address Ben's comments. With regard to the message segment
    restriction it's not something we hit on the actual platform so while
    I will investigate that further I don't think its a blocker to submission.
    At worst its a spot over-restrictive)

    From: Wen Wang

    Initial release of the driver. Updated and verified on hardware.

    Cleaned up as follows

    Alan Cox:
    Squash down the switches into tables, and use the PCI ident field. We
    could perhaps take this further and put the platform and port number into
    this.
    uint32t -> u32
    bracketing of case statements
    spacing and '!' usage
    Check the speed (which is now 0/1/2) is valid and ignore otherwise.
    Fix remaining problems/suggestions from Jean's review
    Fix items from Ben's review

    Arjan van de Ven:
    Initial power management hooks

    Yong Wang :
    Shared IRQ support

    Wen Wang :
    D3 support
    Fixes for OCT test runs
    Interrupt optimisations

    Hong Liu
    The runtime PM code is working on the wrong device (i2c_adapter->dev).
    The correct one should be pci_dev->dev. This breaks attached i2c
    slave devices with runtime PM enabled. Slave device needs to runtime
    resume parent device before runtime resuming itself, but we always get
    error since we don't have pm_runtime callback for i2c_adapter->dev.

    Bin Yang :
    Update speed table

    Saadi Maalem :
    Clear all interrupts in the hardware init

    Celine Chotard :
    Correct ordering of clear/disable of IRQs

    Signed-off-by: Wen Wang
    Signed-off-by: Yong Wang
    Signed-off-by: Hong Liu
    Signed-off-by: Bin Yang
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Alan Cox
    Signed-off-by: Ben Dooks

    Alan Cox
     

27 Oct, 2010

1 commit


25 Oct, 2010

17 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (110 commits)
    sh: i2c-sh7760: Replase from ctrl_* to __raw_*
    sh: clkfwk: Shuffle around to match the intc split up.
    sh: clkfwk: modify for_each_frequency end condition
    sh: fix clk_get() error handling
    sh: clkfwk: Fix fault in frequency iterator.
    sh: clkfwk: Add a helper for rate rounding by divisor ranges.
    sh: clkfwk: Abstract rate rounding helper.
    sh: clkfwk: support clock remapping.
    sh: pci: Convert to upper/lower_32_bits() helpers.
    sh: mach-sdk7786: Add support for the FPGA SRAM.
    sh: Provide a generic SRAM pool for tiny memories.
    sh: pci: Support secondary FPGA-driven PCIe clocks on SDK7786.
    sh: pci: Support slot 4 routing on SDK7786.
    sh: Fix up PMB locking.
    sh: mach-sdk7786: Add support for fpga gpios.
    sh: use pr_fmt for clock framework, too.
    sh: remove name and id from struct clk
    sh: free-without-alloc fix for sh_mobile_lcdcfb
    sh: perf: Set up perf_max_events.
    sh: perf: Support SH-X3 hardware counters.
    ...

    Fix up trivial conflicts (perf_max_events got removed) in arch/sh/kernel/perf_event.c

    Linus Torvalds
     
  • ctrl_* is deprecated. We should to use __raw_*.

    Signed-off-by: Nobuhiro Iwamatsu
    Signed-off-by: Paul Mundt

    Nobuhiro Iwamatsu
     
  • We were missing a transfer delay in one execution path leading to
    hangs and the bus timeout was too low leading to errors under
    stress tests.

    Acked-by: Srinidhi Kasagar
    Signed-off-by: Sundar R Iyer
    Signed-off-by: Linus Walleij
    Signed-off-by: Ben Dooks

    Linus Walleij
     
  • We can do smbus emulation so flag this and drop the duplicate
    flags implied from smbus emulation.

    Acked-by: Srinidhi Kasagar
    Signed-off-by: Sundar R Iyer
    Signed-off-by: Linus Walleij
    Signed-off-by: Ben Dooks

    Linus Walleij
     
  • This makes sure the Nomadik I2C bus driver silicon is only clocked
    when really needed, saving some microamps here and there when
    there is no I2C traffic.

    Acked-by: Srinidhi Kasagar
    Signed-off-by: Sundar R Iyer
    Signed-off-by: Linus Walleij
    Signed-off-by: Ben Dooks

    Linus Walleij
     
  • This fixes some kerneldoc and assorted documenatation in the
    Nomadik I2C driver without semantic impact.

    Acked-by: Srinidhi Kasagar
    Signed-off-by: Sundar R Iyer
    Signed-off-by: Linus Walleij
    Signed-off-by: Ben Dooks

    Linus Walleij
     
  • Transactions not acked can happen every now and then, in particular
    during device detection, and various transaction types can be used for
    this purpose. So stop logging this event, except when debugging is
    enabled. This is what other similar drivers (e.g. i2c-i801 or
    i2c-piix4) do.

    Signed-off-by: Jean Delvare

    Jean Delvare
     
  • The underlying I2C adapter may or may not be present when this driver
    gets initialized, and may disappear later, so there is no safe time at
    which the probe and remove functions can be discarded.

    Signed-off-by: Guenter Roeck
    Signed-off-by: Jean Delvare

    Guenter Roeck
     
  • This patch adds support for PCA9541, an I2C Bus Master Selector.
    The driver is modeled as single channel I2C Multiplexer to be able to utilize
    the I2C multiplexer framework.

    Signed-off-by: Guenter Roeck
    Reviewed-by: Tom Grennan
    Acked-by: Jean Delvare

    Guenter Roeck
     
  • Check the class flags before allocating the temporary i2c_client
    structure, to avoid allocating it when we don't need it.

    Also optimize the inner loop a bit.

    Signed-off-by: Jean Delvare
    Cc: Jacob Pan

    Jean Delvare
     
  • The "new_device" sysfs interface has been there for quite some time
    now, nobody complained about it so it must be good enough. Time to
    remove the warning and call it stable.

    Signed-off-by: Jean Delvare
    Acked-by: Michael Lawnick

    Jean Delvare
     
  • The functions the functions amd_ec_wait_write and amd_ec_wait_read have an
    unsigned return type, but return a negative constant to indicate an error
    condition.

    A sematic match that finds this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @exists@
    identifier f;
    constant C;
    @@

    unsigned f(...)
    { }
    //

    Fixing amd_ec_wait_write and amd_ec_wait_read leads to the need to adjust
    the return type of the functions amd_ec_write and amd_ec_read, which are
    the only functions that call amd_ec_wait_write and amd_ec_wait_read.
    amd_ec_write and amd_ec_read, in turn, are only called from within the
    function amd8111_access, which already returns a signed typed value. Each
    of the calls to amd_ec_write and amd_ec_read are updated using the
    following semantic patch:

    //
    @@
    @@

    + status = amd_ec_write
    - amd_ec_write
    (...);
    + if (status) return status;

    @@
    @@

    + status = amd_ec_read
    - amd_ec_read
    (...);
    + if (status) return status;
    //

    The patch also adds the declaration of the status variable.

    Signed-off-by: Julia Lawall
    Signed-off-by: Jean Delvare

    Julia Lawall
     
  • Replace EXTRA_CFLAGS with ccflags-y.

    Signed-off-by: matt mooney
    Signed-off-by: Jean Delvare

    matt mooney
     
  • These drivers don't use anything which is defined in .
    This header file was never meant to be included directly anyway, and
    will be deleted soon.

    Signed-off-by: Jean Delvare
    Acked-by: Ben Dooks
    Acked-by: Dave Airlie
    Cc: Hans Verkuil

    Jean Delvare
     
  • This makes the calling site's code clearer IMHO.

    Signed-off-by: Jean Delvare
    Acked-by: Michael Lawnick

    Jean Delvare
     
  • i2c->adap.name shouldn't be used in request_irq.
    Instead the driver name "i2c-pca-platform" should be used.

    Signed-off-by: Nobuhiro Iwamatsu
    Acked-by: Wolfram Sang
    Cc: stable@kernel.org
    Signed-off-by: Jean Delvare

    Nobuhiro Iwamatsu
     
  • drivers/i2c/algos/Kconfig makes all the algorithms dependent on
    !I2C_HELPER_AUTO, which triggers a Kconfig warning about broken
    dependencies when some driver selects one of the algorithms. Ideally
    we would make only the prompts dependent on !I2C_HELPER_AUTO, however
    Kconfig doesn't currently support that. So we have to redefine the
    symbols separately for the I2C_HELPER_AUTO=y case.

    Signed-off-by: Jean Delvare
    Acked-by: Michal Marek

    Jean Delvare
     

22 Oct, 2010

2 commits

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (71 commits)
    powerpc/44x: Update ppc44x_defconfig
    powerpc/watchdog: Make default timeout for Book-E watchdog a Kconfig option
    fsl_rio: Add comments for sRIO registers.
    powerpc/fsl-booke: Add e55xx (64-bit) smp defconfig
    powerpc/fsl-booke: Add p5020 DS board support
    powerpc/fsl-booke64: Use TLB CAMs to cover linear mapping on FSL 64-bit chips
    powerpc/fsl-booke: Add support for FSL Arch v1.0 MMU in setup_page_sizes
    powerpc/fsl-booke: Add support for FSL 64-bit e5500 core
    powerpc/85xx: add cache-sram support
    powerpc/85xx: add ngPIXIS FPGA device tree node to the P1022DS board
    powerpc: Fix compile error with paca code on ppc64e
    powerpc/fsl-booke: Add p3041 DS board support
    oprofile/fsl emb: Don't set MSR[PMM] until after clearing the interrupt.
    powerpc/fsl-booke: Add PCI device ids for P2040/P3041/P5010/P5020 QoirQ chips
    powerpc/mpc8xxx_gpio: Add support for 'qoriq-gpio' controllers
    powerpc/fsl_booke: Add support to boot from core other than 0
    powerpc/p1022: Add probing for individual DMA channels
    powerpc/fsl_soc: Search all global-utilities nodes for rstccr
    powerpc: Fix invalid page flags in create TLB CAM path for PTE_64BIT
    powerpc/mpc83xx: Support for MPC8308 P1M board
    ...

    Fix up conflict with the generic irq_work changes in arch/powerpc/kernel/time.c

    Linus Torvalds
     
  • This patch modify the s3c2410 i2c driver behaviour to enable the
    i2c clock only when needed. I'm not sure if this has a big impact
    on power usage but at least it's fixing a bug with the uda1380
    codec which needs to be hard reset'ed if the i2c clock is enabled
    before it's powered on (at least on h1940).

    Signed-off-by: Arnaud Patard
    Signed-off-by: Ben Dooks

    Arnaud Patard (Rtp)
     

18 Oct, 2010

3 commits

  • This patch updates the defines for Intel devices in
    include/linux/pci_ids.h, referenced in arch/x86/pci/irq.c and
    drivers/i2c/busses/i2c-i801.c, reflecting approved legal branding, and
    using fuller code-names for products under development.

    Acked-by: Jean Delvare
    Signed-off-by: Seth Heasley
    Signed-off-by: Jesse Barnes

    Seth Heasley
     
  • The i2c_imx_trx_complete() function is using
    wait_event_interruptible_timeout() to wait for the I2C controller to
    signal that it has completed an I2C bus operation. If the process that
    causes the I2C operation receives a signal, the wait will be
    interrupted, returning an error. It is better to let the I2C operation
    finished before handling the signal (i.e. returning into userspace).

    It is safe to use wait_event_timeout() instead, because the timeout
    will allow the process to exit if the I2C bus hangs. It's also better
    to allow the I2C operation to finish, because unacknowledged I2C
    operations can cause the I2C bus to hang.

    Signed-off-by: Marc Kleine-Budde
    Reviewed-by: Wolfram Sang
    Signed-off-by: Ben Dooks

    Marc Kleine-Budde
     
  • This patch is an improvement to 4bba0fd8d1c6d405df666e2573e1a1f917098be0
    which got to mainline a little early.

    Sudhakar Rajashekhara explains that at least OMAP-L138 requires MDR mode
    settings before DXR for correct behaviour, so load MDR first with
    STT cleared and later load again with STT set.

    Tested on DM355 connected to Techwell TW2836 and Wolfson WM8985

    Signed-off-by: Jon Povey
    Acked-by: Troy Kisky
    Tested-by: Sudhakar Rajashekhara
    Acked-by: Kevin Hilman
    Signed-off-by: Ben Dooks

    Jon Povey
     

13 Oct, 2010

1 commit

  • The function has an unsigned return type, but returns a negative constant
    to indicate an error condition. The result of calling the function is
    always stored in a variable of type (signed) int, and thus unsigned can be
    dropped from the return type.

    A sematic match that finds this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @exists@
    identifier f;
    constant C;
    @@

    unsigned f(...)
    { }
    //

    Signed-off-by: Julia Lawall
    Acked-by: Olof Johansson
    Signed-off-by: Benjamin Herrenschmidt

    Julia Lawall
     

08 Oct, 2010

1 commit


01 Oct, 2010

1 commit

  • S3C2440 style I2C controller uses PCLK to calculate the SDA line delay.
    The driver wrongly assumed that this delay is calculated from the
    frequency that the controller is operating on. This patch fixes this
    issue.

    Signed-off-by: MyungJoo Ham
    Signed-off-by: Kyungmin Park
    Signed-off-by: Marek Szyprowski
    Signed-off-by: Ben Dooks

    MyungJoo Ham
     

30 Sep, 2010

3 commits

  • Commit 959e85f7, "i2c: add OF-style registration and binding" caused a
    module dependency loop where of_i2c.c calls functions in i2c-core, and
    i2c-core calls of_i2c_register_devices() in of_i2c. This means that
    when i2c support is built as a module when CONFIG_OF is set, then
    neither i2c_core nor of_i2c are able to be loaded.

    This patch fixes the problem by moving the of_i2c_register_devices()
    calls back into the device drivers. Device drivers already
    specifically request the core code to parse the device tree for
    devices anyway by setting the of_node pointer, so it isn't a big
    deal to also call the registration function. The drivers just become
    slightly more verbose.

    Signed-off-by: Grant Likely
    Signed-off-by: Jean Delvare

    Grant Likely
     
  • For devices which are not adapted to runtime PM a call to
    pm_runtime_suspended always returns true.

    Hence the pm_runtime_suspended checks below prevent legacy
    suspend from getting called.

    So do a pm_runtime_suspended check only for devices with a
    dev_pm_ops populated (which hence do not rely on the legacy
    suspend.)

    Signed-off-by: Rajendra Nayak
    Acked-by: Rafael J. Wysocki
    Cc: Ben Dooks
    Cc: Mark Brown
    Cc: Kevin Hilman
    Signed-off-by: Jean Delvare

    Rajendra Nayak
     
  • ret is still -1, if during the polling read_byte() returns at once
    with I2C_PCA_CON_SI set. So ret > 0 would lead *_waitforcompletion()
    to return 0, in spite of the proper behavior.

    The routine was rewritten, so that ret has always a proper value,
    before returning.

    Signed-off-by: Yegor Yefremov
    Reviewed-by: Wolfram Sang
    Cc: stable@kernel.org
    Signed-off-by: Jean Delvare

    Yegor Yefremov