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

Commit f6a268d4 authored by David Collins's avatar David Collins
Browse files

ARM: dts: msm: add gpio_key devices for buttons on sdmshrike MTP and CDP



Add pinctrl configurations for home and volume up buttons which
utilize PM855_1 GPIOs 1 and 6 respectively.  Add gpio_key devices
for these buttons on SDMSHRIKE MTP and CDP boards.

Change-Id: I14c15544ce41444b929d7b8128f47deea221a990
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent bc368222
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 "sdmshrike-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_1_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_1_gpios 6 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <KEY_VOLUMEUP>;
			gpio-key,wakeup;
			debounce-interval = <15>;
			linux,can-disable;
		};
	};
};

&qupv3_se12_2uart {
	status = "ok";
};
+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 "sdmshrike-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_1_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_1_gpios 6 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <KEY_VOLUMEUP>;
			gpio-key,wakeup;
			debounce-interval = <15>;
			linux,can-disable;
		};
	};
};

&qupv3_se12_2uart {
	status = "ok";
};
+23 −0
Original line number Diff line number Diff line
@@ -86,3 +86,26 @@ pm855_1_gpios: &pm855_gpios {
		#size-cells = <1>;
	};
};

/* PMIC GPIO pin control configurations: */
&pm855_1_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>;
		};
	};
};