23 Nov, 2011

1 commit

  • 10-bit addresses overlap with traditional 7-bit addresses, leading in
    device name collisions. Add an arbitrary offset to 10-bit addresses to
    prevent this collision. The offset was chosen so that the address is
    still easily recognizable.

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

    Jean Delvare
     

25 Jul, 2011

1 commit

  • Currently, if an i2c bus driver supports both static and dynamic bus
    ids, it needs to choose between calling i2c_add_numbered_adapter() and
    i2c_add_adapter(). This patch makes i2c_add_numbered_adapter()
    redirect to i2c_add_adapter() if the requested bus id is -1.

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

    Grant Likely
     

17 Apr, 2011

1 commit


31 Mar, 2011

1 commit


20 Mar, 2011

3 commits


22 Jan, 2011

1 commit


15 Jan, 2011

3 commits


11 Jan, 2011

1 commit


16 Nov, 2010

1 commit


25 Oct, 2010

3 commits


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
     
  • In current i2c core driver, call to pm_runtime_set_active from
    i2c_device_pm_resume will unconditionally enable i2c module and
    increment child count of the parent. Because of this, in CPU Idle
    path, i2c does not idle, preventing Core to enter retention. Also i2c
    module will not be suspended upon system suspend as
    pm_runtime_set_suspended is not called from i2c_device_pm_suspend.

    This issue is fixed by removing pm_runtime_set_active call from resume
    path which is not necessary.
    This fix has been tested on OMAP4430.

    Signed-off-by: Partha Basak
    Signed-off-by: Vishwanath BS
    Acked-by: Rafael J. Wysocki
    Cc: Kevin Hilman
    Cc: Ben Dooks
    Signed-off-by: Jean Delvare

    Vishwanath BS
     

12 Aug, 2010

7 commits


24 Jul, 2010

1 commit


10 Jul, 2010

1 commit


06 Jul, 2010

1 commit


03 Jun, 2010

4 commits


22 May, 2010

2 commits


11 May, 2010

1 commit

  • There are three issues with the i2c bus type's power management
    callbacks at the moment. First, they don't include any hibernate
    callbacks, although they should at least include the .restore()
    callback (there's no guarantee that the driver will be present in
    memory before loading the image kernel and we must restore the
    pre-hibernation state of the device). Second, the "legacy"
    callbacks are not going to be invoked by the PM core since the bus
    type's pm object is not NULL. Finally, the system sleep PM
    (ie. suspend/resume) callbacks don't check if the device has been
    already suspended at run time, in which case they should skip
    suspending it. Also, it looks like the i2c bus type can use the
    generic subsystem-level runtime PM callbacks.

    For these reasons, rework the system sleep PM callbacks provided by
    the i2c bus type to handle hibernation correctly and to invoke the
    "legacy" callbacks for drivers that provide them. In addition to
    that make the i2c bus type use the generic subsystem-level runtime
    PM callbacks.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Mark Brown
    Acked-by: Jean Delvare

    Rafael J. Wysocki
     

04 May, 2010

3 commits

  • Using a single list for all userspace devices leads to a dead lock
    on multiplexed buses in some circumstances (mux chip instantiated
    from userspace). This is solved by using a separate list for each
    bus segment.

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

    Jean Delvare
     
  • Some FSC hardware monitoring chips (Syleus at least) doesn't like
    quick writes we typically use to probe for I2C chips. Use a regular
    byte read instead for the address they live at (0x73). These are the
    only known chips living at this address on PC systems.

    For clarity, this fix should not be needed for kernels 2.6.30 and
    later, as we started instantiating the hwmon devices explicitly based
    on DMI data. Still, this fix is valuable in the following two cases:
    * Support for recent FSC chips on older kernels. The DMI-based device
    instantiation is more difficult to backport than the device support
    itself.
    * Case where the DMI-based device instantiation fails, whatever the
    reason. We fall back to probing in that case, so it should work.

    This fixes kernel bug #15634:
    https://bugzilla.kernel.org/show_bug.cgi?id=15634

    Signed-off-by: Jean Delvare
    Acked-by: Hans de Goede
    Cc: stable@kernel.org

    Jean Delvare
     
  • After discovering that a lot of i2c-drivers leave the pointer to their
    clientdata dangling, it was decided to let the core handle this issue.
    It is assumed that the core may access the private data after remove()
    as there are no guarantees for the lifetime of such pointers anyhow (see
    thread starting at http://lkml.org/lkml/2010/3/21/68)

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

    Wolfram Sang
     

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