Commit Graph

86 Commits

Author SHA1 Message Date
Martin
8f16045a20 added deviceprofile for fairphone 4
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2023-06-18 19:23:05 -07:00
Raymond Hackley
dcde1d9d04 Add device profile for Samsung devices
Add device profile for the following Samsung devices:
- Samsung Galaxy E7 (samsung,e7)
- Samsung Galaxy Grand Max (samsung,grandmax)
- Samsung Galaxy J5 2015 and 2016 (samsung,j5(x))

v2: Add missing scripts/deviceprofiles/sxmo_deviceprofile_samsung,*.sh
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
2023-06-05 13:41:00 +02:00
René Kliment
8691177ba5 add initial support for samsung,n8010
This makes the power, volume down & volume up buttons work in SXMO
on my Samsung Galaxy Note 10.1 (samsung-p4note), the N8010 variant.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2023-05-21 17:47:59 -07:00
Jan Wagemakers
3b771cf697 add device profile for shiftphone shift6mq (shift,axolotl)
This device profile makes the power and volume keys work on my shiftphone shift6mq.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2023-04-23 18:57:42 -07:00
Willow Barraco
4cfdfa3b26 Drop now useless wakeup management
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2023-02-23 17:11:50 -06:00
Peter John Hartman
3ab8dedd42 rtw scan threshold fix.
After scratching my head about this hack, I've decided to (1) document
it in a comment and (2) make it run only when configured explicitly and
(3) removed the != modem check. Why was the != modem check there? We
want to do this all the time.

Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
2023-02-06 10:01:33 +01:00
Joshua Murphy
c34ee328ec Fix monitor for fajita
This patch supersedes my previous patch for fixing just the scale value.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-12-18 08:47:30 +01:00
Joshua Murphy
437258d34c Increase scale for fajita and enchilada
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-12-18 08:47:30 +01:00
HexagonWin
968edf20fd Fix volume keys for lge,hammerhead
The current values are not working as of kernel 5.19, so we update the
values.

Signed-off-by: HexagonWin <hexagonwin@disroot.org>
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-12-17 13:11:56 +01:00
xengineering
341381fa5c Fix scale for samsung,gt510
The currently used scale is far too big. This commit decreases it from
2.0 to 1.5 which looks good on the device.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-12-17 11:04:28 +01:00
Dominic Martinez
a9d11d6e62 fix screen rotation on some devices
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-12-17 11:03:02 +01:00
ArenM
329f3bfda9 Make sure there is a cron job to run before blocking suspend
This fixes an bug where the system is prevented from suspending by a
stuck "Waiting for cronjob" mutex.

The wakeup_active count doesn't provide information about system
wakeups, so track the amount of time spent in suspend instead. Also make
sxmo_hook_mnc.sh responsible for deciding if the system has time to
suspend before the next cron job. This makes the suspend code a bit
cleaner.

There are two bugs that can cause the mutex to get stuck:

Bug one: The kernel allows multiple applications to request multiple
wakeup times, if anything else does we will get stuck.

Bug two: /sys/class/wakeup/wakeupN/active_count does not count the
number of times the device woke the system from suspend. It counts the
number of times the device prevented the system from suspending.

Periodically the kernel syncs the system clock to the rtc. When doing
this the rtc subsystem takes a wakelock to prevent the system from
suspending until the time has been updated, which increments
active_count. If this happens while resuming we get stuck.

This is a kernel stack trace I captured of this happening while resuming:
    wakeup_source_activate+0
    pm_stay_awake+68
    rtc_set_time+212
    sync_hw_clock+436
    process_one_work+520
    worker_thread+120
    kthread+276
    ret_from_fork+16

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-12-17 10:23:22 +01:00
Diego Valcarce
9a31200c13 Add device profile for 'samsung,a3u-eur'
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-12-05 11:36:02 -08:00
Philipp Schmitt
97734923c2 polaris: add device profile
Signed-off-by: Philipp Schmitt <philipp@schmitt.co>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-12-05 11:34:31 -08:00
Stacy Harper
a2405f6d57 Fix shellspec 2022-11-15 13:41:55 +01:00
medsouz
4380117f2d Update Pinephone Pro power button to match new devicetree
The current configuration is based on an old devicetree provided with Tow-Boot.

Most (if not all) distributions will be packaging a newer version with a changed gpio name for the power button.

For more information check this issue on PostmarketOS: https://gitlab.com/postmarketOS/pmaports/-/merge_requests/3628#note_1164572571

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-11-13 23:54:19 -08:00
Anjandev Momi
a92dc42968 poco f1: add vibration file path
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-11-07 21:06:00 +01:00
ArenM
8926890d05 Check for eg25-manager command instead of SXMO_EG25
eg25-manger should only be installed on systems that have a eg25 modem.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-11-07 20:09:24 +01:00
ArenM
2e84d9ce9a remove usb/bind & usb/unbind from SXMO_SYS_FILES
I believe these were used in the early days of sxmo to reset the
connection to the modem. eg25-manager now handles this.

Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2022-11-05 07:42:58 -05:00
Stacy Harper
ab1591971e Do not scale to 2 by default
This scaling value should be specific to devices and screen sizes. I use
sxmo on my destkops and I dont want this value by default from the
swayinitconf that I cant manage.
2022-10-31 11:51:13 +01:00
Anjandev Momi
1bede5167a deviceprofiles: document SXMO_VIBRATE_DEV envvariable 2022-10-16 20:41:12 -07:00
Anjandev Momi
937f7ea0f0 oneplus,enchilada.sh: add monitor, vibrate dev, and disable led 2022-10-16 20:40:56 -07:00
Joshua Murphy
6122392403 Update oneplus,fajita with haptics and disable leds
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-10-16 18:54:46 -04:00
Dani Pragustia
04ef6963c0 deviceprofile: add vibrate input wt88047
Make specific target for vibrate

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-10-05 18:16:15 -04:00
Anjandev Momi
7694591363 deviceprofiles: document SXMO_SWAY_SCALE 2022-09-18 15:05:50 -04:00
Hans Baier
aef9e93a9c add sxmo_deviceprofile_wingtech,wt88047.sh
Signed-off-by: Hans Baier <hansfbaier@gmail.com>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-09-04 23:18:55 -04:00
Stacy Harper
a1c3eebacf Prevent the modem to wake the device up on ppp through gpio input
On sway on ppp the modem got a dedicated device input on sway. It
trigger wake up on some event which break sxmo workflows.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-08-31 17:16:44 -04:00
Joshua Murphy
6b950ed1fc Add deviceprofile for 'oneplus,fajita'
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2022-07-15 22:55:04 +02:00
bjorn3
c1da7a2efb Add device profile for 'qcom,msm8226-mtp'
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-06-22 14:59:27 -04:00
bjorn3
159d7f1e9b Document the SXMO_POWER_BUTTON config option
Also update an outdated reference

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-06-22 14:57:19 -04:00
Hanspeter Portner
17139ad5dc Add device profile for 'samsung,a5u-eur'
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-06-20 13:34:32 -04:00
Anjandev Momi
2bc637969b deviceprofiles: document SXMO_MONITOR 2022-06-16 23:51:07 -04:00
Stacy Harper
91d2aab69a Fix sxmo orientation detection on pp
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-05-22 03:00:16 -04:00
xengineering
351688d038 Add initial support for samsung-gt510
Hi all,

I just tested SWMO on my new samsung-gt510 [1]. SWMO is displayed but input via
buttons and touchscreen does not work.

With this patch the device is quite usable. Some functionality (like LEDs and
modem) is missing / not tested, but this could already be 80 % of the port.

Greetings and thank you for your great work
xengineering

[1] https://wiki.postmarketos.org/wiki/Samsung_Galaxy_Tab_A_9.7_2015_(samsung-gt510)

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-05-22 02:48:12 -04:00
Anjandev Momi
67e3712e3f new SXMO_EG25 envvar specifies if eg25-manager needed
We might need to add more logic to control other modem managers in the
future but I think pinephone is the only one that requires eg25-manager
so lets do this for now.

This fixes modem support on non eg-25manager devices like the poco f1.
I no longer need to manually switch on the modemmonitor on startup and I
dont get the message that eg25-manager failed to start.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-05-12 10:44:48 +02:00
Newbyte
dc657a8c73 Add initial Samsung Galaxy S III support
I see I messed up the first one by not including where it was to go.
This should be better.

Signed-off-by: Newbyte <newbyte@disroot.org>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2022-05-11 10:35:09 -05:00
~mungfusensei
754e244949 Pinephone-Pro profile cleanup
Fixed SXMO_TOUCHSCREEN_ID, added SXMO_MONITOR, and made a small change
to sxmo_hook_start so we don't have to make xorg confs for devices. This
ensures that orientation is correct on devices where DSI-1 may not be
the primary monitor by default. It may not be the cleanest fix, but at
minimum, it doesn't hurt anything if SXMO_MONITOR isn't set.

I removed OG pinephone specific sys_files. I am not sure what their
equivalents are on the pro, or if they are necessary, but since they
don't exist on the pro anyway, it doesn't hurt to remove them.

Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2022-05-03 11:09:37 -05:00
Peter John Hartman
ff2dcdc28f Add spacing in README.md. 2022-04-30 13:55:09 -05:00
ArenM
2ce8c49a04 minor cleanup of device tree compatible docs
This rewords the section on the file name a bit, and adds more resources
for those who want to read more.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-04-18 01:41:28 -04:00
Jami Kettunen
e865ea7b23 deviceprofiles: oneplus,cheeseburger: Disable all LEDs for now
There's constant spam about red/blue/green LEDs in logs which simply
cannot be controlled yet, and the white keypad backlight LED only seems
to be able to get controlled by the flashlight toggle in system menu
anyway.

Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-04-15 20:09:04 -04:00
Jami Kettunen
806e130847 deviceprofiles: longcheer,l8150: set SXMO_LED_WHITE_TYPE correctly
LED_WHITE_TYPE is not a documented variable name and isn't used by
sxmo_led.sh for example; correct it to SXMO_LED_WHITE_TYPE.

Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-04-15 02:34:00 -04:00
Jami Kettunen
bbaa242f01 Add initial OnePlus 5/5T support
Changes in v2:
- correct LED_WHITE_TYPE var to SXMO_LED_WHITE_TYPE for cheeseburger

Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-04-15 02:31:01 -04:00
Anjandev Momi
c7427e5b10 confirm wileyswift and oneplus 6 deviceprofile names
This updates the file names for enchilada to work with Aren's patch:

b91dd113eb

The enchilada (oneplus 6) compatible string was gotten from:

https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sdm845-oneplus-enchilada.dts#L12

The wileyswift compatibility string was confirmed by travmurav[m] on
\#postmarketos irc channel:

```
anjan
$ tr '\0' '\n' < /proc/device-tree/compatible
longcheer,l8150
qcom,msm8916-v1-qrd/9-v1
qcom,msm8916
```

travmurav[m] said it's important to note that the `-v1-qrd/9-v1` is
shared among at least 3 device models.
2022-04-15 02:15:06 -04:00
Peter John Hartman
7121913720 Add bq paella and oneplus enchilada deviceprofiles
A first stab based only on info given me in input_outputs.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-04-15 02:14:37 -04:00
Anjandev Momi
3990d2c6ed deviceprofiles README: explain the file name 2022-04-13 16:59:28 -04:00
ArenM
b91dd113eb better handling of device-tree compatible string
The kernel documentation specifically says not to use
/sys/firmware/devicetree/base/compatible, and instead use
/proc/device-tree/compatible.
https://www.kernel.org/doc/html/latest/admin-guide/abi-testing.html#abi-sys-firmware-devicetree

Also compatible is null terminated, not comma terminated. Commas are
optional delimiters between manufacturer and model.
https://github.com/devicetree-org/devicetree-specification/releases

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-04-13 16:35:31 -04:00
Anjandev Momi
c86b104b29 fix volume up identifier on poco f1 and document SXMO_VOLUME_BUTTON 2022-04-07 13:34:06 -04:00
Stacy Harper
8d681325f2 fix vol up button on poco f1
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-04-07 13:33:48 -04:00
Anjandev Momi
44ea8c8b27 add poco f1 (codename beryllium) initial support
This patch makes most things work again on the poco f1. However, volume
up key is broken - this is a regression. Volume up used to work on 1.8.2.

I dont know how to debug or fix this. I have a poco f1 and can provide
logs.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-04-06 15:02:02 +02:00
Stacy Harper
abf4a93179 make the wifi scan interval switch device specific
This will solve :

https://todo.sr.ht/~mil/sxmo-tickets/487
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2022-04-03 12:54:35 -05:00