platform/x86: toshiba_acpi: Fix ECO LED control on Toshiba Z830
The toshiba_acpi driver checks for TOS_INPUT_DATA_ERROR and tries a different format. On the Z830 the error returned is TOS_NOT_SUPPORTED though the different format still works. Allow either error. Signed-off-by: Arvid Norlander <lkml@vorpal.se> Link: https://lore.kernel.org/r/20220821200821.1837460-2-lkml@vorpal.se Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
23657a437e
commit
4058ea22d7
@ -675,12 +675,15 @@ static void toshiba_eco_mode_available(struct toshiba_acpi_dev *dev)
|
||||
return;
|
||||
}
|
||||
|
||||
if (out[0] == TOS_INPUT_DATA_ERROR) {
|
||||
if (out[0] == TOS_INPUT_DATA_ERROR || out[0] == TOS_NOT_SUPPORTED) {
|
||||
/*
|
||||
* If we receive 0x8300 (Input Data Error), it means that the
|
||||
* LED device is present, but that we just screwed the input
|
||||
* parameters.
|
||||
*
|
||||
* On some laptops 0x8000 (Not supported) is also returned in
|
||||
* this case, so we need to allow for that as well.
|
||||
*
|
||||
* Let's query the status of the LED to see if we really have a
|
||||
* success response, indicating the actual presense of the LED,
|
||||
* bail out otherwise.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user