07 Jan, 2012

1 commit

  • This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
    and it fixes the build error in the arch/x86/kernel/microcode_core.c
    file, that the merge did not catch.

    The microcode_core.c patch was provided by Stephen Rothwell
    who was invaluable in the merge issues involved
    with the large sysdev removal process in the driver-core tree.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

23 Nov, 2011

1 commit


18 Nov, 2011

1 commit

  • This patch introduces the module_i2c_driver macro which is a convenience macro
    for I2C driver modules similar to module_platform_driver. It is intended to be
    used by drivers which init/exit section does nothing but register/unregister
    the I2C driver. By using this macro it is possible to eliminate a few lines of
    boilerplate code per I2C driver.

    Signed-off-by: Lars-Peter Clausen
    Acked-by: Grant Likely
    Acked-by: Jonathan Cameron
    Acked-by: Wolfram Sang
    Acked-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Lars-Peter Clausen
     

01 Nov, 2011

2 commits

  • The pretty much brings in the kitchen sink along
    with it, so it should be avoided wherever reasonably possible in
    terms of being included from other commonly used
    files, as it results in a measureable increase on compile times.

    The worst culprit was probably device.h since it is used everywhere.
    This file also had an implicit dependency/usage of mutex.h which was
    masked by module.h, and is also fixed here at the same time.

    There are over a dozen other headers that simply declare the
    struct instead of pulling in the whole file, so follow their lead
    and simply make it a few more.

    Most of the implicit dependencies on module.h being present by
    these headers pulling it in have been now weeded out, so we can
    finally make this change with hopefully minimal breakage.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • The original implementations reference THIS_MODULE in an inline.
    We could include , but it is better to avoid chaining.

    Fortunately someone else already thought of this, and made a similar
    inline into a #define in for device_schedule_callback(),
    [see commit 523ded71de0] so follow that precedent here.

    Also bubble up any __must_check that were used on the prev. wrapper inline
    functions up one to the real __register functions, to preserve any prev.
    sanity checks that were used in those instances.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

30 Oct, 2011

1 commit


26 May, 2011

1 commit


20 Mar, 2011

5 commits


22 Jan, 2011

1 commit


11 Jan, 2011

1 commit


16 Nov, 2010

1 commit

  • It's about time to make it clear that i2c_adapter.id is deprecated.
    Hopefully this will remind the last user to move over to a different
    strategy.

    Signed-off-by: Jean Delvare
    Acked-by: Jarod Wilson
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Hans Verkuil

    Jean Delvare
     

01 Nov, 2010

1 commit


25 Oct, 2010

2 commits


12 Aug, 2010

5 commits


11 Aug, 2010

1 commit

  • Fix kernel-doc warnings in linux/i2c.h:

    Warning(include/linux/i2c.h:176): No description found for parameter 'alert'
    Warning(include/linux/i2c.h:259): No description found for parameter 'of_node'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

22 May, 2010

1 commit


04 May, 2010

1 commit


29 Apr, 2010

1 commit

  • The struct device_node *of_node pointer is moving out of dev->archdata
    and into the struct device proper. of_i2c.c needs to set the of_node
    pointer before the device is registered. Since the i2c subsystem
    doesn't allow 2 stage allocation and registration of i2c devices, the
    of_node pointer needs to be passed via the i2c_board_info structure
    so that it is set prior to registration.

    This patch adds of_node to struct i2c_board_info (conditional on
    CONFIG_OF), sets of_node in i2c_new_device(), and modifies of_i2c.c
    to use the new parameter. The calling of dev_archdata_set_node()
    from of_i2c will be removed in a subsequent patch when of_node is
    removed from archdata and all users are converted over.

    Signed-off-by: Grant Likely

    Grant Likely
     

02 Mar, 2010

2 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
     
  • 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
     

15 Dec, 2009

5 commits


07 Dec, 2009

2 commits

  • The legacy probe and force module parameters are obsolete now, the
    same can be achieved using the new_device sysfs interface, which is
    both more flexible and cheaper (it is implemented by i2c-core rather
    than replicated in every driver module.)

    The legacy ignore module parameters can be dropped as well. Ignoring
    can be done by instantiating a "dummy" device at the problematic
    address.

    This is the first step of a huge cleanup to i2c-core's i2c_detect
    function, i2c.h's I2C_CLIENT_INSMOD* macros, and all drivers that made
    use of them.

    Signed-off-by: Jean Delvare

    Jean Delvare
     
  • Low priority thread holding the i2c bus mutex could block higher
    priority threads to access the bus resulting in unacceptable
    latencies. Change the mutex type to rt_mutex preventing priority
    inversion.

    Tested-by: Peter Ujfalusi
    Signed-off-by: Mika Kuoppala
    Signed-off-by: Jean Delvare

    Mika Kuoppala
     

07 Nov, 2009

1 commit


19 Sep, 2009

1 commit


19 Jun, 2009

2 commits

  • For video4linux we sometimes need to probe for a single i2c address.
    Normally you would do it like this:

    static const unsigned short addrs[] = {
    addr, I2C_CLIENT_END
    };

    client = i2c_new_probed_device(adapter, &info, addrs);

    This is a bit awkward and I came up with this macro:

    #define V4L2_I2C_ADDRS(addr, addrs...) \
    ((const unsigned short []){ addr, ## addrs, I2C_CLIENT_END })

    This can construct a list of one or more i2c addresses on the fly. But
    this is something that really belongs in i2c.h, renamed to I2C_ADDRS.

    With this macro we can just do:

    client = i2c_new_probed_device(adapter, &info, I2C_ADDRS(addr));

    Note that this can also be used to initialize an array:

    static const unsigned short addrs[] = I2C_ADDRS(0x2a, 0x2c);

    Whether you want to is another matter, but it works. This functionality is
    also available in the oldest supported gcc (3.2).

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

    Hans Verkuil
     
  • Surround i2c function declarations with ifdefs, so that they aren't
    advertised when i2c-core isn't actually built. That way, drivers using
    these functions unconditionally will result in an immediate build
    failure, rather than a late linking failure which is harder to figure
    out.

    Signed-off-by: Jean Delvare
    Cc: Mark Brown
    Cc: Paul Mundt

    Jean Delvare