From patchwork Thu Nov 8 16:51:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heikki Krogerus X-Patchwork-Id: 10674665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C19AD14D6 for ; Thu, 8 Nov 2018 16:52:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B19462E097 for ; Thu, 8 Nov 2018 16:52:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A48242E120; Thu, 8 Nov 2018 16:52:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,SUBJ_OBFU_PUNCT_FEW autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72FF72E17E for ; Thu, 8 Nov 2018 16:52:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726634AbeKIC2V (ORCPT ); Thu, 8 Nov 2018 21:28:21 -0500 Received: from mga02.intel.com ([134.134.136.20]:6164 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726421AbeKIC2V (ORCPT ); Thu, 8 Nov 2018 21:28:21 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Nov 2018 08:52:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,480,1534834800"; d="scan'208";a="106431320" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 08 Nov 2018 08:51:57 -0800 From: Heikki Krogerus To: "Rafael J. Wysocki" Cc: Mika Westerberg , Andy Shevchenko , Rob Herring , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 0/4] device property: Add fwnode_get_name() helper Date: Thu, 8 Nov 2018 19:51:52 +0300 Message-Id: <20181108165156.60073-1-heikki.krogerus@linux.intel.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, This is the second version of my proposal for this helper. The first version can be checked here: https://lkml.org/lkml/2018/11/5/326 In order to support also ACPI properly, I decided to change the API. The function fwnode_name() is now fwnode_get_name(), and instead of returning pointer to the name, the function copies it to a buffer. I did that because acpica does not offer a way to get a pointer to the node name, and the name is clearly expected to be accessed only with the namespace lock held. I think this is better approach in any case. It will also solve the problem of getting rid of the unit-address part from DT node names. Let me know what you guys think. --- heikki Heikki Krogerus (4): device property: Introduce fwnode_get_name() ACPI: property: Add acpi_fwnode_name() of/property: Add of_fwnode_name() device property: Drop get_named_child_node callback drivers/acpi/property.c | 43 ++++++++++++++++++++++------------------ drivers/base/property.c | 34 ++++++++++++++++++++++++++++++- drivers/of/property.c | 26 ++++++++++-------------- include/linux/fwnode.h | 6 +++--- include/linux/property.h | 2 ++ 5 files changed, 73 insertions(+), 38 deletions(-)