On Sun, Sep 26, 2021 at 12:00 PM Sven Peter <sven@xxxxxxxxxxxxx> wrote: > > This series adds support for the I2C controller found on Apple Silicon Macs > which has quite a bit of history: > > Apple bought P.A. Semi in 2008 and it looks like a part of its legacy continues > to live on in the M1. This controller has actually been used since at least the > iPhone 4S and hasn't changed much since then. > Essentially, there are only a few differences that matter: > > - The controller no longer is a PCI device > - Starting at some iPhone an additional bit in one register > must be set in order to start transmissions. > - The reference clock and hence the clock dividers are different > > In order to add support for a platform device I first replaced PCI-specific > bits and split out the PCI driver to its own file. Then I added support > to make the clock divider configurable and converted the driver to use > managed device resources to make it a bit simpler. > > The Apple and PASemi driver will never be compiled in the same kernel > since the Apple one will run on arm64 while the original PASemi driver > will only be useful on powerpc. > I've thus followed the octeon (mips)/thunderx(arm64) approach to do the > split: I created a -core.c file which contains the shared logic and just > compile that one for both the PASemi and the new Apple driver. This looks all very good to me, I had one very minor comment. Whole series Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>