profiles: prpl: tr181-button: optimize button behavior via input event

The implementation offers the following functionalities:

 * Provides and manages the Data Model TR-181 Device.X_PRPLWARE-COM_Buttons on the system bus through Ambiorix.
 * New: automatically pick up the configuration of the physical pushbuttons from the LL-API, using the “label” DeviceTree parameter.
 * Update: use the Linux input device model to listen for button presses, as per LL-API definition.
 * Update DM: support simulation of button presses through the data model, for testing purposes, and for remote triggering of button presses, e.g. through a UI.
 * Update DM: support subscribing to button status (Released/Pressed) DM parameter value change notifications to receive real-time changes.
 * New: model functional events, defined by a physical button, minimum and maximum press duration.
 * New: emit USP data model events when a functional event occurred.

Integrates:
- f4d95b3: ("Optimize button behavior via input event", 2025-03-05)

References: PCF-1673
Signed-off-by: Leon Nguyen (Gemtek) <leon_nguyen@vn.gemteks.com>
Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org> [rebase, commit facelift, author fix]
Signed-off-by: Hela Saadani <hela.saadani_ext@softathome.com>
This commit is contained in:
leon_nguyen 2025-04-04 10:20:40 +07:00 committed by Petr Štetiar
parent e16796826a
commit f0510d5157
No known key found for this signature in database
GPG Key ID: 58EE120F30CC02D3
8 changed files with 56 additions and 10 deletions

View File

@ -4054,12 +4054,28 @@ Check that obuspa has expected datamodel available (minus the platform specific
Device.XPON.ONU.{i}.Version proto::tr181-xpon
Device.XPON.ONUNumberOfEntries proto::tr181-xpon
Device.X_PRPL-COM_Buttons. proto::tr181-button
Device.X_PRPL-COM_Buttons.Action.{i}. proto::tr181-button
Device.X_PRPL-COM_Buttons.Action.{i}.Alias proto::tr181-button
Device.X_PRPL-COM_Buttons.Action.{i}.Message proto::tr181-button
Device.X_PRPL-COM_Buttons.Action.{i}.Method proto::tr181-button
Device.X_PRPL-COM_Buttons.Action.{i}.Name proto::tr181-button
Device.X_PRPL-COM_Buttons.Action.{i}.Object proto::tr181-button
Device.X_PRPL-COM_Buttons.ActionNumberOfEntries proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}. proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Alias proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.MaxInterval proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.MinInterval proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}. proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}.ActionsReference proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}.Alias proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}.Enable proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}.Max proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}.Min proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}.Name proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}.Timeout proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}.Type proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.EventNumberOfEntries proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Location proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Name proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Push() proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Push() input:duration
Device.X_PRPL-COM_Buttons.Button.{i}.Release() proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Status proto::tr181-button
Device.X_PRPL-COM_Buttons.ButtonNumberOfEntries proto::tr181-button
@ -8415,12 +8431,28 @@ Check that obuspa provides the same datamodel again (minus the platform specific
Device.XPON.ONU.{i}.Version proto::tr181-xpon
Device.XPON.ONUNumberOfEntries proto::tr181-xpon
Device.X_PRPL-COM_Buttons. proto::tr181-button
Device.X_PRPL-COM_Buttons.Action.{i}. proto::tr181-button
Device.X_PRPL-COM_Buttons.Action.{i}.Alias proto::tr181-button
Device.X_PRPL-COM_Buttons.Action.{i}.Message proto::tr181-button
Device.X_PRPL-COM_Buttons.Action.{i}.Method proto::tr181-button
Device.X_PRPL-COM_Buttons.Action.{i}.Name proto::tr181-button
Device.X_PRPL-COM_Buttons.Action.{i}.Object proto::tr181-button
Device.X_PRPL-COM_Buttons.ActionNumberOfEntries proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}. proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Alias proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.MaxInterval proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.MinInterval proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}. proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}.ActionsReference proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}.Alias proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}.Enable proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}.Max proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}.Min proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}.Name proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}.Timeout proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Event.{i}.Type proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.EventNumberOfEntries proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Location proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Name proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Push() proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Push() input:duration
Device.X_PRPL-COM_Buttons.Button.{i}.Release() proto::tr181-button
Device.X_PRPL-COM_Buttons.Button.{i}.Status proto::tr181-button
Device.X_PRPL-COM_Buttons.ButtonNumberOfEntries proto::tr181-button

View File

@ -12,6 +12,7 @@ Check that ubus has expected datamodels available:
BulkData
BulkData.Profile
Buttons
Buttons.Action
Buttons.Button
CaptivePortal
CaptivePortal.LANInterface
@ -60,6 +61,7 @@ Check that ubus has expected datamodels available:
Device
Device.Bridging
Device.BulkData
Device.Buttons
Device.CaptivePortal
Device.DHCPv4
Device.DHCPv4.Server
@ -107,7 +109,6 @@ Check that ubus has expected datamodels available:
Device.WiFi
Device.WiFi.Sensing
Device.XPON
Device.X_PRPL-COM_Buttons
Device.X_PRPL-COM_MultiSettings
Device.X_PRPL-COM_PersistentConfiguration
Device.X_PRPL-COM_WANManager

View File

@ -286,11 +286,13 @@ Assure expected build configuration (PCF-1413):
CONFIG_PACKAGE_kmod-ebtables-ipv6=y
CONFIG_PACKAGE_kmod-fs-autofs4=y
CONFIG_PACKAGE_kmod-fs-ext4=y
CONFIG_PACKAGE_kmod-gpio-button-hotplug=y
CONFIG_PACKAGE_kmod-gre=y
CONFIG_PACKAGE_kmod-gre6=y
CONFIG_PACKAGE_kmod-i2c-core=y
CONFIG_PACKAGE_kmod-ifb=y
CONFIG_PACKAGE_kmod-input-core=y
CONFIG_PACKAGE_kmod-input-evdev=y
CONFIG_PACKAGE_kmod-input-gpio-keys=y
CONFIG_PACKAGE_kmod-intel-extmark-x86=y
CONFIG_PACKAGE_kmod-intel-qos=y
CONFIG_PACKAGE_kmod-intel_ppv4_fw_lgm=y

View File

@ -151,7 +151,11 @@ Assure expected build configuration (PCF-1413):
CONFIG_PACKAGE_kmod-ebtables=y
CONFIG_PACKAGE_kmod-ebtables-ipv4=y
CONFIG_PACKAGE_kmod-ebtables-ipv6=y
# CONFIG_PACKAGE_kmod-gpio-button-hotplug is not set
CONFIG_PACKAGE_kmod-ifb=y
CONFIG_PACKAGE_kmod-input-core=y
CONFIG_PACKAGE_kmod-input-evdev=y
CONFIG_PACKAGE_kmod-input-gpio-keys=y
CONFIG_PACKAGE_kmod-ip6-tunnel=y
CONFIG_PACKAGE_kmod-ip6tables=y
CONFIG_PACKAGE_kmod-ip6tables-extra=y

View File

@ -156,7 +156,9 @@ Assure expected build configuration (PCF-1413):
CONFIG_PACKAGE_kmod-ebtables-ipv4=y
CONFIG_PACKAGE_kmod-ebtables-ipv6=y
CONFIG_PACKAGE_kmod-fs-ext4=y
# CONFIG_PACKAGE_kmod-gpio-button-hotplug is not set
CONFIG_PACKAGE_kmod-ifb=y
CONFIG_PACKAGE_kmod-input-gpio-keys=y
CONFIG_PACKAGE_kmod-ip6-tunnel=y
CONFIG_PACKAGE_kmod-ip6tables=y
CONFIG_PACKAGE_kmod-ip6tables-extra=y

View File

@ -286,11 +286,13 @@ Assure expected build configuration (PCF-1413):
CONFIG_PACKAGE_kmod-ebtables-ipv6=y
CONFIG_PACKAGE_kmod-fs-autofs4=y
CONFIG_PACKAGE_kmod-fs-ext4=y
CONFIG_PACKAGE_kmod-gpio-button-hotplug=y
CONFIG_PACKAGE_kmod-gre=y
CONFIG_PACKAGE_kmod-gre6=y
CONFIG_PACKAGE_kmod-i2c-core=y
CONFIG_PACKAGE_kmod-ifb=y
CONFIG_PACKAGE_kmod-input-core=y
CONFIG_PACKAGE_kmod-input-evdev=y
CONFIG_PACKAGE_kmod-input-gpio-keys=y
CONFIG_PACKAGE_kmod-intel-extmark-x86=y
CONFIG_PACKAGE_kmod-intel-qos=y
CONFIG_PACKAGE_kmod-intel_ppv4_fw_lgm=y

View File

@ -164,6 +164,9 @@ Assure expected build configuration (PCF-1413):
CONFIG_PACKAGE_kmod-i2c-mux=y
CONFIG_PACKAGE_kmod-i2c-mux-pca954x=y
CONFIG_PACKAGE_kmod-ifb=y
CONFIG_PACKAGE_kmod-input-core=y
CONFIG_PACKAGE_kmod-input-evdev=y
CONFIG_PACKAGE_kmod-input-gpio-keys=y
CONFIG_PACKAGE_kmod-ip6-tunnel=y
CONFIG_PACKAGE_kmod-ip6tables=y
CONFIG_PACKAGE_kmod-ip6tables-extra=y

View File

@ -15,7 +15,7 @@ feeds:
- name: feed_prplos
uri: https://gitlab.com/prpl-foundation/prplos/feeds/feed-prplos.git
revision: main@c82631a47676b0ee548ae8d5176d9dc43813bed1
revision: main@ff2a631d752ac8c385bc92e5bdfc8269f11364dc
additional_packages:
- feed: packages