Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1303752pxu; Fri, 27 Nov 2020 04:34:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/pphMAmiSIwAqkxnxHWLadhLIAuKV1YFhxRuiYlEv6pu7MpTGznwB9YAscdHWTHaZamVA X-Received: by 2002:a17:907:a96:: with SMTP id by22mr6862270ejc.171.1606480449980; Fri, 27 Nov 2020 04:34:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606480449; cv=none; d=google.com; s=arc-20160816; b=tANpf3vM9jxIe8HEZhfj87kMEy3jMfnE5OOn9TnhTd7mCjq20pfbRJufnbtpxdcSm7 GozJnJvGza4039CWwJyVrIP0rkAqGyII8Kf066mj3/yxbZ0nlWhAmoW+nPZ0+VTabDre Kn1LckBI6Djw9BuFIQZelQiMPCimoptITqa0ZV1VmDe9aNnKZNURJk6LEhqZTW6k9+ei qcJd1vSAROZfdgJ68KdWfV9trPMSrBnxKs80sG84RA8sPyVvhBdId0EVKgF1A4Dra9Rl ou88hyoNYJ0rtSWm2szTtNqTjgipsK1HkYTBq3/3dUagvPQkIRSXn8Noo60nU/2LkcKd bfMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=X2pnubS10kV9gjSPwQHy0SRTSazWEt0Qb5Dki7PmCDE=; b=l3de92ujgJ4kdhz0u5FKfdlt3ygAoi6J1e+flVRp0URPrOBf9eBZUnjWU5Gc1wDYfs aUtEl3VcYbLRszA6vcF8pajV/NSFhEyEm8tr0fzznZ0gqdtz16fAMJ8sB9Op+QJUcrNr D6IXqppuzucNefc5/bR6iuI5mnt2+2UbIVjKD/VQovmuO00R/xorcgWYfB62dmW45dqY Q7KoaY7ulkAvkoELKCKujqP72vZilepJx/+PVAX0NH+3tdScyoIICUkSI18+oXu+0zpj Hy1/h1DkoTJyxuT8jZAo+D98XRdKnye7/pzi8rZQYHvcnFZoMZpaG+Mqd/Z+kuhm0V4O l/Bw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si4920508ejc.144.2020.11.27.04.33.31; Fri, 27 Nov 2020 04:34:09 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727859AbgK0Mbu (ORCPT + 99 others); Fri, 27 Nov 2020 07:31:50 -0500 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:58963 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725865AbgK0Mbu (ORCPT ); Fri, 27 Nov 2020 07:31:50 -0500 X-Originating-IP: 82.255.60.242 Received: from [192.168.0.28] (lns-bzn-39-82-255-60-242.adsl.proxad.net [82.255.60.242]) (Authenticated sender: hadess@hadess.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 3D81D1BF207; Fri, 27 Nov 2020 12:31:47 +0000 (UTC) Message-ID: Subject: Re: [PATCH BlueZ v3 4/7] doc: Add Battery Provider API doc From: Bastien Nocera To: Sonny Sasaka , Luiz Augusto von Dentz Cc: "linux-bluetooth@vger.kernel.org" , Miao-chen Chou Date: Fri, 27 Nov 2020 13:31:47 +0100 In-Reply-To: References: <20201120205728.339325-1-sonnysasaka@chromium.org> <20201120205728.339325-4-sonnysasaka@chromium.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.1 (3.38.1-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Tue, 2020-11-24 at 13:29 -0800, Sonny Sasaka wrote: > > We need a convention to match the exposed object by the battery > provider and BlueZ's device. I am suggesting that the simplest > convention is to use the same path of the BlueZ's device object, > which > is easy to follow and implement by providers. Otherwise, we would > still need another convention to match them, but I think any other > convention is likely more complex to implement by battery providers. > Can you suggest an alternative convention to match the battery and > the > device? You should match on the interface being available, not the object path.  UPower does that, it just watches for ObjectManager signals, and checks whether the expected interface is available when a new object appears: https://gitlab.freedesktop.org/upower/upower/-/blob/master/src/linux/up-backend.c#L314-357 There's no reason to care about the object path.