Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3120816ybt; Mon, 29 Jun 2020 16:03:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw02hTwNshINPseShossNrKZAb1miip5lD9rGXtQ+NKMfyjltop3byEn930dQOqaPCJTBd9 X-Received: by 2002:a17:906:1447:: with SMTP id q7mr14960959ejc.363.1593471789840; Mon, 29 Jun 2020 16:03:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593471789; cv=none; d=google.com; s=arc-20160816; b=Z1Jqu5IONzDJVn+u1KqUn6ykeFhw/o5eXzDKsGLCydqK/8dnx7VqzqI3NdQsDZv7cQ E15Efwk6xzeMHOfQ2YJKXzuB+QhnvqMAW8mW/QMPHLxX7LMwATh6MjsWuvWApzaSHpbE J4wzQHuYvqVP3JfWEV4l94h7pZBu8gKCs6mrv1sSL6IHviTcF1OTYuEg6EvjrYw9f4JT OWeMHbYKidSy40HDE7YZCISYGt9aGXMGfcw1wuPTRcZHQysbCbvec3LW6E1uyHMVaxs8 2LKNegKXKTyrgKVefO6Tx/eX95q0TZNiaTJa5AsDSlUIFkV3c0tPpE+wBlihcP0loQcn HwLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=agMkRPFhgMe1f/hFXF9SjRTi2sxyZRnC9GuMfZzTrjc=; b=GqlVaXR89aaDISuLURKfST8qelxtVkglVkSA+lbH07udaWZQtMv91JzE8W3u7Wn44H SW2JMFtGM16hVv53a7g5MOT0d29heGjAz7BU76dR9kA7PLQd+LQVvAQfU9QW5lLalofE G8keMSA5/tp0nX3dgqrosBQEMXGcif6srTdwsoUomyugc8Lbpvc4F2rWFKsVY7uXT6V6 a0j62tu6FdbPmU2kKoieSqTTl3ejPavAP/+57UHbD7vyaxgnT9JYwxrKhGCHlML/3lBO Lwjj3x0CGo1d5aHJ/td66UBxVN0iKWALEB4ftluf2mUsSkL6dNtqgLGi8sJAy9QIQ5rc LG6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JxvkC+kr; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i10si587416ejf.146.2020.06.29.16.02.44; Mon, 29 Jun 2020 16:03:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JxvkC+kr; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728864AbgF2XCi (ORCPT + 99 others); Mon, 29 Jun 2020 19:02:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728855AbgF2XCh (ORCPT ); Mon, 29 Jun 2020 19:02:37 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE509C061755 for ; Mon, 29 Jun 2020 16:02:36 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id 67so4469107pfg.5 for ; Mon, 29 Jun 2020 16:02:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=agMkRPFhgMe1f/hFXF9SjRTi2sxyZRnC9GuMfZzTrjc=; b=JxvkC+krK9jVF8aauUPT4a0+JgM9VTquGgkwnEGJBAGNw5+ivq6qIE9T21xD96F+mI y5qMrOldan0EA0MkPEX9qgehcibNmU7v3TvKKFUjKpSOBvcu/SZRBWrdLng3ZiAmqFJH A9VdLr+fHCJWS9fTftRERv9/dQk6KcRFJioCk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=agMkRPFhgMe1f/hFXF9SjRTi2sxyZRnC9GuMfZzTrjc=; b=YnQmykZVKGsFkdChw1rkEDpo+iqulaOhYS4b36g1V+zJrvhgZyIZFz/7s2T5qVVPOq R+ktMAAd6HpYzy+NKIWyJz2YXPJVTETEp1fS2/X8ORNDJupoCnEREOwPyZpmPb6ZMXO1 6Bm3kcVtby/a/9h7w/SHfVjEXPzJXDp/4b8lqd1m36NC9DBuNb+w1bJAbHSbkzMc8yO1 qK3PNfIp06obLuHZ8R9+x196qNP8qO85yRLdQt6SiASIfuaab4iypog4A5f5WKhLMzmp 23gk4fvibcNnkygE5yYi+ksR8dlmoAd+n3hqK5VrNR//XiMXx3zA5L6wLR1dcwvI1JkJ GnhA== X-Gm-Message-State: AOAM5300mXdkEz5ewLxb5DAYXKDPbuSMURW8kZAK6bCWFLY1aJiWhsZY 1JQeZs2aINrbejD2M9RBGPbcWw== X-Received: by 2002:aa7:8ad9:: with SMTP id b25mr16484227pfd.248.1593471756268; Mon, 29 Jun 2020 16:02:36 -0700 (PDT) Received: from apsdesk.mtv.corp.google.com ([2620:15c:202:1:e09a:8d06:a338:aafb]) by smtp.gmail.com with ESMTPSA id i13sm467275pjd.33.2020.06.29.16.02.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2020 16:02:35 -0700 (PDT) From: Abhishek Pandit-Subedi To: luiz.dentz@gmail.com, linux-bluetooth@vger.kernel.org Cc: alainm@chromium.org, marcel@holtmann.org, chromeos-bluetooth-upstreaming@chromium.org, Abhishek Pandit-Subedi Subject: [BlueZ PATCH v6 6/6] input: Make HID devices support wake Date: Mon, 29 Jun 2020 16:02:23 -0700 Message-Id: <20200629160206.BlueZ.v6.6.I3290604153369ff32013f3dcadda4df3f2eb0f36@changeid> X-Mailer: git-send-email 2.27.0.212.ge8ba1cc988-goog In-Reply-To: <20200629230223.3538949-1-abhishekpandit@chromium.org> References: <20200629230223.3538949-1-abhishekpandit@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org HID devices can wake the host from a suspended state. Mark the profiles to support wake when they are accepted. If the device hasn't already been configured with a Wake Allowed configuration, it will default to yes when the profile is accepted. --- Changes in v6: None Changes in v5: * Only call device_set_wake_support Changes in v4: * Renamed device_set_profile_wake_support to just device_set_wake_support Changes in v3: * Mark HID device to support wake from suspend Changes in v2: None profiles/input/device.c | 1 + profiles/input/hog.c | 1 + 2 files changed, 2 insertions(+) diff --git a/profiles/input/device.c b/profiles/input/device.c index d3724ed54..2dc2ecab2 100644 --- a/profiles/input/device.c +++ b/profiles/input/device.c @@ -1409,6 +1409,7 @@ int input_device_register(struct btd_service *service) } btd_service_set_user_data(service, idev); + device_set_wake_support(device, true); return 0; } diff --git a/profiles/input/hog.c b/profiles/input/hog.c index 9335b7e8b..130f696a9 100644 --- a/profiles/input/hog.c +++ b/profiles/input/hog.c @@ -166,6 +166,7 @@ static int hog_probe(struct btd_service *service) return -EINVAL; btd_service_set_user_data(service, dev); + device_set_wake_support(device, true); return 0; } -- 2.27.0.212.ge8ba1cc988-goog