Re: [PATCH V2 1/5] dt-bindings: fsl: scu: add scu power key binding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 03.09.19 08:37, Anson Huang wrote:
Hi, Oleksij

On 03.09.19 16:03, Anson Huang wrote:
NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as system
controller, the system controller is in charge of system power, clock
and power key event etc. management, Linux kernel has to communicate
with system controller via MU (message unit) IPC to get power key
event, add binding doc for i.MX system controller power key driver.

Signed-off-by: Anson Huang <Anson.Huang@xxxxxxx>
---
Changes since V1:
	- remove "wakeup-source" property, as it is NOT needed for SCU
interrupt;
	- remove "status" in example.
---
   .../devicetree/bindings/arm/freescale/fsl,scu.txt          | 14
++++++++++++++
   1 file changed, 14 insertions(+)

diff --git
a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
index c149fad..f93e2e4 100644
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
+++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
@@ -157,6 +157,15 @@ Required properties:
   Optional properties:
   - timeout-sec: contains the watchdog timeout in seconds.

+Power key bindings based on SCU Message Protocol
+------------------------------------------------------------
+
+Required properties:
+- compatible: should be:
+              "fsl,imx8qxp-sc-pwrkey"
+              followed by "fsl,imx-sc-pwrkey";
+- linux,keycodes: See
+Documentation/devicetree/bindings/input/keys.txt

linux,keycodes is required parameter. So, this kay cab be anything. Why the
compatible is called pwrkey? Probably it is better to call it "*-sc-key"

This key is kind of special, it is ON/OFF button which is designed for power key
purpose, it has HW function such as long pressing it would shutdown the system power,
so we always use it as power key, NOT general key, does it make sense?

I assume, OF devs will argue: DT is describing hardware not software.
On other hand, software will get notification about assertion/deassertion of this key. So, it is just normal key. If, for some reason, it will trigger world destruction, if it is pressed too long... probably no body cares. You can provide fsl,imx-sc-key as additional compatible. In case linux will need some quirks, we still can fall back to more precise compatible "fsl,imx8qxp-sc-pwrkey".

Kind regards,
Oleksij Rempel

--
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux