07 Dec, 2017

6 commits

  • The .probe_chip function is supposed to probe an i2c device on the bus to
    determine whether a device is answering to a particular address.
    at91_i2c_probe_chip() did not do anything resembling this and always
    returned 0.

    It looks as though at91_i2c_probe_chip() was intended to be a .probe
    function for the controller, as it was copied-and-pasted to become
    at91_i2c_probe() in 0bc8f640a4d7ed.

    Removing the at91_i2c_probe_chip() function makes the higher layer
    (i2c_probe_chip()) try a zero-length read transfer to test for the
    presence of a device instead, which does work.

    Signed-off-by: Alan Ott
    Acked-by: Wenyou Yang
    Reviewed-by: Heiko Schocher

    Alan Ott
     
  • The driver must wait for TXRDY after each byte is pushed into
    the i2c FIFO before pushing the next byte. Previously this was
    not done for the first byte, causing a race condition with zeros
    sometimes being sent for the next byte (which is typically the
    first actual data byte).

    Signed-off-by: Alan Ott
    Reviewed-by: Heiko Schocher

    Alan Ott
     
  • Add some comment describing the purpose of struct members and
    functions.

    Signed-off-by: Beniamino Galvani
    Reviewed-by: Simon Glass
    Reviewed-by: Heiko Schocher

    Beniamino Galvani
     
  • Change meson_i2c_xfer_msg() to return -EREMOTEIO in case of NACK, as
    done by other drivers. Also, don't change the return error in
    meson_i2c_xfer().

    Signed-off-by: Beniamino Galvani
    Reviewed-by: Simon Glass
    Reviewed-by: Heiko Schocher

    Beniamino Galvani
     
  • The datasheet doesn't specify a suggested timeout and 500ms seems very
    long: reduce it to 100ms.

    Signed-off-by: Beniamino Galvani
    Reviewed-by: Simon Glass
    Reviewed-by: Heiko Schocher

    Beniamino Galvani
     
  • Expand the Kconfig description with hardware features.

    Signed-off-by: Beniamino Galvani
    Reviewed-by: Simon Glass
    Reviewed-by: Heiko Schocher

    Beniamino Galvani
     

30 Nov, 2017

1 commit


27 Nov, 2017

1 commit


20 Nov, 2017

2 commits


27 Oct, 2017

2 commits


17 Oct, 2017

3 commits


15 Oct, 2017

2 commits


11 Oct, 2017

1 commit

  • Commit 8e6eda7cda6c ("drivers/i2c/muxes/pca954x: Add pca9547 I2C mux
    support") introduced a chip_desc for the pca954x devices but failed to
    update pca954x_ofdata_to_platdata() to be aware of it. Make
    pca954x_ofdata_to_platdata() lookup the chip_desc to validate the device
    width.

    Signed-off-by: Chris Packham
    Reviewed-by: Marek Behun

    Chris Packham
     

09 Oct, 2017

1 commit

  • In U-Boot -ENODEV means that there is no device. When there is a problem
    with the device, drivers should return an error like -ENXIO or -EREMOTEIO.
    When the device tree properties cannot be read correct , they should
    return -EINVAL.

    Update various GPIO drivers to follow this rule, to help with consistency
    for future driver writers.

    Signed-off-by: Simon Glass
    Reported-by: Adam Ford

    Simon Glass
     

04 Oct, 2017

1 commit

  • U-Boot widely uses error() as a bit noisier variant of printf().

    This macro causes name conflict with the following line in
    include/linux/compiler-gcc.h:

    # define __compiletime_error(message) __attribute__((error(message)))

    This prevents us from using __compiletime_error(), and makes it
    difficult to fully sync BUILD_BUG macros with Linux. (Notice
    Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().)

    Let's convert error() into now treewide-available pr_err().

    Done with the help of Coccinelle, excluing tools/ directory.

    The semantic patch I used is as follows:

    //
    @@@@
    -error
    +pr_err
    (...)
    //

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Simon Glass
    [trini: Re-run Coccinelle]
    Signed-off-by: Tom Rini

    Masahiro Yamada
     

01 Oct, 2017

1 commit


19 Sep, 2017

1 commit


13 Sep, 2017

1 commit


05 Sep, 2017

1 commit


02 Sep, 2017

2 commits


23 Aug, 2017

2 commits

  • Add an i2c mux driver providing access to i2c bus segments using a
    hardware MUX sitting on a master bus and controlled through gpio pins.

    E.G. something like:

    ---------- ---------- Bus segment 1 - - - - -
    | | SCL/SDA | |-------------- | |
    | |------------| |
    | | | | Bus segment 2 | |
    | Linux | GPIO 1..N | MUX |--------------- Devices
    | |------------| | | |
    | | | | Bus segment M
    | | | |---------------| |
    ---------- ---------- - - - - -

    SCL/SDA of the master I2C bus is multiplexed to bus segment 1..M
    according to the settings of the GPIO pins 1..N.

    Note commit log from kernel
    commit 92ed1a76("i2c: Add generic I2C multiplexer using GPIO API")

    Signed-off-by: Peng Fan
    Tested-by: Peng Fan (i.MX6QP-Sabreauto)
    Cc: Heiko Schocher
    Cc: Stefano Babic
    Cc: Simon Glass

    Peng Fan
     
  • Add i2c driver which can be used on both STM32F7 and STM32H7.
    This I2C block supports the following features:
    _ Slave and master modes
    _ Multimaster capability
    _ Standard-mode (up to 100 kHz)
    _ Fast-mode (up to 400 kHz)
    _ Fast-mode Plus (up to 1 MHz)
    _ 7-bit and 10-bit addressing mode
    _ Multiple 7-bit slave addresses (2 addresses, 1 with configurable mask)
    _ All 7-bit addresses acknowledge mode
    _ General call
    _ Programmable setup and hold times
    _ Easy to use event management
    _ Optional clock stretching
    _ Software reset

    Signed-off-by: Christophe Kerello
    Signed-off-by: Patrice Chotard
    Reviewed-by: Simon Glass

    Patrice Chotard
     

10 Aug, 2017

2 commits


09 Aug, 2017

2 commits


29 Jul, 2017

1 commit


23 Jul, 2017

1 commit


18 Jul, 2017

1 commit


12 Jul, 2017

2 commits

  • Change is consistent with other SOCs and it is in preparation
    for adding SOMs. SOC's related files are moved from cpu/ to
    mach-imx/.

    This change is also coherent with the structure in kernel.

    Signed-off-by: Stefano Babic

    CC: Fabio Estevam
    CC: Akshay Bhat
    CC: Ken Lin
    CC: Marek Vasut
    CC: Heiko Schocher
    CC: "Sébastien Szymanski"
    CC: Christian Gmeiner
    CC: Stefan Roese
    CC: Patrick Bruenn
    CC: Troy Kisky
    CC: Nikita Kiryanov
    CC: Otavio Salvador
    CC: "Eric Bénard"
    CC: Jagan Teki
    CC: Ye Li
    CC: Peng Fan
    CC: Adrian Alonso
    CC: Alison Wang
    CC: Tim Harvey
    CC: Martin Donnelly
    CC: Marcin Niestroj
    CC: Lukasz Majewski
    CC: Adam Ford
    CC: "Albert ARIBAUD (3ADEV)"
    CC: Boris Brezillon
    CC: Soeren Moch
    CC: Richard Hu
    CC: Wig Cheng
    CC: Vanessa Maegima
    CC: Max Krummenacher
    CC: Stefan Agner
    CC: Markus Niebel
    CC: Breno Lima
    CC: Francesco Montefoschi
    CC: Jaehoon Chung
    CC: Scott Wood
    CC: Joe Hershberger
    CC: Anatolij Gustschin
    CC: Simon Glass
    CC: "Andrew F. Davis"
    CC: "Łukasz Majewski"
    CC: Patrice Chotard
    CC: Nobuhiro Iwamatsu
    CC: Hans de Goede
    CC: Masahiro Yamada
    CC: Stephen Warren
    CC: Andre Przywara
    CC: "Álvaro Fernández Rojas"
    CC: York Sun
    CC: Xiaoliang Yang
    CC: Chen-Yu Tsai
    CC: George McCollister
    CC: Sven Ebenfeld
    CC: Filip Brozovic
    CC: Petr Kulhavy
    CC: Eric Nelson
    CC: Bai Ping
    CC: Anson Huang
    CC: Sanchayan Maity
    CC: Lokesh Vutla
    CC: Patrick Delaunay
    CC: Gary Bisson
    CC: Alexander Graf
    CC: u-boot@lists.denx.de
    Reviewed-by: Fabio Estevam
    Reviewed-by: Christian Gmeiner

    Stefano Babic
     
  • This I2C mux is found, for example, on the Turris Omnia board.

    Signed-off-by: Marek Behun
    Reviewed-by: Heiko Schocher
    Signed-off-by: Stefan Roese

    Marek Behún
     

09 Jul, 2017

1 commit


07 Jul, 2017

1 commit

  • AVR32 is gone. It's already more than two years for no support in Buildroot,
    even longer there is no support in GCC (last version is heavily patched 4.2.4).

    Linux kernel v4.12 got rid of it (and v4.11 didn't build successfully).

    There is no good point to keep this support in U-Boot either.

    Reviewed-by: Simon Glass
    Reviewed-by: Tom Rini
    Reviewed-by: Heiko Schocher
    Signed-off-by: Andy Shevchenko

    Andy Shevchenko
     

04 Jul, 2017

1 commit

  • There was for long time no activity in the 4xx area.
    We need to go further and convert to Kconfig, but it
    turned out, nobody is interested anymore in 4xx,
    so remove it.

    Signed-off-by: Heiko Schocher

    Heiko Schocher