aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2020-04-15 22:35:55 +0200
committerLubomir Rintel <lkundrak@v3.sk>2020-08-14 01:55:15 +0200
commitfb83c095500924dd073fd8d7897856f0fefaa45e (patch)
tree79a4efbb36687c2029b5c6b80fa8e872e3e660e6
parent7d980f44409812237879800b7520a5cc4b252792 (diff)
downloadopenfirmware-fb83c095500924dd073fd8d7897856f0fefaa45e.tar.gz
olpc/sound: move the Mic and HP jacks from /gpio-keys to /audio-complex
The Linux codec drivers really wants to know which GPIOs are used for connected jack detection and it also eventually registers an input device.
-rw-r--r--cpu/arm/olpc/sound.fth10
-rw-r--r--dev/olpc/gpio-keys.fth28
2 files changed, 10 insertions, 28 deletions
diff --git a/cpu/arm/olpc/sound.fth b/cpu/arm/olpc/sound.fth
index 93f947a7..3410e428 100644
--- a/cpu/arm/olpc/sound.fth
+++ b/cpu/arm/olpc/sound.fth
@@ -1061,6 +1061,16 @@ device-end
" widgets" property
" /audio/port" encode-phandle " dais" property
+ " /gpio" encode-phandle
+ mic-plug-gpio# encode-int encode+
+ 0 encode-int encode+ \ GPIO_ACTIVE_HIGH
+ " mic-det-gpio" property
+
+ " /gpio" encode-phandle
+ hp-plug-gpio# encode-int encode+
+ 0 encode-int encode+ \ GPIO_ACTIVE_HIGH
+ " hp-det-gpio" property
+
\ The name that was hardcoded in the Linux driver was OLPC XO-1.75
" OLPC XO" " model" string-property
diff --git a/dev/olpc/gpio-keys.fth b/dev/olpc/gpio-keys.fth
index 4d6d916b..6367b74c 100644
--- a/dev/olpc/gpio-keys.fth
+++ b/dev/olpc/gpio-keys.fth
@@ -43,34 +43,6 @@ new-device
" gpios" property
finish-device
-new-device
- " microphone_insert" device-name
- " Microphone Plug" " label" string-property
- 5 " linux,input-type" integer-property \ EV_SW
- 4 " linux,code" integer-property \ SW_MICROPHONE_INSERT
- d# 100 " debounce-interval" integer-property
- 0 0 encode-bytes " wakeup-source" property
-
- " /gpio" encode-phandle
- mic-plug-gpio# encode-int encode+
- 0 encode-int encode+ \ GPIO_ACTIVE_HIGH
- " gpios" property
-finish-device
-
-new-device
- " headphone_insert" device-name
- " Headphone Plug" " label" string-property
- 5 " linux,input-type" integer-property \ EV_SW
- 2 " linux,code" integer-property \ SW_HEADPHONE_INSERT
- d# 100 " debounce-interval" integer-property
- 0 0 encode-bytes " wakeup-source" property
-
- " /gpio" encode-phandle
- hp-plug-gpio# encode-int encode+
- 0 encode-int encode+ \ GPIO_ACTIVE_HIGH
- " gpios" property
-finish-device
-
end-package
\ LICENSE_BEGIN