mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-20 17:44:33 +08:00
5611fe48c5
CTS-1000 is based on P4080. GPIO 27 is used to signal the FPGA to switch off power, and also associates IRQ 8 with front-panel button press (which we use to call orderly_poweroff()). The relevant device-tree looks like this: gpio0: gpio@130000 { compatible = "fsl,qoriq-gpio"; reg = <0x130000 0x1000>; interrupts = <55 2 0 0>; #gpio-cells = <2>; gpio-controller; /* Allows powering off the system via GPIO signal. */ gpio-halt@27 { compatible = "sgy,gpio-halt"; gpios = <&gpio0 27 0>; interrupts = <8 1 0 0>; }; }; Because the driver cannot match on sgy,gpio-halt (because the node is never processed through of_platform), it matches on fsl,qoriq-gpio and then checks child nodes for the matching sgy,gpio-halt. This also ensures that the GPIO controller is detected prior to sgy_cts1000's probe callback, since that node wont match via of_platform until the controller is registered. Also, because the GPIO handler for triggering system poweroff might sleep, the IRQ uses a workqueue to call orderly_poweroff(). As a final note, this driver may be expanded for other features specific to the CTS-1000. Signed-off-by: Ben Collins <ben.c@servergy.com> Cc: Jack Smith <jack.s@servergy.com> Cc: Vihar Rai <vihar.r@servergy.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> |
||
---|---|---|
.. | ||
bsc913x_rdb.c | ||
common.c | ||
corenet_ds.c | ||
corenet_ds.h | ||
ge_imp3a.c | ||
Kconfig | ||
ksi8560.c | ||
Makefile | ||
mpc85xx_ads.c | ||
mpc85xx_cds.c | ||
mpc85xx_ds.c | ||
mpc85xx_mds.c | ||
mpc85xx_rdb.c | ||
mpc85xx.h | ||
mpc8536_ds.c | ||
p1010rdb.c | ||
p1022_ds.c | ||
p1022_rdk.c | ||
p1023_rds.c | ||
p2041_rdb.c | ||
p3041_ds.c | ||
p4080_ds.c | ||
p5020_ds.c | ||
p5040_ds.c | ||
qemu_e500.c | ||
sbc8548.c | ||
sgy_cts1000.c | ||
smp.c | ||
smp.h | ||
socrates_fpga_pic.c | ||
socrates_fpga_pic.h | ||
socrates.c | ||
stx_gp3.c | ||
tqm85xx.c | ||
xes_mpc85xx.c |