From 333a4273eb26ffc47b29f3ea8ce3213d36803894 Mon Sep 17 00:00:00 2001 From: Jami Kettunen Date: Fri, 16 Oct 2020 23:54:54 +0300 Subject: flashlight: Add support for simpler sysfs toggles (#34) Unlike the overcomplicated Qualcomm mess, there are also simpler sysfs toggles which you can just write 1/0 to when enabling/disabling the flash. This is used by the MediaTek flashlight_core driver on the Volla Phone (Helio P23 / MT6763) for example, which this also adds support for. Pinephone also uses a simple sysfs toggle for flashlight. --- src/flashlight.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/flashlight.h') diff --git a/src/flashlight.h b/src/flashlight.h index 51ed5e7..19f738e 100644 --- a/src/flashlight.h +++ b/src/flashlight.h @@ -24,6 +24,12 @@ G_BEGIN_DECLS +int +toggle_flashlight_action_qcom(); + +int +toggle_flashlight_action_simple(); + void toggle_flashlight_action(GAction *action, GVariant *parameter G_GNUC_UNUSED, @@ -35,6 +41,9 @@ flashlight_supported(); gboolean flashlight_activated(); +enum +TorchType { SIMPLE = 1, QCOM }; + G_END_DECLS #endif /* INDICATOR_POWER_FLASHLIGHT__H */ -- cgit v1.2.3