Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2755633ima; Mon, 22 Oct 2018 15:33:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV60OZTqXR98QO1lluJBKy7mN3fLIpOoTMUeq3lLw5hQ0kz+/U1OKZ1vDa31VH8xjn847PDao X-Received: by 2002:a62:6801:: with SMTP id d1-v6mr47282845pfc.7.1540247634084; Mon, 22 Oct 2018 15:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540247634; cv=none; d=google.com; s=arc-20160816; b=rHEU+FjfM+uhzx6E4voBrfBAj0ZgvpIDKYCCDSal9PAEomTy4fQSGwn+61XAnGVrvt rGuY9mNrh11KO4SVtVfDnAviwWscGbbKGlrRRNvtnysAJzQlPMn33jEhOHwy3k2toxGq y2wGVn47jwsr71BhYd9Y5R1KayiJn9ZMch780jiGykvWY4mrRyB2T9JPoef6WnhWaX6D qAHTmSUhhADKq2MoQbreiaVDtpkfpflnvPX00UzegUgwBY65QBzu/85aFaWlwY39k4+7 /Wv9rM2iv6jAoS5CAQeofjcnGLsl3Mq3klhayTIOIRDdrcrK102HFjpzrK8WvJxs8ZJa /GDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=bvJZ3gBEO/Epq0SvI2T1i+2WnHBdgkfDhbABuhW2I0o=; b=WC7GvdHiWy8+DIdgo5tj16dq7oVjJWKjUlOQgM59c+xlkZ7c0PaOsQBZutWPbFNFDM VLIzajYTLEEmCs6wuxZIIF0Uz0Kbx8Eyt1TW2zDzLfH9Le7ocs11r6cvwWViY8blT+sd x7580u0yrCAp1DAHsco1vKQvVtllqfkRutgmExi5NDs+hG1CeFSJuNZYhcm9FhuqLF+4 3QiWrOAj/LRPRrqhiau0RNSiG3ziWR1lF6bhkpZ+v++vtPDasR9Dt77ktW+CJgmtKymk UtrhA5rnZQpa0XcgJcd3W8PqDfwgBKXKwmDY+OFFbeysCkoNH3Bqlxh3+6H0ukaSQeA7 n0Qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9-v6si35816863pfj.167.2018.10.22.15.33.39; Mon, 22 Oct 2018 15:33:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729380AbeJWF1V (ORCPT + 99 others); Tue, 23 Oct 2018 01:27:21 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:52188 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725758AbeJWF1U (ORCPT ); Tue, 23 Oct 2018 01:27:20 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 1C5BE80794; Mon, 22 Oct 2018 23:07:07 +0200 (CEST) Date: Mon, 22 Oct 2018 23:07:07 +0200 From: Pavel Machek To: Marcel Holtmann Cc: Matthias Kaehlcke , "Rafael J . Wysocki" , Greg Kroah-Hartman , Sinan Kaya , Balakrishna Godavarthi , Sakari Ailus , Marcin Wojtas , Andy Shevchenko Andy Shevchenko , Johan Hedberg , LKML , Bluez mailing list , Loic Poulain , Brian Norris Subject: Re: [PATCH v4 1/2] Bluetooth: Add device_get_bd_address() Message-ID: <20181022210707.GA3764@amd> References: <20180927004810.124185-1-mka@chromium.org> <20180927004810.124185-2-mka@chromium.org> <20180927171305.GG22824@google.com> <20181004173338.GL22824@google.com> <9B742DB5-F584-4A47-A04B-4F72EB17519C@holtmann.org> <20181015185128.GT22824@google.com> <8D254888-52A9-4201-882C-EDE71EE4CF5C@holtmann.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="G4iJoqBmSsgzjUCe" Content-Disposition: inline In-Reply-To: <8D254888-52A9-4201-882C-EDE71EE4CF5C@holtmann.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > >> explain to me again why this is useful? > >=20 > > The official binding for providing the BD_ADDR through the device tree > > is the property 'local-bd-address'. device_get_bd_address() provides a > > common API to retrieve the BD_ADDR instead of requiring BT drivers to > > use the lower level fwnode_property_read_u8_array(). It also avoids > > repeating the check for an all zeroes BD_ADDR in multiple drivers. > >=20 > >> I am failing to see the benefit if this is not part of the property.h = API. > >=20 > > My understanding is that the intention of property.h it to provide an > > API for common property types used by drivers from different > > subsystems, hence the implementation 'lives' in drivers/base. > > Obtaining the BD_ADDR is clearly limited to the Bluetooth subsystem, > > and drivers/base doesn't seem to be the right place for it. It's true, > > device_get_mac_address() lives in the common property code, but that > > doesn't necessarily mean it really should be there and we should do > > the same. I agree with Sakari that the the approach taken by V4L2 > > (drivers/media/v4l2-core/v4l2-fwnode.c) seems more appropriate. > >=20 > > That said I wouldn't raise opposition if the maintainers of > > drivers/base agreed to add device_get_mac_address() there, however so > > far several recent authors of property.[ch] have raised objections. >=20 > so if this is not in drivers/base/ then what is the point in making each = driver do this? If it is a common property, then it can be well handled in = the Bluetooth core when setting up the hardware. >=20 > This whole BD_ADDR via DT is stupid anyway. Just so that is clear > up-front. It has been a total hack and fully relies on boot > loaders doing too much magic and then using DT to hide this magic. Can you wrap lines at around 72 characters in the emails? We do ethernet addresses via DT. I don't know if doing that in bootloader is a hack or not, but if bootloader is already doing that for ethernet, bluettoth address in DT kind of makes sense. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --G4iJoqBmSsgzjUCe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlvOO/sACgkQMOfwapXb+vI0SACeMFEuegAfXWfn0BZGqrd79383 HSEAoL9NWTgrEohV3zpouDp4JLlibUub =JmqK -----END PGP SIGNATURE----- --G4iJoqBmSsgzjUCe--