Re: [PATCH v2] i2c: mt7621: Add MediaTek MT7621/7628/7688 I2C driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Stefan Roese <sr@xxxxxxx>:

This patch adds a driver for the I2C controller found on the MediaTek
MT7621/7628/7688 SoC's. The base version of this driver was done by
Steven Liu (according to the copyright and MODULE_AUTHOR lines). It
can be found in the OpenWRT repositories (v4.14 at the time I looked).

The base driver had many issues, which are disccussed here:

https://en.forum.labs.mediatek.com/t/openwrt-15-05-loads-non-working-i2c-kernel-module-for-mt7688/1286/3

1From this link an enhanced driver version (complete rewrite, mayor
changes: support clock stretching, repeated start, ACK handling and
unlimited message length) from Jan Breuer can be found here:

https://gist.github.com/j123b567/9b555b635c2b4069d716b24198546954

This patch now adds this enhanced I2C driver to mainline.

Changes by Stefan Roese for upstreaming:
- Add devicetree bindings
- checkpatch clean
- Use module_platform_driver()
- Minor cosmetic enhancements

Signed-off-by: Stefan Roese <sr@xxxxxxx>
Cc: Steven Liu <steven_liu@xxxxxxxxxxxx>
Cc: Jan Breuer <jan.breuer@xxxxxxxxx>
Cc: John Crispin <john@xxxxxxxxxxx>
Cc: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
---
v2:
- Configure I2C controller to open-drain instead of push-pull, as
noticed and suggested by Jan (misleading bit description)

Hi Stefan,

I am using the openwrt version for a while on my Ubiquity ER-X-SFP router on top of the net-next tree. But I was unable to readout the SFP module because i2c message size limit of 64 bytes. Without additional patches my console was spamming me with -EOPNOTSUPP because SFP code tries to read +90 bytes in one go.

With this driver the sfp code can readout the module successfully.

Both the SFP module and the GPIO expander on the bus are working.

Tested-by: René van Dorst <opensource@xxxxxxxxxx>

Greats,

René





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux