Check gpio-timed-keys function

our dts is:
gpio-timed-keys {
compatible = “gpio-timed-keys”;
status = “okay”;
power {
linux,num_codes = <2>;
debounce-interval = <30>;
linux,press-time-secs = <3 8>;
linux,key-codes = <KEY_MAX KEY_POWER>;
};
};
is it right? key-codes are KEY_MAX KEY_POWER, it is means: press 3 secons is KEY_MAX ?
press 8 secons is KEY_POWER?
what is press times for the HW power off

Any update?

hello rd1,

that’s correct, it’ll report these key-events according to your long-press behavior.
FYI, there is a 10-second circuit design on board which limits the maximum long press time.

key-codes are KEY_MAX KEY_POWER, it is means: press 3 secons is KEY_MAX ?
press 8 secons is KEY_POWER?

hello rd1,

it’s gpio-timed-keys to catch key-events with your long-press behavior.
it’s 3-sec for your 1st key-event, and 8-sec for your 2nd key-event,
please also refer to header file to the key-codes.
for example, $L4T_Sources/r32.6.1/Linux_for_Tegra/source/public/kernel/kernel-4.9/include/uapi/linux/input-event-codes.h

you may also check the kernel documentation for the details,
for example, $L4T_Sources/r32.6.1/Linux_for_Tegra/source/public/kernel/nvidia/Documentation/devicetree/bindings/input/gpio-timed-keys.txt

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.