Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4163613ybl; Mon, 27 Jan 2020 18:05:29 -0800 (PST) X-Google-Smtp-Source: APXvYqwnIGlPX+YRxtWs8qwouWR20w3kCcmgUfAart0/dXhenuFoPhR5oxP5bPMbSaCTRXbyo7YV X-Received: by 2002:aca:d787:: with SMTP id o129mr1425103oig.75.1580177129075; Mon, 27 Jan 2020 18:05:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580177129; cv=none; d=google.com; s=arc-20160816; b=cMaBiX05TKNVbYuZQOpzwIsHgpGj7UfJAMTLWE+rYZhdNZsE5KG1OPaNZ564NOKH2j 2561XjFK5urDFZDtwOQnDz1JYBQafiz+goUpm0mzIjDjC33LRSqZsT62ZMbWPLXtSIci zGk1dLEUlu8CpeJ3MzpjFwFSjmB3C1AMsJfpYg9yy4kls53SCSq1qothDW10sXfOHzdi cBeL0rSSecoZvncWyI/V3jfBrtQdPSs6My/XfmflwDU9a7i0CASutRk6+xTDePnX7lVl dsdcRpNxCnLpycaPYAzHRYOnkFhJ/BrCU6fW8SWK2yPFPJRsw0jY8Hr+6+ob4Zs1K57T BMHQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=YehW6fGub6Pwi8VfSfLp5w1/7e08XsyNQJVG79iISfM=; b=FXe/ar/Dvf0h4dm3WsWq7xF6vbRAXpTbTU2z8npUpWIiaIw5aRUAmSlHTQ6OIl5TdA r9lTcGuWKX2+H+R53PXE+obzV30orhsr7aQTsg7piFmRnW/e+gYKHzGA83VG8coPzpRc ePH63WtsXKYKq+wu1Im9u9vAOrsSjkds3hRNliEimdXJ5Qy2FBzrKwWtKUl3jdQ9206K rg1OmwJUEfKSQ9fYcYMXMOvQ532WFP75wWQleN2jpE2qxEYja4AkqyYDNtYS0+Yhwzjb 9HoKcVjYqLFs7VZq0VbG72iPhhyLfL9clBmeAnGvW5wly1pmr4OobMujp4OsiU90hvbn u1Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=h9pBRg6h; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id q15si7750878otk.44.2020.01.27.18.05.12; Mon, 27 Jan 2020 18:05:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=h9pBRg6h; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 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 S1726099AbgA1CFL (ORCPT + 99 others); Mon, 27 Jan 2020 21:05:11 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:38390 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbgA1CFL (ORCPT ); Mon, 27 Jan 2020 21:05:11 -0500 Received: by mail-pf1-f194.google.com with SMTP id x185so5818274pfc.5 for ; Mon, 27 Jan 2020 18:05:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YehW6fGub6Pwi8VfSfLp5w1/7e08XsyNQJVG79iISfM=; b=h9pBRg6hfCmwzQL8O5l6KHlTr4uFn2cFqhGqRLubntUxkRmqEB4ES/BU2VsXOZGEU4 RcbTX6ggoUzoeqFn0BuM3U4Wg4hqaAn2ed7cArRtJs6v2dbRXObiV/eUCFUBKMLTRAch jc7kEcQ8YFcBDtNg71MvInaU3mbBJZNl8+PZM= 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:mime-version :content-transfer-encoding; bh=YehW6fGub6Pwi8VfSfLp5w1/7e08XsyNQJVG79iISfM=; b=QbCYVm1/tyyNVOG0McsPzfEVoT235w90ZhaIL+bILG2Mt7P6k8fvvASJJuhwH9Z4Iw SqdVd8sUR3n2LYRfBtWa8o7sR1zFq7TEiRE/ZoQs9qGiV60A+Vj3g6dOAEZ2OEJTbaoH 5L+o794jM75haUjQnGc2IIHjCRDaF06oSpbQR17v9+XNP+N3CJU2LLU1uRy7a7r53Ptm inXpYmbCkJnb+v5gT47RpqWOIMOhFA45yZi3vRK0kfg8otCH8YjMyC0fA73qopMmbuGg TRjGtNrUK1kRQnSf5WuEu89dO0Fz8k+riiCJpp2bnvbwCczl+QKeMIdlQXSRF1Uod8xQ bA5A== X-Gm-Message-State: APjAAAX8YMdoQysClbucwkBHsmkyDHJ4I7PEprX6zZCQQwO13NPnwcQD GSFx8LCiG1Unr1zrXjB5NYcg/g== X-Received: by 2002:a65:64c6:: with SMTP id t6mr21682053pgv.392.1580177110799; Mon, 27 Jan 2020 18:05:10 -0800 (PST) Received: from apsdesk.mtv.corp.google.com ([2620:15c:202:1:e09a:8d06:a338:aafb]) by smtp.gmail.com with ESMTPSA id z19sm17119015pfn.49.2020.01.27.18.05.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2020 18:05:10 -0800 (PST) From: Abhishek Pandit-Subedi To: luiz.dentz@gmail.com, marcel@holtmann.org, alainm@chromium.org Cc: linux-bluetooth@vger.kernel.org, chromeos-bluetooth-upstreaming@chromium.org, Abhishek Pandit-Subedi Subject: [BlueZ PATCH v3 0/5] device: Allow devices to be marked as wake capable Date: Mon, 27 Jan 2020 18:05:00 -0800 Message-Id: <20200128020505.239349-1-abhishekpandit@chromium.org> X-Mailer: git-send-email 2.25.0.341.g760bfbb309-goog 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 Hi bluez maintainers, This change accompanies changes in the kernel to mark HID devices as wake capable so they can wake the system from suspend. The implementation depends on the Set Wake Capable management operation. It is currently a separate management operation but it may be added as an extension to an exiting operand like add_device (need some feedback regarding this). Per request on the last patch, I've moved docs/mgmt-api.txt into its own patch so we can continue discussions on it. This change was tested with appropriate kernel changes on v4.19 (verified that HID devices were being marked as wake capable in the kernel). Thanks Abhishek Changes in v3: * Added profile_wake_support and made wake_capable dependent on it * Added documentation for WakeCapable * Mark HID device to support wake from suspend Changes in v2: * Separated docs/mgmt-api.txt into its own patch * Added dbus api "WakeCapable" to set value * Update device_set_wake_capable to be called by adapter_set_wake_capable_complete so we can emit property changed * Newly added to show whether device is wake capable * Removed automatically setting wake capable for HID devices Abhishek Pandit-Subedi (5): mgmt: Add docs for Set Wake Capable device: Allow device to be marked as wake capable client: Display wake capable property with info doc/device-api: Add WakeCapable input: Make HID devices wake capable client/main.c | 1 + doc/device-api.txt | 5 ++ doc/mgmt-api.txt | 19 +++++++ lib/mgmt.h | 9 ++++ profiles/input/device.c | 1 + profiles/input/hog.c | 1 + src/adapter.c | 65 ++++++++++++++++++++++ src/adapter.h | 2 + src/device.c | 116 ++++++++++++++++++++++++++++++++++++++++ src/device.h | 5 ++ 10 files changed, 224 insertions(+) -- 2.25.0.341.g760bfbb309-goog