Tegra20: sl101: fix Hall sensor behavior
Subsystems (2)
cover Tegra20: sl101: fix Hall sensor behavior
Hall sensor found in SL101 is not used for closed dock detection as on TF101 or TF101G, it is used to detect if keyboard slider is out. To address this, lets move Lid sensor switch into TF101/G trees and add Tablet mode switch into SL101 tree.
Svyatoslav Ryhel (2):
ARM: tegra20: transformer: fix Hall sensor behavior
board: transformer-t20: add separate env for SL101
arch/arm/dts/tegra20-asus-sl101.dts | 10 ++++++++++ arch/arm/dts/tegra20-asus-tf101.dts | 10 ++++++++++ arch/arm/dts/tegra20-asus-tf101g.dts | 10 ++++++++++ arch/arm/dts/tegra20-asus-transformer.dtsi | 6 ------ board/asus/transformer-t20/configs/sl101.config | 1 + board/asus/transformer-t20/sl101.env | 15 +++++++++++++++ 6 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 board/asus/transformer-t20/sl101.env
Signature · 1 line
2.48.1
PATCH 1/2 ARM: tegra20: transformer: fix Hall sensor behavior
Hall sensor found in SL101 is not used for closed dock detection as on TF101 or TF101G, it is used to detect if keyboard slider is out. To address this, lets move Lid sensor switch into TF101/G trees and add Tablet mode switch into SL101 tree.
--- arch/arm/dts/tegra20-asus-sl101.dts | 10 ++++++++++ arch/arm/dts/tegra20-asus-tf101.dts | 10 ++++++++++ arch/arm/dts/tegra20-asus-tf101g.dts | 10 ++++++++++ arch/arm/dts/tegra20-asus-transformer.dtsi | 6 ------ 4 files changed, 30 insertions(+), 6 deletions(-)
arch/arm/dts/tegra20-asus-sl101.dts +10 -0
@@ -6,4 +6,14 @@ / { model = "ASUS EeePad Slider SL101"; compatible = "asus,sl101", "nvidia,tegra20"; + + extcon-keys { + compatible = "gpio-keys"; + + switch-tablet-mode { + label = "Tablet Mode"; + gpios = <&gpio TEGRA_GPIO(S, 4) GPIO_ACTIVE_LOW>; + linux,code = <SW_TABLET_MODE>; + }; + }; };
arch/arm/dts/tegra20-asus-tf101.dts +10 -0
@@ -6,4 +6,14 @@ / { model = "ASUS EeePad Transformer TF101"; compatible = "asus,tf101", "nvidia,tegra20"; + + extcon-keys { + compatible = "gpio-keys"; + + switch-dock-hall-sensor { + label = "Lid sensor"; + gpios = <&gpio TEGRA_GPIO(S, 4) GPIO_ACTIVE_LOW>; + linux,code = <SW_LID>; + }; + }; };
arch/arm/dts/tegra20-asus-tf101g.dts +10 -0
@@ -6,4 +6,14 @@ / { model = "ASUS EeePad Transformer TF101G"; compatible = "asus,tf101g", "nvidia,tegra20"; + + extcon-keys { + compatible = "gpio-keys"; + + switch-dock-hall-sensor { + label = "Lid sensor"; + gpios = <&gpio TEGRA_GPIO(S, 4) GPIO_ACTIVE_LOW>; + linux,code = <SW_LID>; + }; + }; };
arch/arm/dts/tegra20-asus-transformer.dtsi +0 -6
@@ -497,12 +497,6 @@ gpios = <&gpio TEGRA_GPIO(Q, 5) GPIO_ACTIVE_LOW>; linux,code = <KEY_UP>; }; - - switch-dock-hall-sensor { - label = "Lid sensor"; - gpios = <&gpio TEGRA_GPIO(S, 4) GPIO_ACTIVE_LOW>; - linux,code = <SW_LID>; - }; }; panel: panel {
Signature · 1 line
2.48.1
PATCH 2/2 board: transformer-t20: add separate env for SL101
In reply to Svyatoslav RyhelSL101 unlike TF101/G has no Lid sensor, so lets add a separate env for SL101 without Lid sensor used.
--- board/asus/transformer-t20/configs/sl101.config | 1 + board/asus/transformer-t20/sl101.env | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 board/asus/transformer-t20/sl101.env
board/asus/transformer-t20/configs/sl101.config +1 -0
@@ -1 +1,2 @@ +CONFIG_ENV_SOURCE_FILE="sl101" CONFIG_DEFAULT_DEVICE_TREE="tegra20-asus-sl101"
board/asus/transformer-t20/sl101.env new file +15 -0
@@ -0,0 +1,15 @@ +#include <env/nvidia/prod_upd.env> + +button_cmd_0_name=Volume Down +button_cmd_0=bootmenu +partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs} +boot_dev=1 + +bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu +bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu +bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu +bootmenu_3=update bootloader=run flash_uboot +bootmenu_4=reboot RCM=enterrcm +bootmenu_5=reboot=reset +bootmenu_6=power off=poweroff +bootmenu_delay=-1
Signature · 1 line
2.48.1