All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Lippert <rlippert@google.com>
To: Patrick Williams <patrick@stwcx.xyz>
Cc: Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>,
	openbmc@lists.ozlabs.org
Subject: Re: [PATCH linux v1 0/4] Seven segment display support
Date: Wed, 14 Dec 2016 15:23:49 -0800	[thread overview]
Message-ID: <CAFRv3wwRV0j6YU63VTJ0WDBy3edReCOPmtc4RuSDC82yKDVb5g@mail.gmail.com> (raw)
In-Reply-To: <20161214143556.GA13350@heinlein.lan>

On Wed, Dec 14, 2016 at 6:35 AM, Patrick Williams <patrick@stwcx.xyz> wrote:
>
> On Tue, Dec 13, 2016 at 11:55:00PM -0800, Jaghathiswari Rankappagounder Natarajan wrote:
>
> Jaghu,
>
> Bringing the discussion back onto just the OpenBMC list.
>
> Thank you for getting this out to the broader Linux community to solicit
> feedback.  As you see, even if things look good to some of the kernel
> devs here from a "is this generally how the kernel does things" and "is
> this code generally of quality to be acceptable upstream" there is a lot
> of history and design decisions on something as large as the Linux
> kernel for any of us to all keep track of.
>
> When we are adding support for a new device of a type already supported,
> like an i2c-eeprom or a thermal sensor, it is fairly easy to assume
> we're going to go through the upstream community.  When we are adding
> something new, like this 7-seg display, there is more likely to be
> resistance.  Maybe Joel can weigh in on, going forward, how we get early
> feedback so we don't spend a lot of time working on code that will never
> be accepted.
>
> I read through the current responses and the referenced email chain from
> 2013 with a similar driver and there seems to be two major points in the
> feedback.
>
> 1) The chip you are driving the 7-seg display with is already supported
> as a SPI-attached GPIO controller.
>
>     It does look like that driver plus SPI_BITBANG might allow us to
>     control the GPIOs on that device as a normal GPIO controller.  Is
>     that something you would like to try out and see if you can get
>     working?  Hopefully that would reduce your code to just the
>     translation from character to GPIO settings.

This was my original hope but Jagha tried it and it doesn't work :(

The serial GPIO interface is slightly different wrt the buffer chips
that we use vs the ones that are needed to work with the serial GPIO
driver (namely the lack of a "load" signal) and there is no way to
make it work as far as I can tell.

>
>
> 2) The community isn't interested in a one-off driver like this.
>
>     The thread from 2013 raised points about how a 7-segment display
>     driver isn't generic enough to support "X-segment displays".  One
>     of the authors mentioned how some displays have a decimal place that
>     can also be lit.  This lead Greg K-H to the decision that it would
>     best be handled from userspace.
>
>     I believe Google has a desire to get post codes from the BMC U-boot and
>     kernel, hence why you tried to put it into the kernel?  Are there
>     additional reasons for wanting to put it in the kernel?
>
>     I see three possible solutions, and there may be more:
>
>     a) We use SPI_BITBANG and the GPIO driver for this device (which we
>     probably should do in either case) and use device tree "hogging"
>     of the GPIOs to set the initial kernel post code.  This will cause
>     the kernel to light that display correctly as it is initializing.
>     We can then write a userspace application to manipulate the GPIOs
>     after that to change the display as appropriate.
>
>     b) We go back to the LKML with some more background on why we would
>     like this in-kernel, as in something unique to the BMC requirements
>     that needs the support in-kernel, and see if that makes them more
>     receptive.  I'm willing to help you work on the message here if you
>     would like.

The other part of this driver that hasn't been written yet is to take
bytes written to LPC port 80h (from the hostboot/etc. firmware) and
echo them to the 7seg display.

That would be easier to do purely in the kernel, although it should
also be possible to do it via a userspace app I guess with a lot more
work...

>
>
>     c) We see how willing Joel is to keep this as an out-of-tree driver.
>     It seems to use pretty generic and not-likely-to-change kernel APIs
>     so I don't see this as a large maintenance burden.
>
>     I suspect we would tend to prefer (a) but I don't know if that will
>     still allow it to meet Google's needs.
>
> Feel free to catch me on IRC today if you'd like to have an active
> discussion on this to get things moving faster.
>
> --
> Patrick Williams
>
> _______________________________________________
> openbmc mailing list
> openbmc@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc
>

  reply	other threads:[~2016-12-14 23:24 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14  7:55 [PATCH linux v1 0/4] Seven segment display support Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55 ` Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55 ` [PATCH linux v1 1/4] Documentation: dt-bindings: Document bindings for seven " Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55   ` Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55   ` Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55 ` [PATCH linux v1 2/4] drivers: misc: Character device driver for seven segment display Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55   ` Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55   ` Jaghathiswari Rankappagounder Natarajan
2016-12-14 12:32   ` Russell King - ARM Linux
2016-12-14 12:32     ` Russell King - ARM Linux
2016-12-14 12:32     ` Russell King - ARM Linux
2016-12-14  7:55 ` [PATCH linux v1 3/4] drivers: misc: Platform driver for seven segment display support Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55   ` Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55 ` [PATCH linux v1 4/4] arm: dts: Add dt-binding to support seven segment display on zaius Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55   ` Jaghathiswari Rankappagounder Natarajan
2016-12-14  8:55   ` Arnd Bergmann
2016-12-14  8:55     ` Arnd Bergmann
2016-12-14  8:55     ` Arnd Bergmann
2016-12-14  9:00     ` Arnd Bergmann
2016-12-14  9:00       ` Arnd Bergmann
2016-12-14 11:06       ` Russell King - ARM Linux
2016-12-14 11:06         ` Russell King - ARM Linux
2016-12-14 11:06         ` Russell King - ARM Linux
2016-12-14 11:40         ` Russell King - ARM Linux
2016-12-14 11:40           ` Russell King - ARM Linux
2016-12-15 23:07           ` Linus Walleij
2016-12-15 23:07             ` Linus Walleij
2016-12-15 23:07             ` Linus Walleij
2016-12-15 23:07             ` Linus Walleij
2016-12-14  9:02   ` Joel Stanley
2016-12-14  9:02     ` Joel Stanley
2016-12-14  9:02     ` Joel Stanley
2016-12-14  9:02     ` Joel Stanley
2016-12-14 12:45 ` [PATCH linux v1 0/4] Seven segment display support Thomas Petazzoni
2016-12-14 12:45   ` Thomas Petazzoni
2016-12-14 12:45   ` Thomas Petazzoni
2016-12-14 12:56   ` Greg KH
2016-12-14 12:56     ` Greg KH
2016-12-14 12:56     ` Greg KH
2016-12-14 13:12     ` Neil Armstrong
2016-12-14 13:12       ` Neil Armstrong
2016-12-14 14:15       ` Arnd Bergmann
2016-12-14 14:15         ` Arnd Bergmann
2016-12-14 14:15         ` Arnd Bergmann
2016-12-14 20:05         ` David Daney
2016-12-14 20:05           ` David Daney
2016-12-20  4:06           ` Jaghathiswari Rankappagounder Natarajan
2016-12-20  4:06             ` Jaghathiswari Rankappagounder Natarajan
2016-12-14 16:50       ` Greg KH
2016-12-14 16:50         ` Greg KH
2016-12-14 14:35 ` Patrick Williams
2016-12-14 23:23   ` Rob Lippert [this message]
2017-02-07  4:03 Jaghathiswari Rankappagounder Natarajan
2017-02-09  3:08 ` Joel Stanley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFRv3wwRV0j6YU63VTJ0WDBy3edReCOPmtc4RuSDC82yKDVb5g@mail.gmail.com \
    --to=rlippert@google.com \
    --cc=jaghu@google.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=patrick@stwcx.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.