Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp793472ybh; Wed, 15 Jul 2020 15:48:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyY9JfytCaOnrpzKcev4rUW0b3QHaD1trSqfp/MC+ORfFncO6So0FA/412ZSAh7i9KC9I2L X-Received: by 2002:a17:906:3009:: with SMTP id 9mr1100627ejz.220.1594853296831; Wed, 15 Jul 2020 15:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594853296; cv=none; d=google.com; s=arc-20160816; b=mPKLCiEOktFN7NrfJiTANM79AIsmRcJheluV+khtVthNbTAGBLm7M3MSXHkkMUz3fL TBdgqiC0BX7pdkvXqu+9KlfZ/b8vP0flwEbgpR3BadS6YnhOJ4WyMZl8v/TN8qm7LXL5 6IOSb4VLUTz5RNTr4RNzwOVeVyiHFr2dCtzYiV/n/NmlxNy2dl6i67c/lpXonzLKtWin 2Oddn7abwdBuIp12hg9+n5tssgtn8PaY+AdrwtzYV8R8u7fXXrRmlF/73u2NwaszCpsK JaW69UsqUY7BZ1znV6jGdtw7mY3NouTD/+1eHd3GCXiraT0EeE+LI2nMrYxfvHw5RVVz ZWMQ== 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=++vPA9shmpTlF5O/7b0gP8ujZV4/9yR96SMTiioulIU=; b=bVV+zXEGSWdf+wSoms79lvYD8s8FV8mfp8jVFIGwwSEmNtUSvYH/MeuHesqXUDYRqE GjOPMTLWghZeuNYmuwCCEKmZwnQ714G9kn/2uQ1oUcgSbMjni7uW02mLvA0kOp6evXr0 dWKrG0ndbk2kf+Ob4AT8di7jRttl97Y7kXec2DcL7EfJnV+M/Y8UX1+0f6NmlM2wHD0Y kfB3HGK3N9BLQqGk0cs6yPKeS6ZCHx1MmyxtY+lxqF0nwlcnvRCTQSSDrT/Cq9bzzCiJ Ruyadfw1MWNcJxv6JTt7dJiS9Bm3lTte2eQsI+R6prCIb5TSsBV+n0sIvSUb/KZPvzOB ulRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HiOTawzA; 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 n25si1861316eju.537.2020.07.15.15.47.51; Wed, 15 Jul 2020 15:48:16 -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=HiOTawzA; 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 S1726776AbgGOWru (ORCPT + 99 others); Wed, 15 Jul 2020 18:47:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726479AbgGOWrt (ORCPT ); Wed, 15 Jul 2020 18:47:49 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CF3DC061755 for ; Wed, 15 Jul 2020 15:47:49 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id a24so2752734pfc.10 for ; Wed, 15 Jul 2020 15:47:49 -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=++vPA9shmpTlF5O/7b0gP8ujZV4/9yR96SMTiioulIU=; b=HiOTawzA8/3fr/88eg1BFPSfMZFgKgL5XmmCtVJ8n9z1YDX+qvi0PZBN21d4BZ+xPw pM5R5tAYaEhckuZz8Gt6pT5WK85bVOEVcss45MDQsM745ZelhzbVgs2mobHtK2KASKLe cCi2ESFXvsRvhxGVWQfFbIDlMFXiaZY0aD480= 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=++vPA9shmpTlF5O/7b0gP8ujZV4/9yR96SMTiioulIU=; b=lbFkPu2LpiPbJaIsYIRAVzNxgncXsGYHpkVkIu7O5EYkAPVLX4zj3kF8+hR50wPIQt aOlQSypaTjWK9BSwYTPYan1jJdKbalc0AqMAP1QumzR9e8wmk7xekn0eKVWwAWMLlY1W LUrjecBWTmfgY9wh+tY3o6KhOJiZM9mouGqm+yn7Uigjb0oAxthQJWIqTJm3PJLI0/AW sDSxvLnY4kYbafOVu9uz26yt8lHLFzMt5GVhgNHLatG0rAn74bYNq/ZUmDYyxtwBGRBZ 79HliFqgiLC1BuPenzoAclE4vad4nbL20q8zgY0o+2gVtiioI+2JyTAbELnjNdTFHDLO DVNQ== X-Gm-Message-State: AOAM531cpZ5+pB/bgwr1WntVEDg+3Is8bEwdrtBA8+7kPzz4hsuhZM+E TUIfvPAWgb3TlDuExHJxRKdiCO9DMrM= X-Received: by 2002:a63:5220:: with SMTP id g32mr1656057pgb.78.1594853268828; Wed, 15 Jul 2020 15:47:48 -0700 (PDT) Received: from sonnysasaka-chrome.mtv.corp.google.com ([2620:15c:202:201:4a0f:cfff:fe66:e60c]) by smtp.gmail.com with ESMTPSA id u14sm3250471pfk.211.2020.07.15.15.47.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Jul 2020 15:47:48 -0700 (PDT) From: Sonny Sasaka To: linux-bluetooth@vger.kernel.org Cc: Sonny Sasaka Subject: [PATCH BlueZ v2] profile: Add exception to battery profile for external access Date: Wed, 15 Jul 2020 15:47:40 -0700 Message-Id: <20200715224740.238527-1-sonnysasaka@chromium.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: 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 This gives exception to battery profile to be shared both internally and externally. --- profiles/battery/battery.c | 1 + src/profile.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/profiles/battery/battery.c b/profiles/battery/battery.c index 4da4355a1..c9a1af4b9 100644 --- a/profiles/battery/battery.c +++ b/profiles/battery/battery.c @@ -354,6 +354,7 @@ static struct btd_profile batt_profile = { .device_remove = batt_remove, .accept = batt_accept, .disconnect = batt_disconnect, + .external = true, }; static int batt_init(void) diff --git a/src/profile.h b/src/profile.h index 4448a2a6d..95523e50a 100644 --- a/src/profile.h +++ b/src/profile.h @@ -35,6 +35,10 @@ struct btd_profile { const char *remote_uuid; bool auto_connect; + /* Some profiles are considered safe to be handled internally and also + * be exposed in the GATT API. This flag give such profiles exception + * from being claimed internally. + */ bool external; int (*device_probe) (struct btd_service *service); -- 2.26.2