Commit Graph

15 Commits

Author SHA1 Message Date
Tim Crawford aaf10e3dac Handle new KBLED ACPI methods
The EC has been updated to detect if a white or RGB backlit keyboard is
attached at run-time instead of being set at compile-time. The ACPI
methods in coreboot have been updated to handle this new functionality.

Check for the new ACPI method `GKBK` "Get Keyboard Kind" to determine if
the module should use the new logic or the old logic.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-05-30 14:59:07 -06:00
Jeremy Soller ed0112437f Fix system76_remove function on older kernels 2023-03-06 12:47:22 -07:00
Jeremy Soller 0e535fbeb9
Update from upstream, fix build on Linux 6.2 2023-03-06 07:54:11 -07:00
Haowen Bai a88dcce08b platform/x86: system76_acpi: Use dev_get_drvdata
Eliminate direct accesses to the driver_data field.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Link: https://lore.kernel.org/r/1653989063-20180-1-git-send-email-baihaowen@meizu.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-03 17:20:31 -06:00
Tim Crawford 04145b8cb1 Guard System76 EC specific functionality
Certain functionality or its implementation in System76 EC firmware may
be different to the proprietary ODM EC firmware. Introduce a new bool,
`has_open_ec`, to guard our specific logic. Detect the use of this by
looking for a custom ACPI method name used in System76 firmware.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2021-12-21 14:39:15 -07:00
Tim Crawford a02b101be8 Fix input device error handling
Managed devices do not need to be explicitly unregistered or freed, as
this is handled by devres. Drop the call to input_free_device.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2021-12-21 14:39:15 -07:00
Tim Crawford b49caa557e Fix error handling for input device
input_free_device only needs to be called if input_register_device
failed, not in all error cases. Per devm_input_allocate_device
documentation, managed devices do not need to be explicitly unregistered
or freed, so do not add any other cleanup for the device.

Fixes: c169971892 ("Address feedback from upstream")

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2021-10-29 09:03:49 -06:00
Tim Crawford b82bcba7d9 Add attribute group for kb_led_color
Create the attribute groups for kb_led_color and set the `groups` field
in kb_led. While touching it, also change its show method to use
sysfs_emit() instead of sprintf().

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2021-10-21 12:07:59 -06:00
Tim Crawford c169971892 Address feedback from upstream
Link: https://lore.kernel.org/platform-driver-x86/20211006202202.7479-1-tcrawford@system76.com/
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2021-10-21 12:07:59 -06:00
Tim Crawford 0bc966cf8e Add battery charging thresholds 2020-09-22 16:07:37 -06:00
Jeremy Soller ce499988e8 Add input interface 2020-09-09 13:26:52 -06:00
Jeremy Soller 03aca3da39 Add hwmon interface 2020-09-09 13:26:52 -06:00
Aaron Honeycutt 0f0613d941 applies a patch from Nick Shipp per email 2020-07-01 15:25:14 -06:00
Jeremy Soller 5ccd561cf8
Update system76_acpi.c to match upstream patch 2019-09-26 12:01:47 -06:00
Jeremy Soller 97cf15549d
system76-coreboot -> system76_acpi 2019-08-22 11:26:27 -06:00
Renamed from system76-coreboot.c (Browse further)