30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

24 Mar, 2010

2 commits


15 Mar, 2010

1 commit

  • drivers/i2c/busses/i2c-xiic.c:493: error: implicit declaration of function 'mdelay'

    Signed-off-by: Randy Dunlap
    Cc: "Richard Röjfors"
    Cc: "Ben Dooks (embedded platforms)"
    Cc: linux-i2c@vger.kernel.org
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

14 Mar, 2010

6 commits


13 Mar, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (56 commits)
    doc: fix typo in comment explaining rb_tree usage
    Remove fs/ntfs/ChangeLog
    doc: fix console doc typo
    doc: cpuset: Update the cpuset flag file
    Fix of spelling in arch/sparc/kernel/leon_kernel.c no longer needed
    Remove drivers/parport/ChangeLog
    Remove drivers/char/ChangeLog
    doc: typo - Table 1-2 should refer to "status", not "statm"
    tree-wide: fix typos "ass?o[sc]iac?te" -> "associate" in comments
    No need to patch AMD-provided drivers/gpu/drm/radeon/atombios.h
    devres/irq: Fix devm_irq_match comment
    Remove reference to kthread_create_on_cpu
    tree-wide: Assorted spelling fixes
    tree-wide: fix 'lenght' typo in comments and code
    drm/kms: fix spelling in error message
    doc: capitalization and other minor fixes in pnp doc
    devres: typo fix s/dev/devm/
    Remove redundant trailing semicolons from macros
    fix typo "definetly" -> "definitely" in comment
    tree-wide: s/widht/width/g typo in comments
    ...

    Fix trivial conflict in Documentation/laptops/00-INDEX

    Linus Torvalds
     

08 Mar, 2010

16 commits

  • Conflicts:
    Documentation/filesystems/proc.txt
    arch/arm/mach-u300/include/mach/debug-macro.S
    drivers/net/qlge/qlge_ethtool.c
    drivers/net/qlge/qlge_main.c
    drivers/net/typhoon.c

    Jiri Kosina
     
  • A pointer to omap_i2c_probe is passed to the core via
    platform_driver_register and so the function must not disappear when the
    .init sections are discarded. Otherwise (if also having HOTPLUG=y)
    unbinding and binding a device to the driver via sysfs will result in an
    oops as does a device being registered late.

    An alternative to this patch is using platform_driver_probe instead of
    platform_driver_register plus removing the pointer to the probe function
    from the struct platform_driver.

    Signed-off-by: Uwe Kleine-König
    Cc: Kalle Jokiniemi
    Cc: Tony Lindgren
    Cc: Paul Walmsley
    Cc: Richard Woodruff
    Cc: chandra shekhar
    Cc: Jason P Marini
    Cc: Syed Mohammed Khasim
    Cc: Jarkko Nikula
    Cc: Juha Yrjola
    Cc: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Uwe Kleine-König
     
  • * 'for-linus/i2c' of git://git.fluff.org/bjdooks/linux:
    i2c: Add support for Xilinx XPS IIC Bus Interface
    i2c: omap: Add support for 16-bit registers
    i2c-pnx: fix setting start/stop condition
    powerpc: doc/dts-bindings: update doc of FSL I2C bindings
    i2c-mpc: add support for the MPC512x processors from Freescale
    i2c-mpc: rename "setclock" initialization functions to "setup"
    i2c-mpc: use __devinit[data] for initialization functions and data
    i2c/imx: don't add probe function to the driver struct
    i2c: Add support for Ux500/Nomadik I2C controller

    Linus Torvalds
     
  • Ben Dooks
     
  • Ben Dooks
     
  • Ben Dooks
     
  • This patch adds support for the Xilinx XPS IIC Bus Interface.

    The driver uses the dynamic mode, supporting to put several
    I2C messages in the FIFO to reduce the number of interrupts.

    It has the same feature as ocores, it can be passed a list
    of devices that will be added when the bus is probed.

    Signed-off-by: Richard Röjfors
    Signed-off-by: Ben Dooks

    Richard Röjfors
     
  • The current i2c-omap driver is set up for 32-bit registers, which
    corresponds to most OMAP devices. However, OMAP730/850 based
    devices use a 16-bit register size.

    This change modifies the driver to perform a runtime CPU type check
    to determine the register sizes, and uses a bit shift of either 1
    or 2 bits to compute the proper register sizes for all registers.

    Signed-off-by: Cory Maccarrone
    Acked-by: Tony Lindgren
    Signed-off-by: Ben Dooks

    Cory Maccarrone
     
  • The start/stop condtions are set in different places repetedly in the i2c-pnx
    driver. Beside in i2c_pnx_start and i2c_pnx_stop the start/stop bit are also
    set during the transfer of a i2c message in the master_xmit/rcv calls. This is
    wrong since we can't set the start/stop condition during the transaction of a
    single message any way. As a matter of fact, the driver will sometimes set both
    the start and the stop bits at one time. This can be easily reproduced by
    sending a simple read request like e.g
    struct i2c_msg msgs[] = {
    { addr, 0, 1, buf },
    { addr, I2C_M_RD, offset, buf }
    };
    While processing the first message the i2c_pnx_master_xmit will set both the
    start_bit and the stop_bit, which will eventually confuse the slave.

    Fixed by remove setting start/stop condition from the transmit routines.

    Signed-off-by: Luotao Fu
    Signed-off-by: Ben Dooks

    Luotao Fu
     
  • As I2C interrupts must be enabled for the MPC512x by the setup function
    as well, "fsl,preserve-clocking" is handled in a slighly different way.
    Also, the old settings are now reported calling dev_dbg(). For the
    MPC512x the clock setup function of the MPC52xx can be re-used.
    Furthermore, the Kconfig help has been updated and corrected.

    Signed-off-by: Wolfgang Grandegger
    Reviewed-by: Wolfram Sang
    Signed-off-by: Ben Dooks

    Wolfgang Grandegger
     
  • To prepare support for the MPC512x processors from Freescale the
    "setclock" initialization functions have been renamed to "setup"
    because I2C interrupts must be enabled for the MPC512x by this
    function as well.

    Signed-off-by: Wolfgang Grandegger
    Acked-by: Wolfram Sang
    Signed-off-by: Ben Dooks

    Wolfgang Grandegger
     
  • "__devinit[data]" has not yet been used for all initialization functions
    and data. To avoid truncating lines, the struct "mpc_i2c_match_data" has
    been renamed to "mpc_i2c_data", which is even the better name.

    Signed-off-by: Wolfgang Grandegger
    Tested-by: Wolfram Sang
    Signed-off-by: Ben Dooks

    Wolfgang Grandegger
     
  • Having a pointer to the probe function is unnecessary when using
    platform_driver_probe and yields a section mismatch warning after
    removing the white list entry "*driver" for
    { .data$, .data.rel$ } -> { .init.* } mismatches in modpost.

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Ben Dooks

    Uwe Kleine-König
     
  • This adds support for ST-Ericsson's I2C block found
    in Ux500 and Nomadik 8815 platforms.

    Signed-off-by: srinidhi kasagar
    Acked-by: Andrea Gallo
    Acked-by: Linus Walleij
    Reviewed-by: Linus Walleij
    Signed-off-by: Ben Dooks

    srinidhi kasagar
     
  • LPC_SCH is selected by GPI_SCH and I2C_ISCH, even when PCI is not
    enabled, but LPC_SCH depends on PCI, so make GPI_SCH and I2C_ISCH
    also depend on PCI.

    Those 2 selects also need to select what LPC_SCH selects,
    since kconfig does not follow selects.

    Signed-off-by: Randy Dunlap
    Cc: Denis Turischev
    Signed-off-by: Samuel Ortiz

    Randy Dunlap
     
  • Convert i2c-isch to platform_device for the lpc mfd core to add it at probe
    time.

    Signed-off-by: Denis Turischev
    Signed-off-by: Samuel Ortiz

    Denis Turischev
     

07 Mar, 2010

1 commit

  • Rename for_each_bit to for_each_set_bit in the kernel source tree. To
    permit for_each_clear_bit(), should that ever be added.

    The patch includes a macro to map the old for_each_bit() onto the new
    for_each_set_bit(). This is a (very) temporary thing to ease the migration.

    [akpm@linux-foundation.org: add temporary for_each_bit()]
    Suggested-by: Alexey Dobriyan
    Suggested-by: Andrew Morton
    Signed-off-by: Akinobu Mita
    Cc: "David S. Miller"
    Cc: Russell King
    Cc: David Woodhouse
    Cc: Artem Bityutskiy
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

02 Mar, 2010

12 commits

  • i2c_master_send & i2c_master_recv do not support more than 64 kb
    transfer, since msg.len is u16.

    Signed-off-by: Zhangfei Gao
    Signed-off-by: Jean Delvare

    Zhangfei Gao
     
  • Thanks to -Wshadow.

    Signed-off-by: Jean Delvare
    Reviewed-by: Wolfram Sang

    Jean Delvare
     
  • Allow I2C drivers to make use of the runtime PM framework by adding
    bus implementations of the runtime PM operations. These simply
    immediately suspend when the device is idle. The runtime PM framework
    provides drivers with off the shelf refcounts for enables and sysfs
    control for managing runtime suspend from userspace so is useful even
    without meaningful input from the bus.

    Signed-off-by: Mark Brown
    Signed-off-by: Jean Delvare

    Mark Brown
     
  • Add support for the SMBus alert mechanism to the i2c-parport-light
    driver. The ADM1032 evaluation board at least is properly wired for
    this.

    Signed-off-by: Jean Delvare
    Cc: David Brownell
    Cc: Trent Piepho

    Jean Delvare
     
  • Add support for the SMBus alert mechanism to the i2c-parport driver.
    The ADM1032 evaluation board at least is properly wired for this.

    Signed-off-by: Jean Delvare
    Cc: David Brownell
    Cc: Trent Piepho

    Jean Delvare
     
  • Having a separate Kconfig option for i2c-smbus makes it possible to
    build that support as a module even when i2c-core itself is built-in.
    Bus drivers which implement SMBus alert should select this option, so
    in most cases this option is hidden and the user doesn't have to care
    about it.

    Signed-off-by: Jean Delvare
    Cc: David Brownell
    Cc: Trent Piepho

    Jean Delvare
     
  • SMBus alert support. The SMBus alert protocol allows several SMBus
    slave devices to share a single interrupt pin on the SMBus master,
    while still allowing the master to know which slave triggered the
    interrupt.

    This is based on preliminary work by David Brownell. The key
    difference between David's implementation and mine is that his was
    part of i2c-core, while mine is split into a separate, standalone
    module named i2c-smbus. The i2c-smbus module is meant to include
    support for all SMBus extensions to the I2C protocol in the future.

    The benefit of this approach is a zero cost for I2C bus segments which
    do not need SMBus alert support. Where David's implementation
    increased the size of struct i2c_adapter by 7% (40 bytes on i386),
    mine doesn't touch it. Where David's implementation added over 150
    lines of code to i2c-core (+10%), mine doesn't touch it. The only
    change that touches all the users of the i2c subsystem is a new
    callback in struct i2c_driver (common to both implementations.) I seem
    to remember Trent was worried about the footprint of David'd
    implementation, hopefully mine addresses the issue.

    Signed-off-by: Jean Delvare
    Acked-by: Jonathan Cameron
    Cc: David Brownell
    Cc: Trent Piepho

    Jean Delvare
     
  • When the i2c-parport adapter is reponsible for powering devices, it
    would seem reasonable to give them some time to settle before trying
    to access them.

    Signed-off-by: Jean Delvare

    Jean Delvare
     
  • The description of the delay parameter is incomplete, it suggests that
    there is a direct relation between the delay value and the bus
    frequency. In fact, due to additional delays in the i2c bitbanging
    code, the i2c clock is always much slower.

    Signed-off-by: Jean Delvare
    Cc: Till Harbaum

    Jean Delvare
     
  • Add the Intel Cougar Point (PCH) SMBus controller device IDs.

    Signed-off-by: Seth Heasley
    Signed-off-by: Jean Delvare

    Seth Heasley
     
  • The id_table field of the struct pci_driver is constant in
    so it is worth to make initialization data also constant.

    The semantic match that finds this kind of pattern is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r@
    disable decl_init,const_decl_init;
    identifier I1, I2, x;
    @@
    struct I1 {
    ...
    const struct I2 *x;
    ...
    };
    @s@
    identifier r.I1, y;
    identifier r.x, E;
    @@
    struct I1 y = {
    .x = E,
    };
    @c@
    identifier r.I2;
    identifier s.E;
    @@
    const struct I2 E[] = ... ;
    @depends on !c@
    identifier r.I2;
    identifier s.E;
    @@
    + const
    struct I2 E[] = ...;
    //

    Signed-off-by: Márton Németh
    Cc: Julia Lawall
    Signed-off-by: Jean Delvare

    Márton Németh
     
  • * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (100 commits)
    ARM: Eliminate decompressor -Dstatic= PIC hack
    ARM: 5958/1: ARM: U300: fix inverted clk round rate
    ARM: 5956/1: misplaced parentheses
    ARM: 5955/1: ep93xx: move timer defines into core.c and document
    ARM: 5954/1: ep93xx: move gpio interrupt support to gpio.c
    ARM: 5953/1: ep93xx: fix broken build of clock.c
    ARM: 5952/1: ARM: MM: Add ARM_L1_CACHE_SHIFT_6 for handle inside each ARCH Kconfig
    ARM: 5949/1: NUC900 add gpio virtual memory map
    ARM: 5948/1: Enable timer0 to time4 clock support for nuc910
    ARM: 5940/2: ARM: MMCI: remove custom DBG macro and printk
    ARM: make_coherent(): fix problems with highpte, part 2
    MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself
    ARM: 5945/1: ep93xx: include correct irq.h in core.c
    ARM: 5933/1: amba-pl011: support hardware flow control
    ARM: 5930/1: Add PKMAP area description to memory.txt.
    ARM: 5929/1: Add checks to detect overlap of memory regions.
    ARM: 5928/1: Change type of VMALLOC_END to unsigned long.
    ARM: 5927/1: Make delimiters of DMA area globally visibly.
    ARM: 5926/1: Add "Virtual kernel memory..." printout.
    ARM: 5920/1: OMAP4: Enable L2 Cache
    ...

    Fix up trivial conflict in arch/arm/mach-mx25/clock.c

    Linus Torvalds