Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3153621ybt; Mon, 22 Jun 2020 16:46:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3SCnMU04EHTrzJQLb89y9qU9m9KgI0uomOYxEANVrpp7/2zrIWQq+W1x3fPMidK42Stn+ X-Received: by 2002:a17:906:2507:: with SMTP id i7mr17219420ejb.419.1592869593042; Mon, 22 Jun 2020 16:46:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592869593; cv=none; d=google.com; s=arc-20160816; b=XpvToe1uroHVN8ArgKvwSJZu7XVsMaFDiOSyMsR7Cwckrwd4zHt6O1CgKJBYyVhqTZ pNIBXbslUwOGzU+FHZ86CV9SzlJUj3ecX0mrKAfjxIzlFsrxLEge+I4W1R8Mb8doXxNT MyTtGbqiyjcbFxL4jPbxVijHH4yMA0sXbKDm3iD6XaGSkT5AO0VC/Lh6RtymbJuh1j3/ RXvMQFHQwlvJcjZNaarTNeKfxuqWK6hPJZhIuH5kp5RH/FuUPx08dxZO0BpqTH/zz1Gi xVejTI6oZCbrNHKQosObNejmfLPkdxL8az4LnIcQs6h9rDv3SijfasIG9o5SsMD9efKU m3Vg== 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=o3PfK6QUgkIF1Eoe6Yq3txIIjXluV0eFd2f20nkoGxM=; b=VLBA2uPkZ/5/UctqPZ1mRLf5vvg9cFsq9HtRK7ljgCXiUrIGOJbteUkWk8VhvoJrA9 l8RYlglPZwawu9cPZt215IYOZKwUQ19Ywa+dV7ZOZyP+uAxeOUp11+o8n0Lp9b/CT979 S7n7fBwDTliGFqmbJW5FaKK7KQqs2zJlbLE5RP2F++PzJ36zmYnRuwDbS75UtTb8+OJL gw3N7TQoyq0PedFFM/61FGowrz9ujzPhEMbRawmGMo5hhXW425e8/EKL1cnoGX5Zt3nb xqrhlD/PB7q1s7d9zmFfVA0ICc1Tyloe/jzh3UN6uXIYluiHrfubx1B89M/HtszSxMgj vTag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dTi0e7hq; 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 t22si10284633edr.207.2020.06.22.16.46.09; Mon, 22 Jun 2020 16:46:33 -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=dTi0e7hq; 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 S1731034AbgFVXlM (ORCPT + 99 others); Mon, 22 Jun 2020 19:41:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731085AbgFVXlM (ORCPT ); Mon, 22 Jun 2020 19:41:12 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D13AC061795 for ; Mon, 22 Jun 2020 16:41:12 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id q17so1971348pfu.8 for ; Mon, 22 Jun 2020 16:41:12 -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=o3PfK6QUgkIF1Eoe6Yq3txIIjXluV0eFd2f20nkoGxM=; b=dTi0e7hqPsOq4VW/d2Nvfv24/RzBW1kGkz7E2KI8ACl7q8AG1HPDqyuILCFOWx0ozZ B3ZejWHeT92xh4Q7HUZllBZlraDBv8j7PhhtPBQ3fzHDXBk8qw17J0AuYT3LkKK6J1lj os8OCLyGf6YNt2F99OKiBXUjz0I9YiRkDfXxE= 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=o3PfK6QUgkIF1Eoe6Yq3txIIjXluV0eFd2f20nkoGxM=; b=oPT8x++dzOlSOSTKNhFxxtTJN7V5xLZob7kGs3e+rr0KDXeDwP3JC0GnDSmpJ1E/F1 e8s5dqXjJ7pkBmMqknzRJKHZgoisFmA9gfKK1E12cx4XVZdlOuRqNCS3N1TQYxZ65Awz Ps2CWYEkXzp4N5moHo8p9uuQrUR5xyymdQfwm/amP6zpFSxqhEPL59PQJWhe3TklKtMo sVbusY+pL4kFLGAVgiGzLesFlt7BDCzLLfYmq03Ai2gx3Qy33LKX93mKMyTrGcJt1A7N fmyCxY8XF0LLEoeMjyasf7q27MDUAztS9RjZflJv28TzxMvYEmlTBCDBdlIFes1dhirH jO5A== X-Gm-Message-State: AOAM5300uIUs211dZmLtV7W1mr37+Y6OTxwLqLH3wicgKsu6IQxMKlM+ eHy7cGiQnuv8sgvnQ2NJXKQ1SQ== X-Received: by 2002:aa7:99c4:: with SMTP id v4mr22749933pfi.40.1592869271573; Mon, 22 Jun 2020 16:41:11 -0700 (PDT) Received: from apsdesk.mtv.corp.google.com ([2620:15c:202:1:e09a:8d06:a338:aafb]) by smtp.gmail.com with ESMTPSA id w22sm15049500pfq.193.2020.06.22.16.41.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 16:41:11 -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 v5 6/6] input: Make HID devices support wake Date: Mon, 22 Jun 2020 16:40:51 -0700 Message-Id: <20200622164003.BlueZ.v5.6.I3290604153369ff32013f3dcadda4df3f2eb0f36@changeid> X-Mailer: git-send-email 2.27.0.111.gc72c7da667-goog In-Reply-To: <20200622234051.206800-1-abhishekpandit@chromium.org> References: <20200622234051.206800-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 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.111.gc72c7da667-goog