Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1685530rdb; Thu, 7 Dec 2023 06:18:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IHCYGl7aXA0w7PTTcf5qoO1UcH7kLah+gn1cPT27Q/EZjRv/4Hn/IRpSY9yRTLC52u4v7P8 X-Received: by 2002:a05:6a00:b4c:b0:6ce:4fdd:9d32 with SMTP id p12-20020a056a000b4c00b006ce4fdd9d32mr2261803pfo.69.1701958733942; Thu, 07 Dec 2023 06:18:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701958733; cv=none; d=google.com; s=arc-20160816; b=lTWlqZxOvoPklhFvFlEIMo1k14GEWE2BuBUV4qPij//xWUWQegf3Y/maIopUgeODuU 15y9dbsBny9khFMk9RAxNsSzoc2g9BDmjmmdcsyBazb945T+APOsMqY/B8nE1Ek4sdg2 cf4afTqmMfS7XlznHqNFg1ZrHyGRy1928YaNwCLpkJfr6eqL0BO4uk2vNr2Wrrof/0nv CaVdCF09FpkXjGVUBuLCWR0A9F1QjdNRHaOibpidedxkegbrMM9vcxt+pRHET4HTsY1A C7Ec+0I35/yzWHRB/INLB7IU8/y4YKkDw4O0Wo9rYAEBnnSHacAR2dERgwc9YwUPozBc 2hlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=52VFUTlGZadohn+4AggSc5zp5HKu/TvMS8emM6rLe0s=; fh=2EyuYZuFv7pvbWODgXyYvSVo1Jt/nOD9U4n59BuOM5Q=; b=kiNKY/aNIhAWFuEk29hbx49u1iuuWo1eakcc6r/cC6594OTEAxgi+GG+g1+DHKBx0o sFxRte13ZBWwGPr7gg5caAJwfz1cu/ax80tJ6yqiyLfNpz2QsCKidavHakclquNaaiVI LlBRhXkNT91ZKXjx7wni6K5tdHxeXBDwx0IYAj00JVq6QTYyX50U2YJ5tw+RTmB/u6R5 gH/ebUfsmvwT5aujVmgBpwJXc6oYN2u/+8zpb+4q0pZvN2b62HoZaZhap5juA8CVxfNx H11ZoS2U0egYbbQYXwI+ZGfjy6BcVpcONFbdthKwuia9wFCh6sso4ALe9ZmrueIYSjYA gSYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="I/eSBbxg"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id z21-20020a056a001d9500b006ce6d0550c3si1294685pfw.395.2023.12.07.06.18.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:18:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="I/eSBbxg"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id EF4D780B816C; Thu, 7 Dec 2023 06:18:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443361AbjLGOSH (ORCPT + 99 others); Thu, 7 Dec 2023 09:18:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443263AbjLGOR1 (ORCPT ); Thu, 7 Dec 2023 09:17:27 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC3191984; Thu, 7 Dec 2023 06:17:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701958641; x=1733494641; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WJ1rxXVXDzBVp2HN1Gt4y0DtNM1+XTEkCo3uuSfLvrk=; b=I/eSBbxgGETdQ7YEYuBm8JfrUrtyIGgXUyR3QKcS+VZwnLy1QfIs6vNB 4K+uRiSt39NU/2YgGFeBFrokvBbwkiCWHvwxpHf/kEIkf3qhB5hrXBRUN MraGnxt3LpxpmFOXZSeXojprHRuK/f9K/iqI4+4qjsu+9WQTpEOCpJJMM zjRr+kTDfZguxZD5KbFs6tqt461tju/4es2Wv/WEQJfYcah+h+TvUEQgI BDnxNI/m9v+Rtk9sRkOyeNAxhZHV6G4o4lvzRJeB0foQqtjmnLQRuzoJp hB8ONVI7tRlclovwxK16/s5D29tZKR+zPwgSNuoDHEO2FQCzY102cc2GR w==; X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="460726202" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="460726202" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2023 06:17:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="889756102" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="889756102" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 07 Dec 2023 06:17:11 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 6773CCC9; Thu, 7 Dec 2023 16:17:03 +0200 (EET) From: Andy Shevchenko To: Mario Limonciello , Jarkko Nikula , Herbert Xu , Andy Shevchenko , Wolfram Sang , Andi Shyti , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Jan Dabros , Philipp Zabel , Serge Semin Subject: [PATCH v5 20/24] i2c: designware: Propagate firmware node Date: Thu, 7 Dec 2023 16:14:00 +0200 Message-ID: <20231207141653.2785124-21-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231207141653.2785124-1-andriy.shevchenko@linux.intel.com> References: <20231207141653.2785124-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:18:47 -0800 (PST) Propagate firmware node by using a specific API call, i.e. device_set_node(). Reviewed-by: Andi Shyti Tested-by: Serge Semin Acked-by: Jarkko Nikula Link: https://lore.kernel.org/r/20231120144641.1660574-21-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-common.c | 2 ++ drivers/i2c/busses/i2c-designware-pcidrv.c | 2 -- drivers/i2c/busses/i2c-designware-platdrv.c | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c index 1d213bc0bbfa..45ced3354eef 100644 --- a/drivers/i2c/busses/i2c-designware-common.c +++ b/drivers/i2c/busses/i2c-designware-common.c @@ -716,6 +716,8 @@ EXPORT_SYMBOL_GPL(i2c_dw_disable); int i2c_dw_probe(struct dw_i2c_dev *dev) { + device_set_node(&dev->adapter.dev, dev_fwnode(dev->dev)); + switch (dev->mode) { case DW_IC_SLAVE: return i2c_dw_probe_slave(dev); diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index df47ba04c9ee..2c7bc7dc8e44 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -9,7 +9,6 @@ * Copyright (C) 2009 Provigent Ltd. * Copyright (C) 2011, 2015, 2016 Intel Corporation. */ -#include #include #include #include @@ -273,7 +272,6 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev, adap = &dev->adapter; adap->owner = THIS_MODULE; adap->class = 0; - ACPI_COMPANION_SET(&adap->dev, ACPI_COMPANION(&pdev->dev)); adap->nr = controller->bus_num; r = i2c_dw_probe(dev); diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index d9a64006a3d6..1b76f721bf81 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -8,7 +8,6 @@ * Copyright (C) 2007 MontaVista Software Inc. * Copyright (C) 2009 Provigent Ltd. */ -#include #include #include #include @@ -305,8 +304,6 @@ static int dw_i2c_plat_probe(struct platform_device *pdev) adap->owner = THIS_MODULE; adap->class = dmi_check_system(dw_i2c_hwmon_class_dmi) ? I2C_CLASS_HWMON : I2C_CLASS_DEPRECATED; - ACPI_COMPANION_SET(&adap->dev, ACPI_COMPANION(&pdev->dev)); - adap->dev.of_node = pdev->dev.of_node; adap->nr = -1; if (dev->flags & ACCESS_NO_IRQ_SUSPEND) { -- 2.43.0.rc1.1.gbec44491f096