11 Jun, 2016

1 commit


27 Nov, 2015

1 commit


06 Aug, 2015

5 commits

  • Add a new I2C_MUX uclass. Devices in this class can multiplex between
    several I2C buses, selecting them one at a time for use by the system.
    The multiplexing mechanism is left to the driver to decide - it may be
    controlled by GPIOs, for example.

    The uclass supports only two methods: select() and deselect().

    The current mux state is expected to be stored in the mux itself since
    it is the only thing that knows how to make things work. The mux can
    record the current state and then avoid switching unless it is necessary.
    So select() can be skipped if the mux is already in the correct state.
    Also deselect() can be made a nop if required.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Sometimes it is useful to be able to transfer a raw I2C message. This
    happens when the chip address needs to be set manually, or when the data to
    be sent/received is in another buffer.

    Add a function to provide access to this.

    Signed-off-by: Simon Glass
    Acked-by: Heiko Schocher

    Simon Glass
     
  • Move the flags and struct definitions higher in the file so that we can
    reference them with functions declared in the driver model section.

    Signed-off-by: Simon Glass
    Acked-by: Heiko Schocher

    Simon Glass
     
  • Add documentation for the @dev parameter.

    Signed-off-by: Simon Glass
    Acked-by: Heiko Schocher

    Simon Glass
     
  • Add a way to dump the contents of an I2C message for debugging purposes.

    Signed-off-by: Simon Glass
    Acked-by: Heiko Schocher

    Simon Glass
     

11 Jun, 2015

1 commit


15 May, 2015

1 commit


06 May, 2015

2 commits


17 Apr, 2015

1 commit


13 Feb, 2015

2 commits


30 Jan, 2015

5 commits

  • These functions are useful in case the board calls them. Also fix a missing
    parameter caused by applying the wrong patch (actually I failed to send v2
    and applied v1 by mistake).

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present we go through various contortions to store the I2C's chip
    address in its private data. This only exists when the chip is active so
    must be set up when it is probed. Until the device is probed we don't
    actually record what address it will appear on.

    However, now that we can support per-child platform data, we can use that
    instead. This allows us to set up the address when the child is bound,
    and avoid the messy contortions.

    Unfortunately this is a fairly large change and it seems to be difficult to
    break it down further.

    Signed-off-by: Simon Glass
    Reviewed-by: Masahiro Yamada

    Simon Glass
     
  • Rather than assuming that the chip offset length is 1, allow it to be
    provided. This allows chips that don't use the default offset length to
    be used (at present they are only supported by the command line 'i2c'
    command which sets the offset length explicitly).

    Signed-off-by: Simon Glass
    Acked-by: Heiko Schocher

    Simon Glass
     
  • For boards which use multiple I2C devices, or for SOCs which support
    multiple boards, we might want to convert these to driver model at different
    times. At present this is difficult because we need to either use
    CONFIG_DM_I2C for a board or not.

    Add a compatibility layer which implements the old API, thus allowing a
    board to move to driver model for I2C without requiring that everything it
    uses is moved in the same commit.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add a dm_ prefix to driver model I2C functions so that we can keep the old
    ones around.

    This is a little unfortunate, but on reflection it is too difficult to
    change the API. We can undo this rename when most boards and drivers are
    converted to use driver model for I2C.

    Signed-off-by: Simon Glass

    Simon Glass
     

12 Dec, 2014

1 commit

  • The uclass implements the same operations as the current I2C framework but
    makes some changes to make it fit driver model better:

    - Remove the chip address from API calls
    - Remove the address length from API calls
    - Remove concept of 'current' I2C bus
    - Drop all existing init functions

    Acked-by: Heiko Schocher
    Reviewed-by: Masahiro Yamada
    Signed-off-by: Simon Glass

    Simon Glass
     

20 Feb, 2014

1 commit

  • Adds support for set-speed on the OMAP24xx I2C Adapter.

    Changes to omap24_i2c_write(...) for polling ARDY Bit from IRQ-Status.
    Otherwise on a subsequent call the transfer of last byte from the
    predecessor is aborted and therefore lost. For exmaple when
    i2c_write(...) is followed by a i2c_setspeed(...) (which has to
    deactivate and activate master for changing psc,...).

    Minor cosmetical changes.

    Signed-off-by: Hannes Petermaier
    Cc: Heiko Schocher

    Hannes Petermaier
     

14 Nov, 2013

1 commit


17 Oct, 2013

1 commit


20 Aug, 2013

1 commit


24 Jul, 2013

2 commits


23 Jul, 2013

4 commits


08 Jan, 2013

1 commit


17 Sep, 2012

1 commit

  • Support for multiple soft I2C buses.

    Multibus I2C support is achieved by defining get_multi_{sda|scl}_pin
    functions to switch between multiple "soft" I2C buses.

    Common definition of I2C_X I2C buses is provided at .

    TEST HW:
    Samsung's Exynos4210 evt.0.1 - Trats development board

    Signed-off-by: Lukasz Majewski
    Signed-off-by: Kyungmin Park
    Cc: Heiko Schocher
    Cc: Minkyu Kang
    Acked-by: Heiko Schocher

    Łukasz Majewski
     

11 Jan, 2012

1 commit


28 Oct, 2011

1 commit


05 Oct, 2011

1 commit

  • This reverts commit 60ce53cf9f408d9ad721f8e7a87d6a564e6d5bac.

    The commit causes build breakage for a number of boards. This results
    from the fact that now the arguments of debug() actually get
    referenced (even if there is hope that the compiler will optimize
    away the debug() call). The obvious fix to that probem (change the
    code to always declare the referenced variables and data structures)
    increases the code size, and was this rejected. So it was decided to
    revert this commit until a better solution is found.

    Wolfgang Denk
     

02 Oct, 2011

1 commit

  • Fix the following gcc4.6 problems:

    cmd_date.c: In function ‘do_date’:
    cmd_date.c:50:6: warning: variable ‘old_bus’ set but not used
    [-Wunused-but-set-variable]
    asix.c: In function ‘asix_init’:
    asix.c:317:6: warning: variable ‘rx_ctl’ set but not used
    [-Wunused-but-set-variable]
    usb.c: In function ‘usb_parse_config’:
    usb.c:331:17: warning: variable ‘ch’ set but not used
    [-Wunused-but-set-variable]
    usb.c: In function ‘usb_hub_port_connect_change’:
    usb.c:1123:29: warning: variable ‘portchange’ set but not used
    [-Wunused-but-set-variable]
    usb.c: In function ‘usb_hub_configure’:
    usb.c:1183:25: warning: variable ‘hubsts’ set but not used
    [-Wunused-but-set-variable]
    usb_storage.c: In function ‘usb_stor_CB_reset’:
    usb_storage.c:466:6: warning: variable ‘result’ set but not used
    [-Wunused-but-set-variable]

    Signed-off-by: Marek Vasut

    Marek Vasut
     

28 Apr, 2011

1 commit

  • To make sure that the mux can be configured a deblocking sequence
    is done before the mux configuration. After the mux switch the new leaf
    of, the i2c tree must be again deblocked.

    Signed-off-by: Stefan Bigler
    Acked-by: Heiko Schocher
    cc: Wolfgang Denk
    cc: Detlev Zundel
    cc: Prafulla Wadaskar
    cc: Valentin Longchamp
    cc: Holger Brunck
    Signed-off-by: Valentin Longchamp

    Stefan Bigler
     

19 Apr, 2010

1 commit


29 Mar, 2010

1 commit


13 Feb, 2010

1 commit