Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754380AbbKXK2w (ORCPT ); Tue, 24 Nov 2015 05:28:52 -0500 Received: from mga14.intel.com ([192.55.52.115]:60516 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754000AbbKXKXK (ORCPT ); Tue, 24 Nov 2015 05:23:10 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,338,1444719600"; d="scan'208";a="845971201" From: Andy Shevchenko To: "Rafael J. Wysocki" , Greg Kroah-Hartman , Jarkko Nikula , linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Lee Jones , Mika Westerberg , Kevin Fenzi , Arnd Bergmann , Wolfram Sang Cc: Andy Shevchenko Subject: [PATCH v1 09/13] mfd: core: propagate device properties to sub devices drivers Date: Tue, 24 Nov 2015 12:22:55 +0200 Message-Id: <1448360579-79260-10-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1448360579-79260-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1448360579-79260-1-git-send-email-andriy.shevchenko@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1929 Lines: 63 In the similar way like we do for the platform data we propagate the device properties. For example, in case of Intel LPSS drivers we may provide a specific property to tell the actual device driver an additional information such as platform name. Signed-off-by: Andy Shevchenko --- drivers/mfd/mfd-core.c | 3 +++ include/linux/mfd/core.h | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index 60b60dc..ec00f6f 100644 --- a/drivers/mfd/mfd-core.c +++ b/drivers/mfd/mfd-core.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -192,6 +193,8 @@ static int mfd_add_device(struct device *parent, int id, goto fail_alias; } + device_add_property_set(&pdev->dev, cell->pset); + ret = mfd_platform_add_cell(pdev, cell, usage_count); if (ret) goto fail_alias; diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index 27dac3f..0c62f17 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h @@ -15,6 +15,7 @@ #define MFD_CORE_H #include +#include struct irq_domain; @@ -44,6 +45,10 @@ struct mfd_cell { /* platform data passed to the sub devices drivers */ void *platform_data; size_t pdata_size; + + /* device properties passed to the sub devices drivers */ + struct property_set *pset; + /* * Device Tree compatible string * See: Documentation/devicetree/usage-model.txt Chapter 2.2 for details -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/