# Copyright 2024 The Phosh Developers
#
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of gmobile.
#
# This file contains metadata to apply to keyboards and
# keyboard-like input devices:
#
# - Wakeup keys used for unidling a device
#
# ########################### MATCHING #######################################
#
# The lookup keys are composed in:
#    61-gmobile-rules
#
# Supported hardware matches are:
#
#  - AT keyboard DMI data matches:
#      gmobile:atkbd:dmi:bvn*:bvr*:bd*:svn<vendor>:pn<product>:pvr*
#    <vendor> and <product> are the firmware-provided strings
#    exported by the kernel DMI modalias, see /sys/class/dmi/id/modalias.
#
#  - Input driver device name and DMI data match:
#      gmobile:name:<input device name>:dmi:bvn*:bvr*:bd*:svn<vendor>:pn*
#    <input device name> is the name of the device specified by the
#    driver, <vendor> is the firmware-provided string exported
#    by the kernel DMI modalias, see /sys/class/dmi/id/modalias
#
#  - Input driver device name and machine's device tree compatible match
#      gmobile:name:<input device name>:dt:<compatible>*
#    <input device name> is the device name specified by the
#    driver, <model> is the first entry of the device tree's compatible
#    string from /sys/firmware/devicetree/base/compatible.
#
# Note that the format of this file might change without notice so device
# specific rules should be submitted to gmobile upstream so they can be kept
# in sync.

# ######################### WAKEUP KEYS ######################################
#
# The wakeup keys specify which keys unblank the screen of an idle device. By
# default all keys are wakeup keys The default can be changed on a per keyboard
# basis via
#  GM_WAKEUP_KEY_DEFAULT=0
# The behaviour of individual keys can be changed by giving their keycodes e.g.
#  GM_WAKEUP_KEY_114=0
#  GM_WAKEUP_KEY_115=0
# would remove the volume keys from the list of wakeup keys

###########################################################
# Fairphone
###########################################################

# Fairphone 5
gmobile:name:pmic_resin:dt:fairphone,fp5*
 GM_WAKEUP_KEY_114=0

gmobile:name:gpio-keys:dt:fairphone,fp5*
 GM_WAKEUP_KEY_115=0

###########################################################
# FuriLabs
###########################################################

# FuriLabs FuriPhone FLX1. 114,115 are the volume keys, 112 is assistant button
gmobile:name:mtk-kpd:dt:furilabs,flx1*
 GM_WAKEUP_KEY_112=0
 GM_WAKEUP_KEY_114=0
 GM_WAKEUP_KEY_115=0

###########################################################
# Generic AVRCP bluetooth hardware
###########################################################
gmobile:name:* _AVRCP_:*
 GM_WAKEUP_KEY_DEFAULT=0

###########################################################
# Google
###########################################################

# Pixel 3a (Sargo)
gmobile:name:pm8941_resin:dt:google,sargo*
 GM_WAKEUP_KEY_114=0

gmobile:name:gpio-keys:dt:google,sargo*
 GM_WAKEUP_KEY_115=0

###########################################################
# Juno Computers
###########################################################

# Juno Tab 1 tablet. 114,115 are the volume keys
gmobile:name:Intel HID events:dmi:bvnAmericanMegatrendsInternational,LLC.:bvrJP2V*:svnDefaultstring:*
 GM_WAKEUP_KEY_114=0
 GM_WAKEUP_KEY_115=0

# Juno Tab 2 tablet. 114,115 are the volume keys
gmobile:atkbd:dmi:bvnAmericanMegatrendsInternational,LLC.:bvr*:svnDigitek:*
 GM_WAKEUP_KEY_114=0
 GM_WAKEUP_KEY_115=0

# Juno Tab 3 tablet. 114,115 are the volume keys
gmobile:atkbd:dmi:bvnAmericanMegatrendsInternational,LLC.:bvr*:svnJunoComputers:pnjunotab3:*
 GM_WAKEUP_KEY_114=0
 GM_WAKEUP_KEY_115=0

###########################################################
# OnePlus
###########################################################

# OnePlus 6
gmobile:name:Volume keys:dt:oneplus,enchilada*
 GM_WAKEUP_KEY_DEFAULT=0

# OnePlus 6T
gmobile:name:Volume keys:dt:oneplus,fajita*
 GM_WAKEUP_KEY_DEFAULT=0

###########################################################
# Pine64
###########################################################

# PinePhone
gmobile:name:1c21800.lradc:dt:pine64,pinephone-1.*
 GM_WAKEUP_KEY_DEFAULT=0

gmobile:name:PinePhone 1c22e00.codec-jack:dt:pine64,pinephone-1.*
 GM_WAKEUP_KEY_164=0

# PinePhone Pro
gmobile:name:adc-keys:dt:pine64,pinephone-pro*
 GM_WAKEUP_KEY_DEFAULT=0

###########################################################
# Purism
###########################################################

# Purism Librem 11 tablet. 114,115 are the volume keys
gmobile:atkbd:dmi:bvn*:bvr*:svnPurism:pnLibrem11:*
 GM_WAKEUP_KEY_114=0
 GM_WAKEUP_KEY_115=0

# Purism Librem 5 phone. 114,115 are the volume keys
gmobile:name:gpio-keys:dt:purism,librem5*
 GM_WAKEUP_KEY_114=0
 GM_WAKEUP_KEY_115=0

###########################################################
# Samsung
###########################################################

# Samsung Galaxy A5 (A500F*). tm2-touchkey is capacitative buttons
# 114+115 are volume buttons
gmobile:name:GPIO Buttons:dt:samsung,a5*
  GM_WAKEUP_KEY_115=0

gmobile:name:tm2-touchkey:dt:samsung,a5*
  GM_WAKEUP_KEY_DEFAULT=0

gmobile:name:pm8941_resin:dt:samsung,a5*
  GM_WAKEUP_KEY_114=0

###########################################################
# SHIFT GmbH
###########################################################

# SHIFT6mq phone. 114,115 are volume keys
gmobile:name:pm8941_resin:dt:shift,axolotl*
 GM_WAKEUP_KEY_114=0

gmobile:name:gpio-keys:dt:shift,axolotl*
 GM_WAKEUP_KEY_115=0

###########################################################
# Xiaomi
###########################################################

# Xiaomi Mi A2 Lite (xiaomi-daisy). 114+115 are volume buttons
gmobile:name:gpio-keys:dt:xiaomi,daisy*
 GM_WAKEUP_KEY_115=0

gmobile:name:pm8941_resin:dt:xioami,daisy*
 GM_WAKEUP_KEY_114=0
