linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@caiaq.de>
To: Constantin Baranov <const@mimas.ru>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Richard Purdie <rpurdie@rpsys.net>,
	linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH] leds-alix2: add support for button connected to J15
Date: Wed, 21 Oct 2009 22:41:58 +0200	[thread overview]
Message-ID: <20091021204158.GN14091@buzzloop.caiaq.de> (raw)
In-Reply-To: <20091022012121.5b35ff22.const@mimas.ru>

On Thu, Oct 22, 2009 at 01:21:21AM +0500, Constantin Baranov wrote:
> I wonder why do you integrate the input driver into the leds driver. They
> should be separated. Or at least the complex driver should be moved to the
> "X86 Platform Specific Device Drivers" and renamed to some like "PC Engines
> ALIX Extras". I personally would prefer the separation way.

I would as well, yes. And I was of course considerating this when I
hacked these lines. However, the major part of the LED driver and what
it currently shares with the button implementation is the BIOS detection
code which is so ugly that I didn't want to duplicate it ;) That would,
however, be the only option if you wanted to split the drivers up. Or
do you have any better idea?

> Also ALIX.2 documentation describes the "Mode switch" driven by GPIO which is a
> small button on front side of a board. I guessed your driver is not for this
> button. If so, would it be better to provide the mode switch as KEY_PROG1 and
> the J15 connected button as KEY_PROG2 at once?

Correct, the button this code is for is not the one on the 'front' side
of the PCB. The other one I didn't try yet, but according the the
CS5536A datasheet, the alternate function for that pin is WORK_AUX which
can be used for power switching purposes. So that might need some extra
care probably.

However, if you can make any suggestion of how to split the code without
copying more than half of the lines for that, I'd be happy with that as
well, of course :)

Daniel

  reply	other threads:[~2009-10-21 20:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-16 13:03 [PATCH] leds-alix2: add support for button connected to J15 Daniel Mack
2009-10-18  7:27 ` Dmitry Torokhov
2009-10-19  7:37   ` Daniel Mack
2009-10-20  1:38     ` Dmitry Torokhov
2009-10-20 10:13       ` Daniel Mack
2009-10-21  4:35         ` Dmitry Torokhov
2009-10-21 19:33           ` Daniel Mack
2009-10-21 20:21             ` Constantin Baranov
2009-10-21 20:41               ` Daniel Mack [this message]
2009-10-21 21:39                 ` Constantin Baranov
2009-10-21 22:09                   ` Constantin Baranov
2009-10-22 10:11                     ` Daniel Mack
2009-10-18 10:56 ` Richard Purdie
2009-10-19  7:16   ` Daniel Mack
2009-10-22 10:29     ` Pavel Machek

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=20091021204158.GN14091@buzzloop.caiaq.de \
    --to=daniel@caiaq.de \
    --cc=const@mimas.ru \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /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).