FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Input: soc_button_array: defer MSHW0040 probe until GPIO is ready by zR-JB · Pull Request #172 · linux-surface/kernel · GitHub

Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
16 changes: 15 additions & 1 deletion drivers/input/misc/soc_button_array.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -553,13 +553,27 @@ static int soc_device_check_MSHW0040(struct device *dev)
{
acpi_handle handle = ACPI_HANDLE(dev);
bool exists;
int gpio, irq, error;

// check if OEM platform revision DSM call exists
exists = acpi_check_dsm(handle, &MSHW0040_DSM_UUID,
MSHW0040_DSM_REVISION,
BIT(MSHW0040_DSM_GET_OMPR));
if (!exists)
return -ENODEV;

return exists ? 0 : -ENODEV;
/*
* Explicitly check if the GPIO controller is ready. The generic
* button creation path deliberately ignores -EPROBE_DEFER because
* some Intel platforms expose virtual GPIO resources which never
* acquire a GPIO provider. MSHW0040, however, is expected to have
* a real power-button GPIO at index 0.
*/
error = soc_button_lookup_gpio(dev, 0, &gpio, &irq);
if (error == -EPROBE_DEFER)
return error;

return 0;
}

/*
Expand Down

Back | FazBrowse Home | New Git URL