Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4221452ybl; Tue, 21 Jan 2020 15:27:39 -0800 (PST) X-Google-Smtp-Source: APXvYqw5E6Y/NlGuurp7BIGIZWhQ0oE0pCfR7wALZChdwPU/OAyoqgz0bsHMHTxFhR7MVpX/ZN+R X-Received: by 2002:a05:6830:2014:: with SMTP id e20mr5230704otp.272.1579649259323; Tue, 21 Jan 2020 15:27:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579649259; cv=none; d=google.com; s=arc-20160816; b=NjS7TZUlIDJuio/AAZf5+kLBEglJUjVqvmEEuLO2d38vEw5Xqrp9IsKr4zndlsXN5Y Gj77rPGIDcR7RZfp7oW8un2r2dDi0Jvgn+BQD/dtGB+j1nLvnyDE3mhQJjqD3BBUPNsg Mbbc/Gnuzq+udRdEzxd5La0LD1/HAdLFafjVJL1Fg740hRvnMMDW7vs84sAntHsYVqIa yk0PS0hb02maXLJb5bPi2o29dSuffE3vuohyfiaYpy7zEaNBfewcvTBjjnNiOl3Hpykc hn9Wh3sGnMMjP9dunYq3vLeZu59lNdwUmw/F2Cr8uMHKV5DS7jKsKXqO4jcToSg+evbk yfgA== 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=jIKZ28+3W2EAr85v3sL7r0rk71wvn5AGJg9e/M1kbkI=; b=zrfBu9rj+wrCCDkjQHY3wRnXTDDbSIWrDHZoiIa7eEmH+eclXeNTAnVIq5JIjsVWPg n3IaBap8fBJx4PVDZlf683KqxLy4mq2CAkoqYj0Jn0ylSxDR0awLDQLcVoHr8JBaKHu4 pSOSF+q1J9BvYUPXRFMfvnT2wYRszcUb1qMDHBCQHbfZPuBIzs6f6nqsXbtz/txAgaeJ HTlD2OYOaSD60vNzffNarbJ3+YDir5VdemUSvEK2LIK+UikakiWoLnbxjkop15oY0Pll p/Rdj2NKXB3m2R87IHCtr5hpAAHQRR/w/d48M5wNbFXpnIHAzdXcjr3wteS28T8uBn/h JeQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GAPEjbpj; 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 f187si21482141oia.218.2020.01.21.15.27.10; Tue, 21 Jan 2020 15:27:39 -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=GAPEjbpj; 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 S1726407AbgAUX1H (ORCPT + 99 others); Tue, 21 Jan 2020 18:27:07 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:44537 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbgAUX1H (ORCPT ); Tue, 21 Jan 2020 18:27:07 -0500 Received: by mail-pl1-f193.google.com with SMTP id d9so2016872plo.11 for ; Tue, 21 Jan 2020 15:27:07 -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=jIKZ28+3W2EAr85v3sL7r0rk71wvn5AGJg9e/M1kbkI=; b=GAPEjbpjSbJHrBi9gyP80c2GsFzOa8NJIUiSAOy6NVQjfZZwhoy54rWii/bxQ489fd ZJpsmGUEl91j4SRWGa/TpXkbbmrKaIa7IWvzLYdtzBCAaiPyNed5WB//Ks+s4V7i8vh5 /1C11uFtrIm2WkqwTKfImmF19L+gVMg62kquI= 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=jIKZ28+3W2EAr85v3sL7r0rk71wvn5AGJg9e/M1kbkI=; b=SJzEL0sw2UNGBEysFI++UUlElx/2xDkEpO1g7go4fIuS2e+S/P2KcAhNf+erzlvzyo BCGXadGrHEJ0R34uEky3buCYMPeImM7zDsMkqvZVmZ6a0/kFCCf5HK8YvWzVO/sUAyuA FQZ0JgUNM+rDkdw84OnxU1ebz+6+7Gq4W1aRmJjc8GZIDHATR0HEJMRUbh5kj1l3olK0 kcZ9XSJNfTqS8tMh2cbVqYP5vExd4LVs+vq5s+hat3vdjQZm2Sfx5fvN0/Uum2Jtd/f9 uzEMq6gSTK42IFO8eJTJ85Ug4IvZEPG2dHlt11WBWrkkzfaLJxo94EPNNPc2BIuhzSwp BVtA== X-Gm-Message-State: APjAAAV2mRfMUEUJ9lTKfWdamF0lduFyKaDBYwSnxOyXKIfto9yPrdct PI1hsVZuLY6Jf+L0bCzyYySYxA== X-Received: by 2002:a17:90a:d783:: with SMTP id z3mr971346pju.3.1579649226940; Tue, 21 Jan 2020 15:27:06 -0800 (PST) Received: from apsdesk.mtv.corp.google.com ([2620:15c:202:1:e09a:8d06:a338:aafb]) by smtp.gmail.com with ESMTPSA id l8sm498320pjy.24.2020.01.21.15.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2020 15:27:06 -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 v2 0/3] device: Allow devices to be marked as wake capable Date: Tue, 21 Jan 2020 15:26:57 -0800 Message-Id: <20200121232700.158933-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 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 (3): mgmt: Add docs for Set Wake Capable device: Allow device to be marked as wake capable client: Display wake capable property with info client/main.c | 1 + doc/mgmt-api.txt | 19 ++++++++++++++ lib/mgmt.h | 9 +++++++ src/adapter.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ src/adapter.h | 2 ++ src/device.c | 59 +++++++++++++++++++++++++++++++++++++++++++ src/device.h | 2 ++ 7 files changed, 157 insertions(+) -- 2.25.0.341.g760bfbb309-goog