linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Anton Mitterer <calestyo@scientia.net>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: support for Intel Atom based QNAP LEDs/buttons/buzzer in Linux?
Date: Fri, 21 Jun 2013 00:18:05 +0200	[thread overview]
Message-ID: <1371766685.5197.35.camel@fermat.scientia.net> (raw)
In-Reply-To: <20130620214207.GA12922@kroah.com>

[-- Attachment #1: Type: text/plain, Size: 2821 bytes --]

Oh and one more thing:

The QNAP driver seems to be able to do much more than just
LEDs/HDD-LEDs/buzzers/buttons... at least their symbols imply such,
like:
#define QNAP_IOCTL_SATA_UP      0x0100
#define QNAP_IOCTL_SATA_DOWN    0x0200
#define QNAP_IOCTL_ESATA_UP     0x0300
#define QNAP_IOCTL_ESATA_DOWN   0x0400
#define QNAP_IOCTL_SATA_ERR     0x0500
#define QNAP_IOCTL_ETH_UP       0x0600
#define QNAP_IOCTL_ETH_DOWN     0x0700
#define QNAP_IOCTL_BOND_UP      0x0800
#define QNAP_IOCTL_BOND_DOWN    0x0900
#define QNAP_IOCTL_USB_DRV_RELOAD 0x0a00
#define QNAP_IOCTL_USB_SET_POLL_INTV 0x0b00

#define MD_RESYNCING				0x20
#define MD_RESYNCING_DONE			0x21
#define MD_RESYNCING_SKIP			0x22
#define MD1_REBUILDING				0x23
#define MD1_REBUILDING_DONE			0x24
#define MD1_REBUILDING_SKIP			0x25
#define MD1_RESYNCING				0x26
...

and much more (see drivers/qnap/pic.h of their kernel bundle).


I'm not sure whether it would be really a good idea for the end user to
use all these... the "normal" kernel drivers seem to handle all that
just fine.
Same applies for the cooling fan... there are PIC commands to control
it... (with my TS 569 Pro,... that didn't even work from within the
native QNAP firmware)... but fancontrol from lm-sensor already works
fine (any much more granular)... so I guess people should use that...
and it's not needed to add suport for that as well.



When you look at the model that I have (the TS-569 Pro[0]):
http://www.qnap.com/upload/album/24/m_929_20120726112135_59189.png

- The LCD already works, is a A125 device and controllable via an UART.
- The power button already works (normal ACPI button device)

- The buzzer does not yet work.
- With respect to the LEDs... from the native QNAP firmware I was able
to control the left-most one[1] (below the QNAP logo) and the ones
labelled STATUS[2] and USB[3].
- I'm not sure whether one can control the HDD-LEDs at all (but I'd hope
so[4])
- The other 3 buttons (in the image labelled COPY, ENTER, SELECT) do all
not work.



qcontrol (on some ARM based QNAPs) does a bit more and also allows to
set EuP mode and WOL...

One thing that could be interesting was, if it were possible really
power down SATA ports... could perhaps be QNAP_HDERR_ON(nr) /
QNAP_HDERR_OFF(nr)... or QNAP_SATAn_UP / QNAP_SATAn_DOWN ... but that's
just blind guessing.

Best wishes,
Chris.



[0]
http://www.qnap.com/useng/index.php?lang=en-us&sn=862&c=355&sc=526&t=692&n=9904
[1] These are the QNAP_PIC_POWER_LED_* in their code.
[2] These are the QNAP_PIC_STATUS_* in their code.
[3] These are the QNAP_PIC_USB_LED_* in their code.
[4] There is IOCTL_HD_ERROR_LED_SEND_MESSAGE and int
set_hd_error_led_on(int, int) in their code, which could be that.
[5] QNAP_PIC_WOL_* and QNAP_PIC_EUP_*

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5113 bytes --]

  parent reply	other threads:[~2013-06-20 22:18 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 [this message]
2013-06-21 20:45         ` Guenter Roeck
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=1371766685.5197.35.camel@fermat.scientia.net \
    --to=calestyo@scientia.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).