From patchwork Wed Dec 22 13:54:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12691683 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0007C433EF for ; Wed, 22 Dec 2021 13:54:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245521AbhLVNyi (ORCPT ); Wed, 22 Dec 2021 08:54:38 -0500 Received: from mga12.intel.com ([192.55.52.136]:7722 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245495AbhLVNyf (ORCPT ); Wed, 22 Dec 2021 08:54:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1640181275; x=1671717275; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=/LCx+xvLLN5kzI6YWKdSJp5PTvYYMmIuEFe0+SvGyRw=; b=UuKmv1IstPIoufMZ9wDkq0i60Zqy48PLrstOYhvAac122AsD47lbJD+z 63c9LHMEdl9z662PR+BqJ5ER1OPKZ+OOtzJQushLZSA/QURmtaKe4TUKy JrkplDCRtyiECKGtZGAr9bYIwU3U8m76Yuva1ISkBp/wtCrm+1iVGUqQH lotpv7PMUFZ3K0WSRqEsOW4UVtCtUG/dHddPFGwjiUbf9Dd03el9AvuFY zHvk+bQLKHFsVCZxLygwMvczEiwJSUTyuT71UB5H336Gcval7GWPiIIWX MCRDgTyciRuTxXKMRnEEN9T8wVKp9wfVLrr6ByRgg4nlg8HEMwy4IlnMP w==; X-IronPort-AV: E=McAfee;i="6200,9189,10205"; a="220633013" X-IronPort-AV: E=Sophos;i="5.88,226,1635231600"; d="scan'208";a="220633013" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2021 05:54:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,226,1635231600"; d="scan'208";a="664276990" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 22 Dec 2021 05:54:19 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id EA50B23E; Wed, 22 Dec 2021 15:54:27 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Mark Brown , Serge Semin , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Serge Semin , Daniel Mack , Haojian Zhuang , Robert Jarzmik Subject: [PATCH v1 1/3] spi: dln2: Propagate firmware node Date: Wed, 22 Dec 2021 15:54:21 +0200 Message-Id: <20211222135423.62487-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Propagate firmware node by using a specific API call, i.e. device_set_node(). Signed-off-by: Andy Shevchenko --- drivers/spi/spi-dln2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-dln2.c b/drivers/spi/spi-dln2.c index 3ff63ab82f4f..ac83b406151d 100644 --- a/drivers/spi/spi-dln2.c +++ b/drivers/spi/spi-dln2.c @@ -688,6 +688,8 @@ static int dln2_spi_probe(struct platform_device *pdev) if (!master) return -ENOMEM; + device_set_node(&master->dev, dev_fwnode(dev)); + platform_set_drvdata(pdev, master); dln2 = spi_master_get_devdata(master); @@ -699,7 +701,6 @@ static int dln2_spi_probe(struct platform_device *pdev) } dln2->master = master; - dln2->master->dev.of_node = dev->of_node; dln2->pdev = pdev; dln2->port = pdata->port; /* cs/mode can never be 0xff, so the first transfer will set them */ From patchwork Wed Dec 22 13:54:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12691681 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E9A3C433F5 for ; Wed, 22 Dec 2021 13:54:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245497AbhLVNyg (ORCPT ); Wed, 22 Dec 2021 08:54:36 -0500 Received: from mga17.intel.com ([192.55.52.151]:8328 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234159AbhLVNyf (ORCPT ); Wed, 22 Dec 2021 08:54:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1640181275; x=1671717275; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yOlE0op07TW7PsmipAIfJuclyE2ZSoUR1iE05LtVWZA=; b=Zy3OGWFg+fe8U6xD6XXseq5wVKJkaguylkCeYX48AvuN/zN/XPrxZSAj CS5f6dgbsTOnb+cCsPSezTp9RAQl1yPYkFv83RFEA2CT8TdKzPpuHqli8 lCCMwhzmIM+Bmmb8qHWhOm8pcoZNrfQeBTCNYdCPUSSovlOGwF06iHlgb wmjnYpBKReAiQuE7zTPCg+oddmtpO+9LyYFCcklpuZkl7aF1opoC3qIpd YHHwLYW50oj5xfWA80SsN14n3MkyO/+tz8sexGOT5E1buanEg8oKT5woY XaoioGgpyiGHs5V/5EF5toEvm8lmhkVexMKCSpjnFJK7oGTJle9AB/4ku Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10205"; a="221297938" X-IronPort-AV: E=Sophos;i="5.88,226,1635231600"; d="scan'208";a="221297938" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2021 05:54:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,226,1635231600"; d="scan'208";a="617140993" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga004.jf.intel.com with ESMTP; 22 Dec 2021 05:54:21 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 6DB3F2D2; Wed, 22 Dec 2021 15:54:29 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Mark Brown , Serge Semin , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Serge Semin , Daniel Mack , Haojian Zhuang , Robert Jarzmik Subject: [PATCH v1 2/3] spi: dw: Propagate firmware node Date: Wed, 22 Dec 2021 15:54:22 +0200 Message-Id: <20211222135423.62487-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211222135423.62487-1-andriy.shevchenko@linux.intel.com> References: <20211222135423.62487-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Propagate firmware node by using a specific API call, i.e. device_set_node(). Signed-off-by: Andy Shevchenko --- drivers/spi/spi-dw-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c index 934cc7a922e8..ecea471ff42c 100644 --- a/drivers/spi/spi-dw-core.c +++ b/drivers/spi/spi-dw-core.c @@ -895,6 +895,8 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws) if (!master) return -ENOMEM; + device_set_node(&master->dev, dev_fwnode(dev)); + dws->master = master; dws->dma_addr = (dma_addr_t)(dws->paddr + DW_SPI_DR); @@ -931,8 +933,6 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws) if (dws->mem_ops.exec_op) master->mem_ops = &dws->mem_ops; master->max_speed_hz = dws->max_freq; - master->dev.of_node = dev->of_node; - master->dev.fwnode = dev->fwnode; master->flags = SPI_MASTER_GPIO_SS; master->auto_runtime_pm = true; From patchwork Wed Dec 22 13:54:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12691679 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14E08C433F5 for ; Wed, 22 Dec 2021 13:54:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245488AbhLVNyZ (ORCPT ); Wed, 22 Dec 2021 08:54:25 -0500 Received: from mga14.intel.com ([192.55.52.115]:16792 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234159AbhLVNyZ (ORCPT ); Wed, 22 Dec 2021 08:54:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1640181265; x=1671717265; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dVTnm7Vj85GUu0rogxumgYtqYxX+kTZ7Uoxyo2KfUh0=; b=RAdNxK8uZKBNeOEK/hKThoePw/DxDG5rsYTtGlQCyWNmcCbFhGfMbu+W xGOh6Nkf6kDNvcZFG9+F2f2mkxVwqIuZUrQAHpuVRU66NbtVLXA3qGaS7 6WMHSzM3ML++Q426qnTRU5IuuvQNjCKc6KjhyvlJquUzBF1BFysLHP2X1 PeVEmGcl7Al+LJp0O1W7e7M2dR8nfzKdtuQIEiT7CVawhmhgOcmRgOIkv dSWGEk561DZ2NBlEFG54XvW/Wk1I8kXc78xDsnNORJd0wXZYEJm1m2vBP bQTBbxgXSzIrmK2W06H6S0y4EP8ZGS6fPBAOTCLepxQPNTsoIcfM1zVBf w==; X-IronPort-AV: E=McAfee;i="6200,9189,10205"; a="240845054" X-IronPort-AV: E=Sophos;i="5.88,226,1635231600"; d="scan'208";a="240845054" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2021 05:54:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,226,1635231600"; d="scan'208";a="484761402" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 22 Dec 2021 05:54:21 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 23AD0331; Wed, 22 Dec 2021 15:54:30 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Mark Brown , Serge Semin , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Serge Semin , Daniel Mack , Haojian Zhuang , Robert Jarzmik Subject: [PATCH v1 3/3] spi: pxa2xx: Propagate firmware node Date: Wed, 22 Dec 2021 15:54:23 +0200 Message-Id: <20211222135423.62487-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211222135423.62487-1-andriy.shevchenko@linux.intel.com> References: <20211222135423.62487-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Propagate firmware node by using a specific API call, i.e. device_set_node(). Signed-off-by: Andy Shevchenko --- drivers/spi/spi-pxa2xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index b3186bd0c2a8..e88f86274eeb 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1664,8 +1664,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev) drv_data->controller_info = platform_info; drv_data->ssp = ssp; - controller->dev.of_node = dev->of_node; - controller->dev.fwnode = dev->fwnode; + device_set_node(&controller->dev, dev_fwnode(dev)); /* The spi->mode bits understood by this driver: */ controller->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LOOP;