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

Commit d65ddfcb authored by David Collins's avatar David Collins Committed by Gerrit - the friendly Code Review server
Browse files

ARM: dts: msm: add gpio_key devices for buttons on sm8150-auto ADP STAR



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 SM8150 Auto ADP STAR board.

Change-Id: I62e291cdee2c2e089ab1bf8587a98d6b57162925
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent 02e1552f
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
@@ -10,6 +10,9 @@
 * GNU General Public License for more details.
 */

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

#include "sm8150-auto-pmic-overlay.dtsi"

&soc {
@@ -26,4 +29,33 @@
			status = "disabled";
		};
	};

	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;
		};
	};
};
+23 −0
Original line number Diff line number Diff line
@@ -87,3 +87,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>;
		};
	};
};