Commit Graph

11 Commits

Author SHA1 Message Date
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)