On Thursday, August 21, 2014 04:39:46 PM Tomasz Nowicki wrote:
Hi Mika,
On 21.08.2014 12:45, Mika Westerberg wrote:
On Wed, Aug 20, 2014 at 04:58:20PM +0200, Tomasz Nowicki wrote:
[cut]
Right, I will fix it.+
+static int gpio_evt_trigger(void *data, u64 val)
+{
+ struct gpio_pin_data *pin_data = (struct gpio_pin_data *)data;
+ int pin = pin_data->pin;
+
+ if (ACPI_FAILURE(acpi_execute_simple_method(pin_data->handle, NULL,
+ pin <= 255 ? 0 : pin)))
+ pr_err(PREFIX "evaluating event method failed\n");
acpi_execute_simple_method() passes one argument to the method. You
can't use it with _Lxx or _Exx which don't expect any arguments.
Otherwise you get this:
[ 122.258191] ACPI: \_SB_.GPO2._E12: Excess arguments - Caller passed 1, method requires 0 (20140724/nsarguments-263)
OK, so here's my concern.
If AML does any kind of tracking of state in _Exx/_Lxx, you'll likely totally
confuse it by calling those things at random.
I'm not sure I'm seeing a compelling reason to put this thing into the tree
for this reason.