From patchwork Fri Nov 9 14:21:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heikki Krogerus X-Patchwork-Id: 10676055 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 68CF917D4 for ; Fri, 9 Nov 2018 14:21:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 593602EA91 for ; Fri, 9 Nov 2018 14:21:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DC112E949; Fri, 9 Nov 2018 14:21:45 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 233492EA6E for ; Fri, 9 Nov 2018 14:21:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727845AbeKJACb (ORCPT ); Fri, 9 Nov 2018 19:02:31 -0500 Received: from mga07.intel.com ([134.134.136.100]:21407 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727735AbeKJACa (ORCPT ); Fri, 9 Nov 2018 19:02:30 -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 orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Nov 2018 06:21:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,483,1534834800"; d="scan'208";a="106729673" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 09 Nov 2018 06:21:39 -0800 From: Heikki Krogerus To: "Rafael J. Wysocki" Cc: Dmitry Torokhov , Linus Walleij , Andy Shevchenko , Mika Westerberg , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH v2 0/6] device property: Introducing software nodes Date: Fri, 9 Nov 2018 17:21:32 +0300 Message-Id: <20181109142138.54770-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 "software nodes". There was a "dereferencing freed memory" bug in patch 3/5 which is now fixed. device_add_properties() and device_remove_properties() no longer change places in the code as requested by Andy. The original RFC can be checked from here: https://lkml.org/lkml/2018/10/12/518 The origin commit message: To continue the discussion started by Dmitry [1], this is my proposal that I mentioned in my last mail. In short, the idea is that instead of trying to extend the support for the currently used struct property_set, I'm proposing that we introduce a completely new, independent type of fwnode, and replace the struct property_set with it. I'm calling the type "software node" here. The reason for a complete separation of the software nodes from the generic property handling code is the need to be able to create the nodes independently from the devices that they are bind to. The way this works is that every node that is created will have a kobject registered. That will take care the ref counting for us, and also allow us to for example display the properties in sysfs. There are a few more details in patch 3/5 about the software nodes in the commit message. [1] https://lkml.org/lkml/2018/9/17/1067 Reviewed-by: Andy Shevchenko Acked-by: Linus Walleij --- heikki Heikki Krogerus (6): driver core: platform: Remove duplicated device_remove_properties() call drivers core: Prepare support for multiple platform notifications ACPI / glue: Add acpi_platform_notify() function drivers: base: Introducing software nodes to the firmware node framework device property: Move device_add_properties() to swnode.c device property: Remove struct property_set .../ABI/testing/sysfs-devices-software_node | 10 + drivers/acpi/bus.c | 1 - drivers/acpi/glue.c | 21 +- drivers/acpi/internal.h | 1 - drivers/base/Makefile | 2 +- drivers/base/core.c | 34 +- drivers/base/platform.c | 1 - drivers/base/property.c | 511 +------------ drivers/base/swnode.c | 678 ++++++++++++++++++ include/linux/acpi.h | 10 + include/linux/property.h | 12 + 11 files changed, 768 insertions(+), 513 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-devices-software_node create mode 100644 drivers/base/swnode.c