On Wed, Oct 19, 2016 at 11:53:10AM +0200, Hans de Goede wrote:
> > > If all the hardware allows you to-do is set / read the pin, you
> > > could write a gpio-chip driver for it, and then attach a generic
> > > cec-over-gpio driver to that, that seems like a better idea then
> > > an Allwinner specific bit-bang driver.
> > 
> > That might not be easy to do. The CEC line is a dedicated pin on the SoC,
> > leading to the HDMI controller, much like the HDMI DDC lines. And the 
> > control
> > bits are in the middle of the HDMI register space.
> > 
> > Doing a one-line GPIO controller for that pin should work, though it's a
> > really convoluted approach.

+1

> If we're going to spend time writing a bit-bang cec driver using
> timers we should IMHO really do this through a gpio indirection so
> that the entire bit-bang code can be shared.

Well, it might not be even shared. Someone hooking it on a GPIO will
have an interrupt on that GPIO, and that will change the polling logic
significantly.

> As for this being convoluted, it does not need to be that bad. I
> think you're thinking too much along the lines of doing a
> stand-alone gpio driver + regmap or some such to access the
> register. But we can just have the hdmi encoder driver register a
> gpio_chip, without doing 2 separate drivers, and then the code
> should be pretty clean.

You'd still have to tie it to the CEC stuff. And really, it's not a
GPIO, but more just an O and an I ;)

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: PGP signature

Reply via email to