onitake / gslx680-acpi

ACPI/x86 compatible driver for Silead GSLx680 touchscreens
GNU General Public License v2.0
71 stars 33 forks source link

ACPI API calls on systems that do not support ACPI are implicit decla… #14

Closed lilstevie closed 8 years ago

lilstevie commented 8 years ago

…rations.

This patch makes sure that ACPI calls are made only when the kernel is compiled with ACPI.

Signed-off-by: Steven Barker steven.barker@gizmite.com

With this patch this driver works with device tree and can be built in tree on 4.6.0-rc5

onitake commented 8 years ago

Thanks for pointing this out. Some platform-specific features in the kernel are simply NOPs when not available, but acpi_bus_set_power() is not among them.

lilstevie commented 8 years ago

No problem, there's probably a more elegant way to fix this, but it works

onitake commented 8 years ago

Oh, I think this approach is perfectly fine.

Did you test the driver on DeviceTree?

lilstevie commented 8 years ago

I did test this with device tree on an arm device I'm working on and it worked perfectly

onitake commented 8 years ago

Ah, and I should mention that there's another driver that may have slightly better DT support and is likely going to be in the kernel soon: https://github.com/sigboe/gslX68X It uses DT settings to configure the touchscreen instead of reading them from the firmware. Note that it currently doesn't support firmware images generated by fwtool, but I promised to write a patch for that. Use firmware in legacy Silead format instead.

onitake commented 8 years ago

Ah, thanks! I didn't have any ARM device at hand, so I just added the relevant code and hoped it would work. Good to know it does.