Re: [RFC PATCH 1/3] mfd: upboard: Add UP2 platform controller driver

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

 



Hi Linus, Wolfram,

Thanks for your feedback!

On Mon, Apr 30, 2018 at 03:32:12PM +0200, Wolfram Sang wrote:
> 
> > But Wolfram needs to have a say in this, I guess the difference to I2C
> > is that each
> > address signifies a set of 16 bits, two bytes instead of  8 bits one byte. Maybe
> > this is to unorthodox for the I2C subsystem to accomodate, and that would
> > be his pick.
> 
> Well, we have a flag to ignore the ACK bit, but no flag to skip it. It
> think we could even add such a flag but then the GPIO driver would
> likely be the only one ever to support it.
> 
> There is another difference: R/W bit is MSB here while it is LSB for
> I2C.

Andy Shevchenko previously suggested reusing i2c-gpio too:
https://lkml.kernel.org/r/20180426023337.u2d6azqcjmjsur5c@localhost

I don't think that is straightforward as this isn't really I2C, only
annoyingly close enough. Besides the lack of ACK, location of R/W bit
and register width as already mentioned, there's also:

- two separate lines for data reads and writes, and
- sequence start signaling pulse on yet another line.

> I didn't get the original patch, so I can't say if this aims for a bus
> architecture or just a one-to-one communication.

It's strictly meant for one-to-one communication between the SoC and a
FPGA-implemented platform controller.

For reference, the full patch series is at:
https://lkml.kernel.org/r/20180421085009.28773-1-javier@xxxxxxxxxx

> I agree it seems worthwhile to have some kind of generic bitbanging GPIO
> driver, flexible enough to support various protocols. That one should
> probably live outside of I2C, however. I2C would then be one occasion to
> use it, and not the reference in which we need to squeeze every other
> protocol in.

I agree - tweaking I2C code to allow for so many quirks feels wrong.

@Linus: if we can't reuse i2c-gpio, would you consider this kind of
generic approach a prerequisite for this patchset?
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux