Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9557328ybl; Fri, 17 Jan 2020 14:17:24 -0800 (PST) X-Google-Smtp-Source: APXvYqy3i0I+AqT+JwqjlWM50nQgSdc940lq2a8a8JnUngEoOoYbXYDEmlVQtxJYY+tAt2gWl3qA X-Received: by 2002:a9d:222f:: with SMTP id o44mr7774046ota.51.1579299444017; Fri, 17 Jan 2020 14:17:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579299444; cv=none; d=google.com; s=arc-20160816; b=Mfo3GMkHPs9tnz9qG86AlpyMg838aL4jIih+PqdptvyEnCPr6u/Gwi8NA9rBSQqn3K 0juDgBU5JltZ1q+4YrlZn/iGFPfCMBJnBaxXU+jxztZT38JSr+xAP/SGTqEwtH5Av1Es dZ6OEwGAP4N+5tAUQOA/hrDUmqSr54jDp0VN/WVlufCs8NLdu+ro+I1VnIA2derC4oBn G35udYQnB3AckwTCrN5NR/ybhOoeBYQfHKDsFKKVXf3sAV5sX5Be3eDPdoaTDKafv3uD 2gpYr5WJAUe/JwyYbiCYSRfLc+Adu2ANlP485ZeNAyIGR7RtVETCnqe8y5Y4a/UILuH5 rD9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=LTFauwtTN3iGYR5phr6guMn0cT10jUJQWz4BVaib5VY=; b=wEmqF666PDzraUfrzkzIoLxSUWCfkOqQ0cYoiH9yqo9mtLj5xr4+f6P0QaKsOqQVHe xFBc4MTQyuN0UPV17XkZjZb95aaSEuvgR2pZlsMRntnUZtkus9RzZ/f/naSlhEsTSNRJ fZJYklImRJsGoru9xhqsDKRIpA+rrDd9v24DmwAdZDszL6ZHkS1LRtU6sUfNJzwBDy8n 1/U02Fydf9/8s+3oPRircY/63y5/5VQ6cnVpB7a+/Af3qtvr8BRgBjePcXjfWyeK7Ogq c2cZJLXrvtRmJhdXtPDXXRJQP2R1m7lIwa+E4nKtTaJnpk3Bz8EJnLbFDOkaTPiP+Y2/ vy2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OwzAwujY; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j71si13843499oib.213.2020.01.17.14.17.03; Fri, 17 Jan 2020 14:17:24 -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=@gmail.com header.s=20161025 header.b=OwzAwujY; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726942AbgAQWRB (ORCPT + 99 others); Fri, 17 Jan 2020 17:17:01 -0500 Received: from mail-oi1-f193.google.com ([209.85.167.193]:43261 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726861AbgAQWRB (ORCPT ); Fri, 17 Jan 2020 17:17:01 -0500 Received: by mail-oi1-f193.google.com with SMTP id p125so23594075oif.10 for ; Fri, 17 Jan 2020 14:17:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LTFauwtTN3iGYR5phr6guMn0cT10jUJQWz4BVaib5VY=; b=OwzAwujYWjp7dKBJAvVZ8gsvD+AQSN0RNuXDjkH2V4KeJxt81HHknLiBCgsJg6sDKe JUD4bnJQUOVuQBu7lmU3lKUQhg2+c9aHFbpbC1mUc2ml22iniKp7XMxAmIJonDnzZF65 2YmEDVFnJuH0KSli4bbDBPf+AW2l/JaRQmCEKr3l9t2Zp+QXjtmjerDyI+VlCqY8Pl40 1mYMC0zP0ckobsu/FYTYB9TOtGR39LPEkf6ckwUEfvBCaAAAV70bXi0u160nDTZR/H8o mlrUz4UZu3CwmuCgtT3ePEAW23Nx3VwdCt1Uya95dd0CDuwD0cwYHgeS9AZniejI4gkk JABw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LTFauwtTN3iGYR5phr6guMn0cT10jUJQWz4BVaib5VY=; b=D1o8oq6A/+EnqHY9pBxA+IZYlcWfcDr1Wvfa5cVRZaDugLEatQrT12gh1sWzVhnTFY lvuVimc4sSgOBk7W5cbCKMALGF8vVuFMRt7+abpfrL6nsV8lMXmcqgxafZpnL3sL8mhM mX3Q91OlwczITak4N4tF3t7PjXJ5BjI/wih/XBdug+e+xAqVqHuw7ffX/5NPa+2PF4FE 0AlngkGl10OAyMQGhdExFPLPLpswPBCT240/XuQoqv2SoAH3Ees/OZU3jJCYY/SJmIIY LDHYXk9aWyWRkz+hKSX9X+IO+sYfG9F2sBUxf8i1JB/Zkaar4zdFjjIjSHlDgmqasDpP 4/Vw== X-Gm-Message-State: APjAAAWoGcV8C6/+qJgVN8zlDjNWuX3LpvqYEzj2KckYRjGGa1fkMw+8 y5YevY7ymOoYJbtGumTK1ob17nFtSvDBV5cqEWp0cwhf X-Received: by 2002:aca:af54:: with SMTP id y81mr5134917oie.21.1579299420607; Fri, 17 Jan 2020 14:17:00 -0800 (PST) MIME-Version: 1.0 References: <20200117132754.BlueZ.1.I56a225147d9cabef55f94b57129a5e37ea79d165@changeid> <20200117132754.BlueZ.2.Ie24be91b472c0a274606191bc4d14df030fe3598@changeid> In-Reply-To: <20200117132754.BlueZ.2.Ie24be91b472c0a274606191bc4d14df030fe3598@changeid> From: Luiz Augusto von Dentz Date: Fri, 17 Jan 2020 14:16:48 -0800 Message-ID: Subject: Re: [BlueZ PATCH 2/2] input: Make HID devices wake capable To: Abhishek Pandit-Subedi Cc: Marcel Holtmann , Alain Michaud , "linux-bluetooth@vger.kernel.org" , chromeos-bluetooth-upstreaming@chromium.org Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Abhishek, On Fri, Jan 17, 2020 at 1:28 PM Abhishek Pandit-Subedi wrote: > > HID devices can wake the host from a suspended state. Mark them as wake > capable when they are accepted. My suggestion is that we do this via application so we let the user decide if he wants or not to wake up the system, you may still opt-in to always enable to wake up in your system setting if you choose to, going this route actually means the user can select not to wake up if the device is somewhat broken or misbehaving in some respect which is not that uncommon nowadays. > --- > > 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..a6b0e8053 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_wake_capable(device, true); > > return 0; > } > diff --git a/profiles/input/hog.c b/profiles/input/hog.c > index 83c017dcb..8627f3557 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_wake_capable(device, true); > return 0; > } > > -- > 2.25.0.341.g760bfbb309-goog > -- Luiz Augusto von Dentz