From patchwork Tue Aug 30 23:15:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raul E Rangel X-Patchwork-Id: 601097 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05F54ECAAD5 for ; Tue, 30 Aug 2022 23:16:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231684AbiH3XQs (ORCPT ); Tue, 30 Aug 2022 19:16:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231693AbiH3XQ0 (ORCPT ); Tue, 30 Aug 2022 19:16:26 -0400 Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CB95659C6 for ; Tue, 30 Aug 2022 16:16:18 -0700 (PDT) Received: by mail-io1-xd31.google.com with SMTP id q81so10587117iod.9 for ; Tue, 30 Aug 2022 16:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=1cUv8OQqQzL2mBMn36W85TxKKM2bLkDxJLwZ9X/W2YQ=; b=n8CbHCFCLa3NvlMNU6GyEavHcWEz+keNd9w4QE9X/dGEtMIwWBrhzek4sWMS/9Mra5 7mog0q8D4QWNT3dJ2mn2GkEkOgxk+S9uRjAqmpEn14RFrL8Tlv2FVGhR1aRmq7TQssWN GcYrY4tRT/1uoMpxqA0BmqO9JxkI5fCH44cGA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=1cUv8OQqQzL2mBMn36W85TxKKM2bLkDxJLwZ9X/W2YQ=; b=g0kqk1AuEy+yHgtkiJP0paqe4Ka7pC3AidRij956nveYnhkosbi3s2B4lxuIGqdDYP rn89BZjyNBXgDS7lxUVcYZ9ROHv7eGgL9LYWyA8NkFQ03eJyjE1bk+F5G8Cxcl2EM1S9 H00t89QvuR+y6Mj9M9d/OptQ4S18eFY7hvm93VSbX+/GNviKGprO0VG6kTzqb/4R2RVj IgrYAOzYcsW/R8EG5ucURhlFTGFZGIkBNbQhF8GuJ9UO3NQ4JJprdLvQ9rmeeKt4lJf8 9QeSyGxAmim5rIeINfRxcJOiJMb/yJASLKi+qk0SvpJSJ1sU0MTeF3zm1qpwl1K4BMfE n1/Q== X-Gm-Message-State: ACgBeo2/gkf9mlMHo/zfwGQz5/11/l/AnhMsB+4Q35C9IoGHa5Lrgy3D 27vlIa4Qh3HoPv+zaiuk8NX6TujIKdhbqw== X-Google-Smtp-Source: AA6agR7PjXZLt8Hb1gIOgXE8wv+NOkD4UEFuOUmbIEpKHV8192AELOhphNFTR6UEXBQm62sSsoK5uw== X-Received: by 2002:a02:860d:0:b0:345:b478:a611 with SMTP id e13-20020a02860d000000b00345b478a611mr13376735jai.95.1661901377952; Tue, 30 Aug 2022 16:16:17 -0700 (PDT) Received: from rrangel920.bld.corp.google.com (h24-56-189-219.arvdco.broadband.dynamic.tds.net. [24.56.189.219]) by smtp.gmail.com with ESMTPSA id z30-20020a056602081e00b0068b1858c81asm6165821iow.13.2022.08.30.16.16.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 16:16:17 -0700 (PDT) From: Raul E Rangel To: linux-acpi@vger.kernel.org, linux-input@vger.kernel.org Cc: hdegoede@redhat.com, mario.limonciello@amd.com, timvp@google.com, rafael@kernel.org, Raul E Rangel , Alistair Francis , Angela Czubak , Benjamin Tissoires , Dmitry Torokhov , Jiri Kosina , Matthias Kaehlcke , linux-kernel@vger.kernel.org Subject: [PATCH 7/8] HID: i2c-hid: Don't set wake_irq when using ACPI Date: Tue, 30 Aug 2022 17:15:40 -0600 Message-Id: <20220830171332.7.Id22d056440953134d8e8fe2c2aff79c79bc78424@changeid> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog In-Reply-To: <20220830231541.1135813-1-rrangel@chromium.org> References: <20220830231541.1135813-1-rrangel@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org The i2c-core will now handle setting the wake_irq for ACPI systems. I didn't delete the whole block since this also covers systems that don't use ACPI or DT, but I'm honestly not sure if that's a valid config. Signed-off-by: Raul E Rangel --- drivers/hid/i2c-hid/i2c-hid-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c index 0b7a1a8b3e9a33..630e8dcda1100d 100644 --- a/drivers/hid/i2c-hid/i2c-hid-core.c +++ b/drivers/hid/i2c-hid/i2c-hid-core.c @@ -1037,10 +1037,10 @@ int i2c_hid_core_probe(struct i2c_client *client, struct i2chid_ops *ops, goto err_powered; /* - * Systems using device tree should set up wakeup via DTS, + * Systems using device tree should set up wakeup via DTS or ACPI, * the rest will configure device as wakeup source by default. */ - if (!client->dev.of_node) { + if (!client->dev.of_node && !has_acpi_companion(&client->dev)) { device_init_wakeup(&client->dev, true); dev_pm_set_wake_irq(&client->dev, client->irq); }