Re: support for Intel Atom based QNAP LEDs/buttons/buzzer in Linux?
From: Christoph Anton Mitterer
Date: Thu Jun 20 2013 - 18:18:26 EST
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,
#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
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):
- 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 (below the QNAP logo) and the ones
labelled STATUS and USB.
- I'm not sure whether one can control the HDD-LEDs at all (but I'd hope
- The other 3 buttons (in the image labelled COPY, ENTER, SELECT) do all
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.
 These are the QNAP_PIC_POWER_LED_* in their code.
 These are the QNAP_PIC_STATUS_* in their code.
 These are the QNAP_PIC_USB_LED_* in their code.
 There is IOCTL_HD_ERROR_LED_SEND_MESSAGE and int
set_hd_error_led_on(int, int) in their code, which could be that.
 QNAP_PIC_WOL_* and QNAP_PIC_EUP_*
Description: S/MIME cryptographic signature