From patchwork Tue Jan 28 02:05:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhishek Pandit-Subedi X-Patchwork-Id: 197410 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56F93C33CB7 for ; Tue, 28 Jan 2020 02:05:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2B1422467C for ; Tue, 28 Jan 2020 02:05:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="WkdqcTpY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726240AbgA1CFM (ORCPT ); Mon, 27 Jan 2020 21:05:12 -0500 Received: from mail-pj1-f42.google.com ([209.85.216.42]:33175 "EHLO mail-pj1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbgA1CFM (ORCPT ); Mon, 27 Jan 2020 21:05:12 -0500 Received: by mail-pj1-f42.google.com with SMTP id m7so246922pjs.0 for ; Mon, 27 Jan 2020 18:05:12 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=oESsgnjn3tlPnw7isobWu7ye1ZgRvVYgV6MEBPxlQMk=; b=WkdqcTpYSKEZ91Ra8Yk2J4AQz5gYroTjm0QQFIBFklYBSZJpEgBIaKoXrPwxZsyNSU kfsGP7Uftxd0x0FCdvsT4A4JQXoF/ub+IiETIsllmfBB389wovkfKZ4u4X8fr97Rkspj h/89JtsdDzrg3YMcZDLtXTq2gl6YmeOmaywLA= 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=oESsgnjn3tlPnw7isobWu7ye1ZgRvVYgV6MEBPxlQMk=; b=Gia5CIKY2V714m77WIGijKbohTFWyfRLLPsJH08zfAhAzQhU4rIXHH1+52T2Br8uPA S6u56hXHPYrjRPDt/toLgmsXxK8rfufF3ISzT2msBm8OHj52cBaTOJjAGFp9J0DTykqm 1MM5hmsYTYA59XL+fDgtanGkC+zANXuG1CwEUaIYdvMnF+L2Sy69dipgxkm1YHDPIlXB 2TgImzWdwFGvPPyqmCOr/R94HWbGk39/2UPsKYuQfnhazsADXbMzMgr7CSa7sP0tNQGC x+GD6R301jzhhqCXScv9FWtct3Lb9E4ViiDOTkuTIKRDTFOM8GIIflCzuF4XPleZxtHz ldpw== X-Gm-Message-State: APjAAAUywNx2m+OW5xwpczKmkAThfq5qM35CrIiUxnatUfmafn0MZTUm RCkCU4NpAmOBdR2Kw8NtMiJiWQ== X-Google-Smtp-Source: APXvYqxEipU4Zqdk6Ay2JYw1QbiRaFUQ6kzBVZPUq400Ir5nh9isdqrlVaChcvwMWJxpmTqEnzv6gw== X-Received: by 2002:a17:902:7c95:: with SMTP id y21mr20356240pll.186.1580177111900; Mon, 27 Jan 2020 18:05:11 -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:11 -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 1/5] mgmt: Add docs for Set Wake Capable Date: Mon, 27 Jan 2020 18:05:01 -0800 Message-Id: <20200127180433.BlueZ.v3.1.I999b93b65e613324dbbd16a1cf493be72fa06ad1@changeid> X-Mailer: git-send-email 2.25.0.341.g760bfbb309-goog In-Reply-To: <20200128020505.239349-1-abhishekpandit@chromium.org> References: <20200128020505.239349-1-abhishekpandit@chromium.org> MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Add docs for new management operation to mark a device as wake capable. --- Changes in v3: None Changes in v2: * Separated docs/mgmt-api.txt into its own patch doc/mgmt-api.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt index 1e59acc54..8a73a9bb9 100644 --- a/doc/mgmt-api.txt +++ b/doc/mgmt-api.txt @@ -3047,6 +3047,25 @@ Load Blocked Keys Command Possible errors: Invalid Parameters Invalid Index +Set Wake Capable Command +=========================== + + Command Code: 0x0047 + Controller Index: + Command Parameters: Address (6 Octets) + Address_Type (1 Octet) + Wake Capable (1 Octet) + Return Parameters: Address (6 Octets) + Address_Type (1 Octet) + Wake Capable (1 Octet) + + This command sets whether a bluetooth device is capable of waking the + system from suspend. This property is used to set the event filter and + LE whitelist when the system enters suspend. + + Possible errors: Failed + Invalid Parameters + Invalid Index Command Complete Event ====================== From patchwork Tue Jan 28 02:05:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhishek Pandit-Subedi X-Patchwork-Id: 197409 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18DA6C33CB7 for ; Tue, 28 Jan 2020 02:05:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E43E02467C for ; Tue, 28 Jan 2020 02:05:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="IXEnWsaj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726294AbgA1CFO (ORCPT ); Mon, 27 Jan 2020 21:05:14 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36946 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726293AbgA1CFO (ORCPT ); Mon, 27 Jan 2020 21:05:14 -0500 Received: by mail-pf1-f193.google.com with SMTP id p14so5824144pfn.4 for ; Mon, 27 Jan 2020 18:05:14 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=u1iYWOO81m2b+NFhF6XQobXZiUwHPHVTOJQnybZDmPQ=; b=IXEnWsajud5hk6koP89pU/T81PXmbkMtBjs78rQs0QUOK7l9+Kcxvs8ivyTMWBbqGd ZbbHahtZLOhgRnZvOJTS7//PM/lugRfxYZ9IFIT0axRBU2On4edZYO4enrf4eG5N7OCH PMh2tS1Do4o8jnntL4p5MQi/DwdNp3bNczWV4= 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=u1iYWOO81m2b+NFhF6XQobXZiUwHPHVTOJQnybZDmPQ=; b=GXtwGuY8ZWgyVtXujNG3IIDIyl23gGpOS4yREOmy4NlOABdWjW11yKEXZFb2AeaOFD csHr/qHHsFm1Kl4++erAi1Yaogj9flyyvd2AleX211i2+RO9Kl0BxxKJPDRmurox27/3 cH3AEc1V1IjlzLAfI5M5pPYVI26cY++Cy5Uy6SGXmQ8RXU9xxmP9M841KY8owp7SZwFD a4Sj1zHtYLcUUswms51T0pQ+WA+i6nlJC3Kfh/5/lTnbL2Vx2dBm4PqYzfcNWwK9tYa/ O2SoWnXdH5RurBAUre/Upu5aXm51qZryyM1Z0xJ5Tpk+t1riYuNHtOapOO2xjeEJn9Gz /a8g== X-Gm-Message-State: APjAAAVjU1Z6y+WjibRKccLaPoz+N8O5DXn2ambbSYvBrl9JghyuUKnF NxOEgOOfVgnKBEFc01+Wbd/Oow== X-Google-Smtp-Source: APXvYqzXk/dz0C1A7uC4N7I8WGHz5Kp7x65zaIravhwcyOWuQjYfHGGgquTi9kpnGlTu2djd6QTRzw== X-Received: by 2002:a63:358a:: with SMTP id c132mr23193049pga.286.1580177113667; Mon, 27 Jan 2020 18:05:13 -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.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2020 18:05:13 -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 3/5] client: Display wake capable property with info Date: Mon, 27 Jan 2020 18:05:03 -0800 Message-Id: <20200127180433.BlueZ.v3.3.I80d0e557c53f464415742324eb3ff2cc4cdcbc2a@changeid> X-Mailer: git-send-email 2.25.0.341.g760bfbb309-goog In-Reply-To: <20200128020505.239349-1-abhishekpandit@chromium.org> References: <20200128020505.239349-1-abhishekpandit@chromium.org> MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Display whether the device is configured as wake capable when queried with cmd_info. --- Changes in v3: None Changes in v2: * Newly added to show whether device is wake capable * Removed automatically setting wake capable for HID devices client/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/client/main.c b/client/main.c index 8bd0bac9e..5c53fe08d 100644 --- a/client/main.c +++ b/client/main.c @@ -1609,6 +1609,7 @@ static void cmd_info(int argc, char *argv[]) print_property(proxy, "Trusted"); print_property(proxy, "Blocked"); print_property(proxy, "Connected"); + print_property(proxy, "WakeCapable"); print_property(proxy, "LegacyPairing"); print_uuids(proxy); print_property(proxy, "Modalias"); From patchwork Tue Jan 28 02:05:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhishek Pandit-Subedi X-Patchwork-Id: 197408 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 753BFC32771 for ; Tue, 28 Jan 2020 02:05:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 48B2B2467C for ; Tue, 28 Jan 2020 02:05:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="JOH6I4x3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726360AbgA1CFQ (ORCPT ); Mon, 27 Jan 2020 21:05:16 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:53569 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726293AbgA1CFQ (ORCPT ); Mon, 27 Jan 2020 21:05:16 -0500 Received: by mail-pj1-f67.google.com with SMTP id n96so306103pjc.3 for ; Mon, 27 Jan 2020 18:05:15 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=oCj9klxCDjWVY/P290XOa9mdXAkPIzZ1ulBexEdhvHw=; b=JOH6I4x3sVvf+6Cw9n/XwCqNoTTAwcnQUcAHc1BesN8FeVDZjkh1vjMBo+05Hou4GU dq/Pe/3Ari06Y87ZRGDSRFXbfKRRyMDuHd9lRDDNYmFmsl6EI6rK+y8UjkpwTvm/l3JJ 5J52ZaLsWTb/gjI/XNd3CHtBbsENT8JsuzQPc= 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=oCj9klxCDjWVY/P290XOa9mdXAkPIzZ1ulBexEdhvHw=; b=MZqkY3qRRWbmSXv1f/yXohyCWZW4B4RZEjNWBClESDvCwZM9+DDEHMC6+hvMb93UH0 59CG/rQK4+iinBUVtU8uMIcbwgedRqOz6ssrHt+70htFgbqD0+KGMxz2GadZXB+0NrLo nOUqyIce8uDFiw8/Ro0xgnGJjNM3odnAMd5QszOTOjaAvPta7aLWXfFrgCIavt3ZdT91 HDz9zaGRsLtM8JJf37lJS1IutW1b9Y4+Qp+75UwL1wLP1YuZwUbOs1dfTO2OFV2vQSfZ +y0gTHPa3JcugfgRfJ5xvxVzAB9jsMLE2PjC9W4O6UV8GgYe3jdYJhrEoalN5gRpHXLl h11g== X-Gm-Message-State: APjAAAXo7x9ehSgol4z/QTk7gZ5By1DZmTQOnznwHoz9I/wHv0uwr8AQ NKjr35Mu/P7M8clTM5HspVdsKg== X-Google-Smtp-Source: APXvYqwigN0vKyX29gbup42gGbUEYTe7ua7BZP5WkqFwXdXtNDfvvUfkfTbJiUY5TEh7BS4GWAOPcQ== X-Received: by 2002:a17:902:b212:: with SMTP id t18mr20078223plr.135.1580177115553; Mon, 27 Jan 2020 18:05:15 -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.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2020 18:05:15 -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 5/5] input: Make HID devices wake capable Date: Mon, 27 Jan 2020 18:05:05 -0800 Message-Id: <20200127180433.BlueZ.v3.5.Ie24be91b472c0a274606191bc4d14df030fe3598@changeid> X-Mailer: git-send-email 2.25.0.341.g760bfbb309-goog In-Reply-To: <20200128020505.239349-1-abhishekpandit@chromium.org> References: <20200128020505.239349-1-abhishekpandit@chromium.org> MIME-Version: 1.0 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. --- 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 2cb3811c8..e5865d098 100644 --- a/profiles/input/device.c +++ b/profiles/input/device.c @@ -1381,6 +1381,7 @@ int input_device_register(struct btd_service *service) } btd_service_set_user_data(service, idev); + device_set_profile_wake_support(device, true); return 0; } diff --git a/profiles/input/hog.c b/profiles/input/hog.c index 83c017dcb..227facf97 100644 --- a/profiles/input/hog.c +++ b/profiles/input/hog.c @@ -159,6 +159,7 @@ static int hog_probe(struct btd_service *service) return -EINVAL; btd_service_set_user_data(service, dev); + device_set_profile_wake_support(device, true); return 0; }