linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Christoph Anton Mitterer <calestyo@scientia.net>,
	linux-kernel@vger.kernel.org, wokeswang@qnap.com
Subject: Re: support for Intel Atom based QNAP LEDs/buttons/buzzer in Linux?
Date: Fri, 21 Jun 2013 13:45:18 -0700	[thread overview]
Message-ID: <20130621204518.GA9370@roeck-us.net> (raw)
In-Reply-To: <20130620214207.GA12922@kroah.com>

On Thu, Jun 20, 2013 at 02:42:07PM -0700, Greg KH wrote:
> On Thu, Jun 20, 2013 at 11:28:26PM +0200, Christoph Anton Mitterer wrote:
> > Hey Greg.
> > 
> > On Wed, 2013-06-19 at 19:59 -0700, Greg KH wrote:
> > > If you can dig the code out into a stand-alone form that I can make into
> > > a patch for the drivers/staging/ tree, I'll be glad to take it.
> > Well I don't think my kernel/hardware development skills are enough for
> > that... especially as Guenter already said that the code shouldn't be
> > part of hwmon/it87 ... but rather a separate gpio driver...
> 
> Fair enough.
> 
The best/cleanest option would be to have a mfd core driver for the IT87xx
variants and client drivers for hwmon, gpio, etc. Given that this might be
a bit complicated, another option would be to add gpio support into the
it87 driver itself. Unfortunately, I won't have time to do any of that.

What is worse is that the QNAP folks hacked the kernel all over the place.
There isn't just GPIO access added to the it87 driver (without using the gpio
subsystem), but platform initialization as well as code to access LEDs
and power buttonswere added to it as well. Overall they have hundreds of
patches on top of a 3.4.6 kernel. So we are not only talking about adding
support for the GPIO pins of IT87xx, and adding LED support as well as power
button handling on top of that, but about digging through a whole lot of
changes all over the place to find what is relevant.

The bad thing about it is really that many of the changes they made would be
beneficial to have in the upstream kernel, only it would probably take
man-years to clean it all up and get it there. Now the code isn't upstream,
they have a maintenance nightmare, and no one benefits from it :(.

Guenter

> > > Or, if
> > > you get a contact at QNAP, I'll be glad to help out there as well
> > Well I've asked them again,... no reply so far.
> > The only direct contact I know (from the sources of their drivers) is
> > Wokes Wang, which I've CCed. Perhaps he can help.
> 
> That would be great.  Also, do you have a pointer to the git tree for
> the hardware again, I can't seem to find it.  I can dig through the tree
> to see if I can make something "self-contained", if you are willing to
> test it out.
> 
> thanks,
> 
> greg k-h
> 

  parent reply	other threads:[~2013-06-21 20:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-15  1:31 support for Intel Atom based QNAP LEDs/buttons/buzzer in Linux? Christoph Anton Mitterer
2013-06-20  0:14 ` Christoph Anton Mitterer
2013-06-20  2:59   ` Greg KH
2013-06-20 21:28     ` Christoph Anton Mitterer
2013-06-20 21:42       ` Greg KH
2013-06-20 21:56         ` Christoph Anton Mitterer
2013-06-24 22:36           ` Greg KH
2013-06-20 22:18         ` Christoph Anton Mitterer
2013-06-21 20:45         ` Guenter Roeck [this message]
2013-10-13 23:46 Christoph Anton Mitterer
2013-10-14  1:19 ` Guenter Roeck
     [not found]   ` <CAO69nHLG6dY+x9TdkrO2neXUwv60j6sV0TfeTf9GwYyyyp+fZg@mail.gmail.com>
2013-10-14 15:15     ` Guenter Roeck

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=20130621204518.GA9370@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=calestyo@scientia.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wokeswang@qnap.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).