From patchwork Mon Apr 29 21:01:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 1929223 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=OL9HWZki; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VSx5l4QXRz20fY for ; Tue, 30 Apr 2024 07:18:51 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=OL9HWZki; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VSx5l3FB2z3cVZ for ; Tue, 30 Apr 2024 07:18:51 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=OL9HWZki; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=eajames@linux.ibm.com; receiver=lists.ozlabs.org) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VSx5X1Mxpz3cVR; Tue, 30 Apr 2024 07:18:39 +1000 (AEST) Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43TLHuae018385; Mon, 29 Apr 2024 21:18:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=nC+cB5yrNkvDyUeFXe6XTNRDlerLmGEW/AtczBfuvmw=; b=OL9HWZkiNAqZ+qi79TLo6fpKJq/bEZt07Zkgya/CQWP1xUGZRr7n2R+qAAx80dO4ZGCA ayr5Olx/4aAOOkEv5J/Y7ZgSIo0fh5x2OJqlSkACF2Af27U8IwTYvmD6SkcLdzHN6UgC udnZ/uv0KBvL5pznPWTMR6x8gCDYhP0PHnJlU853uctZtygBLpVCj2XJbkHAr9Qfrrea mYmRylpAathSaoGGFLXgRjCF+tmpoOfV8OW8r4l2ywj9MegkXr9B8csL1tJPI30TNGHU 5t0FAuhfguy94nz+m9tn/7HrFqVnkZFOqjtyeodcgl2GBkCnpCjCxRmOt52jmkZHrDQe iA== Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xtkb3g01q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Apr 2024 21:18:31 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43TJZqEm015548; Mon, 29 Apr 2024 21:01:50 GMT Received: from smtprelay07.dal12v.mail.ibm.com ([172.16.1.9]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3xsed2s47v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Apr 2024 21:01:50 +0000 Received: from smtpav01.wdc07v.mail.ibm.com (smtpav01.wdc07v.mail.ibm.com [10.39.53.228]) by smtprelay07.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43TL1lXe34013472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 Apr 2024 21:01:49 GMT Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0A4A458068; Mon, 29 Apr 2024 21:01:47 +0000 (GMT) Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3D0655804B; Mon, 29 Apr 2024 21:01:46 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.61.151.254]) by smtpav01.wdc07v.mail.ibm.com (Postfix) with ESMTP; Mon, 29 Apr 2024 21:01:46 +0000 (GMT) From: Eddie James To: linux-aspeed@lists.ozlabs.org Subject: [PATCH v4 16/17] fsi: occ: Find next available child rather than node name match Date: Mon, 29 Apr 2024 16:01:30 -0500 Message-Id: <20240429210131.373487-17-eajames@linux.ibm.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240429210131.373487-1-eajames@linux.ibm.com> References: <20240429210131.373487-1-eajames@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Dj8vAuAgfvZSc5GQV3sy0Rps-QY0LOYm X-Proofpoint-ORIG-GUID: Dj8vAuAgfvZSc5GQV3sy0Rps-QY0LOYm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-29_18,2024-04-29_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 phishscore=0 priorityscore=1501 suspectscore=0 spamscore=0 impostorscore=0 malwarescore=0 bulkscore=0 mlxlogscore=885 lowpriorityscore=0 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404290140 X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, andi.shyti@kernel.org, robh@kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-i2c@vger.kernel.org, lakshmiy@us.ibm.com, krzk+dt@kernel.org, andrew@codeconstruct.com.au, linux-fsi@lists.ozlabs.org Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" There's no reason to restrict the creation of the hwmon device to a matching child node name. Just get the first available one. There should only be one child node anyway. Signed-off-by: Eddie James --- drivers/fsi/fsi-occ.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/fsi/fsi-occ.c b/drivers/fsi/fsi-occ.c index 2023355b3980..9a3658d86379 100644 --- a/drivers/fsi/fsi-occ.c +++ b/drivers/fsi/fsi-occ.c @@ -669,7 +669,7 @@ static int occ_probe(struct platform_device *pdev) return rc; } - hwmon_node = of_get_child_by_name(dev->of_node, hwmon_dev_info.name); + hwmon_node = of_get_next_available_child(dev->of_node, NULL); if (hwmon_node) { snprintf(child_name, sizeof(child_name), "%s.%d", hwmon_dev_info.name, occ->idx); hwmon_dev = of_platform_device_create(hwmon_node, child_name, dev);