{"action":"created","issue":{"url":"https://api.github.com/repos/cb22/macbook12-spi-driver/issues/1","repository_url":"https://api.github.com/repos/cb22/macbook12-spi-driver","labels_url":"https://api.github.com/repos/cb22/macbook12-spi-driver/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/cb22/macbook12-spi-driver/issues/1/comments","events_url":"https://api.github.com/repos/cb22/macbook12-spi-driver/issues/1/events","html_url":"https://github.com/cb22/macbook12-spi-driver/pull/1","id":170374810,"number":1,"title":"applespi: Document ACPI methods","user":{"login":"l1k","id":2601727,"avatar_url":"https://avatars.githubusercontent.com/u/2601727?v=3","gravatar_id":"","url":"https://api.github.com/users/l1k","html_url":"https://github.com/l1k","followers_url":"https://api.github.com/users/l1k/followers","following_url":"https://api.github.com/users/l1k/following{/other_user}","gists_url":"https://api.github.com/users/l1k/gists{/gist_id}","starred_url":"https://api.github.com/users/l1k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/l1k/subscriptions","organizations_url":"https://api.github.com/users/l1k/orgs","repos_url":"https://api.github.com/users/l1k/repos","events_url":"https://api.github.com/users/l1k/events{/privacy}","received_events_url":"https://api.github.com/users/l1k/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-08-10T09:41:50Z","updated_at":"2016-08-20T23:28:22Z","closed_at":"2016-08-10T23:06:44Z","pull_request":{"url":"https://api.github.com/repos/cb22/macbook12-spi-driver/pulls/1","html_url":"https://github.com/cb22/macbook12-spi-driver/pull/1","diff_url":"https://github.com/cb22/macbook12-spi-driver/pull/1.diff","patch_url":"https://github.com/cb22/macbook12-spi-driver/pull/1.patch"},"body":"Regarding power consumption, you might be looking in the wrong place if you're searching for the interrupt in `/proc/interrupts`. The DSDT shows that GPE 0x1C sends a device notification, so you need to look at `/sys/firmware/acpi/interrupts/gpe1C` and see under which conditions it increases. Is the GPE only used for wake from system sleep or is it used for power management? If the latter, perhaps you need to stop polling after a period of inactivity and power down the device with SIEN(0), then wait for the device to send a notification and power it up with SIEN(1). You can call SIEN using `acpi_execute_simple_method()`, see l1k/linux@65f56e6c84462335e19b780e5d3140b769d97963 for an example. To make use of the GPE, call `acpi_install_notify_handler()` and `acpi_enable_gpe()`, see `drivers/platform/x86/apple-gmux.c` for an example.\r\n\r\nAs to patching the DSDT, I think this should be avoided if possible. I believe the macOS driver retrieves the required configuration data from the I/O Kit registry, which in turn is filled with values from the _DSM in ACPI. I've recently implemented retrieval of Apple device properties from EFI, see https://github.com/l1k/linux/commits/apple_properties_v1 . Could you test that branch on your MacBook8,1, boot with \"dump_apple_properties\" and attach the dmesg output to bugzilla? Perhaps the SPI EFI driver sends some device properties that might be of use.\r\n\r\nIf it doesn't, we could make the data in the _DSM available as device properties as well so that they can be accessed using the API in `<linux/property.h>` (see l1k/linux@8743c01825c3d16f812acec7525e5c87f4eed37a for an example). That would require some changes to the ACPI subsystem to fetch the properties from Apple's nonstandard _DSM instead of the standard _DSD. Would the properties in the _DSM enable you to avoid patching the DSDT?"},"comment":{"url":"https://api.github.com/repos/cb22/macbook12-spi-driver/issues/comments/241229863","html_url":"https://github.com/cb22/macbook12-spi-driver/pull/1#issuecomment-241229863","issue_url":"https://api.github.com/repos/cb22/macbook12-spi-driver/issues/1","id":241229863,"user":{"login":"l1k","id":2601727,"avatar_url":"https://avatars.githubusercontent.com/u/2601727?v=3","gravatar_id":"","url":"https://api.github.com/users/l1k","html_url":"https://github.com/l1k","followers_url":"https://api.github.com/users/l1k/followers","following_url":"https://api.github.com/users/l1k/following{/other_user}","gists_url":"https://api.github.com/users/l1k/gists{/gist_id}","starred_url":"https://api.github.com/users/l1k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/l1k/subscriptions","organizations_url":"https://api.github.com/users/l1k/orgs","repos_url":"https://api.github.com/users/l1k/repos","events_url":"https://api.github.com/users/l1k/events{/privacy}","received_events_url":"https://api.github.com/users/l1k/received_events","type":"User","site_admin":false},"created_at":"2016-08-20T23:28:22Z","updated_at":"2016-08-20T23:28:22Z","body":"@cgutman Why are you using that? IIUC the kernel will respond negatively to *any* OSI string with that option, so you also need to *add* an OSI string such as `acpi_osi=\"Windows 2013\"`. It's probably not reasonable to expect that the driver should work with no OSI string enabled."}}
{"actor":{"display_login":"l1k"}}