Driver Development; Gpio_Keys Driver - Embest SBC8600B User Manual

Hide thumbs Also See for SBC8600B:
Table of Contents

Advertisement

Embest Technology Co., Ltd
Linux-4.1/sound/soc/davinci/davinci-evm.c
Linux-4.1/sound/soc/codecs/sgtl5000.c

3.8 Driver Development

3.8.1 GPIO_keys Driver

Device Definition
Linux-4.1/arch/arm/boot/dts/embest-SBC-SBC8600.dts
define gpio0.20 as "menu" key, return value as "KEY_F1", triggered by low level;
gpio2.1 as "back" key, return value as "KEY_ESC", triggered by low level
gpio_keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&button_pins>;
key@0 {
};
key@1 {
};
};
GPIO pinmux Configuration
Define
the
GPIO0.20
AM33XX_PIN_INPUT (configuration input).
Linux-4.1/arch/arm/boot/dts/embest-SBC-SBC8600.dts
Copyright © 2017 Embest Technology
label = "MENU";
linux,code = <KEY_F1>;
gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
gpio-key,wakeup;
label = "BACK";
linux,code = <KEY_ESC>;
gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
gpio-key,wakeup;
and
GPIO2.1
as
MODE7
(GPIO
SBC8600B-UM-V2.0
43
mode)
and

Advertisement

Table of Contents
loading

Table of Contents