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

Commit c6686258 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 SDM845 MTP and CDP



Add pinctrl configurations for home, volume up, camera snapshot,
and camera focus buttons which utilize PM8998 GPIOs 5 through 8
respectively.  Add gpio_key devices for these buttons on SDM845
MTP and CDP targets.  Remove a #include statement that causes
compilation to fail due to an undefined pm8998_gpios phandle.

Change-Id: I2bfde12dd21ff8fe3516374d8abb50316af13a4e
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent 5a50fc8d
Loading
Loading
Loading
Loading
+53 −0
Original line number Diff line number Diff line
@@ -10,8 +10,61 @@
 * GNU General Public License for more details.
 */

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

&soc {
	sound-tavil {
		qcom,us-euro-gpios = <&tavil_us_euro_sw>;
	};

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

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

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

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

		cam_snapshot {
			label = "cam_snapshot";
			gpios = <&pm8998_gpios 7 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <766>;
			gpio-key,wakeup;
			debounce-interval = <15>;
			linux,can-disable;
		};

		cam_focus {
			label = "cam_focus";
			gpios = <&pm8998_gpios 8 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <528>;
			gpio-key,wakeup;
			debounce-interval = <15>;
			linux,can-disable;
		};
	};
};
+44 −0
Original line number Diff line number Diff line
@@ -9,3 +9,47 @@
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

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

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

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

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

		cam_snapshot {
			label = "cam_snapshot";
			gpios = <&pm8998_gpios 7 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <766>;
			gpio-key,wakeup;
			debounce-interval = <15>;
			linux,can-disable;
		};

		cam_focus {
			label = "cam_focus";
			gpios = <&pm8998_gpios 8 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <528>;
			gpio-key,wakeup;
			debounce-interval = <15>;
			linux,can-disable;
		};
	};
};
+42 −0
Original line number Diff line number Diff line
@@ -1113,3 +1113,45 @@
		};
	};
};

&pm8998_gpios {
	key_home {
		key_home_default: key_home_default {
			pins = "gpio5";
			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 = <0>;
		};
	};

	key_cam_snapshot {
		key_cam_snapshot_default: key_cam_snapshot_default {
			pins = "gpio7";
			function = "normal";
			input-enable;
			bias-pull-up;
			power-source = <0>;
		};
	};

	key_cam_focus {
		key_cam_focus_default: key_cam_focus_default {
			pins = "gpio8";
			function = "normal";
			input-enable;
			bias-pull-up;
			power-source = <0>;
		};
	};
};
+0 −1
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@
#include "dsi-panel-sharp-1080p-cmd.dtsi"
#include "dsi-panel-sharp-dualmipi-1080p-120hz.dtsi"
#include "dsi-panel-s6e3ha3-amoled-dualmipi-wqhd-cmd.dtsi"
#include "sdm845-pinctrl.dtsi"

&soc {
	dsi_panel_pwr_supply: dsi_panel_pwr_supply {