From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6420C43382 for ; Thu, 27 Sep 2018 11:41:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 552B121547 for ; Thu, 27 Sep 2018 11:41:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 552B121547 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727357AbeI0R6u (ORCPT ); Thu, 27 Sep 2018 13:58:50 -0400 Received: from mga06.intel.com ([134.134.136.31]:41103 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727015AbeI0R6u (ORCPT ); Thu, 27 Sep 2018 13:58:50 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2018 04:40:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,310,1534834800"; d="scan'208";a="93788074" Received: from kuha.fi.intel.com ([10.237.72.189]) by fmsmga001.fm.intel.com with SMTP; 27 Sep 2018 04:38:30 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Thu, 27 Sep 2018 14:38:29 +0300 Date: Thu, 27 Sep 2018 14:38:29 +0300 From: Heikki Krogerus To: Marcel Holtmann Cc: Matthias Kaehlcke , Greg Kroah-Hartman , "Rafael J . Wysocki" , Sakari Ailus , Marcin Wojtas , Andy Shevchenko Andy Shevchenko , Sinan Kaya , Johan Hedberg , Andrew Morton , Pekka Enberg , Masahiro Yamada , Alexey Dobriyan , linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, Balakrishna Godavarthi , Loic Poulain , Brian Norris Subject: Re: [PATCH v3.1 1/2] device property: Add device_get_bd_address() and fwnode_get_bd_address() Message-ID: <20180927113829.GQ11965@kuha.fi.intel.com> References: <20180925191014.85573-1-mka@chromium.org> <20180925191014.85573-2-mka@chromium.org> <20180926113625.GM11965@kuha.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marcel, On Thu, Sep 27, 2018 at 12:24:33PM +0200, Marcel Holtmann wrote: > > Let's not fill property.c with framework specific helper functions any > > more! > > > > Those functions are completely bluetooth specific, so they do not > > belong here. The fact that some other framework already managed to > > slip their helpers in does not justify others to do the same. > > so? The firmware guys decided to put MAC addresses and BD addresses into the > firmware. So you have to deal with that. I think you have misunderstood the point. > Moving this into the Bluetooth subsystem is as pointless. I rather keep the > accessor function to firmware specific data in one place and not spread around > the whole tree. Especially once this is also provided via ACPI or some other > means. I assumed that is what the whole device_get part was suppose to > abstract. Unified device property API defines a _generic_ API that can be used by any type of device to access the device properties regardless of the way the hardware is described. Any device can use device_property_read_u8/u16/u32/u64/string() functions, but only bluetooth devices can use device_get_bd_address(). Therefore that function does not belong to drivers/base/properties.c. Thanks, -- heikki