Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01ebc6e1 authored by David Collins's avatar David Collins
Browse files

ARM: dts: msm: add gpio_key devices for buttons on SDM855 MTP, CDP and QRD



Add pinctrl configurations for home and volume up buttons which
utilize PM855 GPIOs 1 and 6 respectively.  Add gpio_key devices
for these buttons on SDM855 MTP, CDP and QRD targets.

Change-Id: Ifc5fba0d068401e2c020dd6462a5bf10889ec30a
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent 1e5a3e7b
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
@@ -10,8 +10,42 @@
 * GNU General Public License for more details.
 */

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

#include "sdm855-pmic-overlay.dtsi"

&qupv3_se12_2uart {
	status = "ok";
};

&soc {
	gpio_keys {
		compatible = "gpio-keys";
		label = "gpio-keys";

		pinctrl-names = "default";
		pinctrl-0 = <&key_home_default
			     &key_vol_up_default>;

		home {
			label = "home";
			gpios = <&pm855_gpios 1 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <KEY_HOME>;
			gpio-key,wakeup;
			debounce-interval = <15>;
			linux,can-disable;
		};

		vol_up {
			label = "volume_up";
			gpios = <&pm855_gpios 6 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <KEY_VOLUMEUP>;
			gpio-key,wakeup;
			debounce-interval = <15>;
			linux,can-disable;
		};
	};
};
+34 −0
Original line number Diff line number Diff line
@@ -10,8 +10,42 @@
 * GNU General Public License for more details.
 */

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

#include "sdm855-pmic-overlay.dtsi"

&qupv3_se12_2uart {
	status = "ok";
};

&soc {
	gpio_keys {
		compatible = "gpio-keys";
		label = "gpio-keys";

		pinctrl-names = "default";
		pinctrl-0 = <&key_home_default
			     &key_vol_up_default>;

		home {
			label = "home";
			gpios = <&pm855_gpios 1 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <KEY_HOME>;
			gpio-key,wakeup;
			debounce-interval = <15>;
			linux,can-disable;
		};

		vol_up {
			label = "volume_up";
			gpios = <&pm855_gpios 6 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <KEY_VOLUMEUP>;
			gpio-key,wakeup;
			debounce-interval = <15>;
			linux,can-disable;
		};
	};
};
+24 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -14,3 +14,26 @@
#include "pm855.dtsi"
#include "pm855b.dtsi"
#include "pm855l.dtsi"

/* PMIC GPIO pin control configurations: */
&pm855_gpios {
	key_home {
		key_home_default: key_home_default {
			pins = "gpio1";
			function = "normal";
			input-enable;
			bias-pull-up;
			power-source = <0>;
		};
	};

	key_vol_up {
		key_vol_up_default: key_vol_up_default {
			pins = "gpio6";
			function = "normal";
			input-enable;
			bias-pull-up;
			power-source = <1>;
		};
	};
};
+34 −0
Original line number Diff line number Diff line
@@ -10,4 +10,38 @@
 * GNU General Public License for more details.
 */

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

#include "sdm855-pmic-overlay.dtsi"

&soc {
	gpio_keys {
		compatible = "gpio-keys";
		label = "gpio-keys";

		pinctrl-names = "default";
		pinctrl-0 = <&key_home_default
			     &key_vol_up_default>;

		home {
			label = "home";
			gpios = <&pm855_gpios 1 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <KEY_HOME>;
			gpio-key,wakeup;
			debounce-interval = <15>;
			linux,can-disable;
		};

		vol_up {
			label = "volume_up";
			gpios = <&pm855_gpios 6 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <KEY_VOLUMEUP>;
			gpio-key,wakeup;
			debounce-interval = <15>;
			linux,can-disable;
		};
	};
};