From nobody Fri Dec 19 17:18:18 2025 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 994CE2D0C9D for ; Thu, 4 Dec 2025 23:11:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764889887; cv=none; b=AJKeT2sqyu96pRtRry25/0lji8oRrAYFrjHkKu4JcXoboUai6K5O3BtrwhxSP9DpLHtlUVR4OUUP5dFvqOfKH++29bzIDpqL2n8JS45Z6Hk/iPoitgyWLD4YeMi2LkZGFtv924bigchg+/prRh+a8eQvV0t/9dlx6ct9pg71jUU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764889887; c=relaxed/simple; bh=bFvuyYFVmH9syKJ4auimlQMoVSnOXpq5CEyPKV4xf0Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=E6yjLZn89Pf3MU8qGirtwcHU5z2lC+EKIuwAt26gAGxAjqdYJ+e3BQHg18RbsnMijSFuVcGNo1X2h9ZVp5R4A9S0ioyOabpL6aixp5C4c3jpHXWLe/s60rFUXTLQk3TBvKLGQtniUHjx4MKRDi7Mr6aTdSkbaZ3ylJOIF+oi7EM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fPzivQ3N; arc=none smtp.client-ip=209.85.215.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fPzivQ3N" Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-bc2abdcfc6fso926389a12.2 for ; Thu, 04 Dec 2025 15:11:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764889885; x=1765494685; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=xqy3wcsk4O+DQIbyxqEYo0Dly3qr2S6LsCBX00uMEIk=; b=fPzivQ3NAMz4M6ZUt7iea6LZUpVbRYrkD3Lw3UBYNeyNxhQ0RkypbHu0egvh2tmUU3 bLOjJrBsGfP9HoZGWZXY5D5AlrY470HoSR/QGPgK3NFt4a6hGKLOMB6KLXBL020v23wa M+2+dxh6w9IChLUpCR/BEROah/RxLeXCRdeGezrSUls+2+gUriYUq+q0TOcamMHh8K7D ohe+H+9RtlpBn2L2wldbAXJohe9bhRH3b4IZwqMDh53mlrBq0pR4+rIq+V6nTrBtG/Uw 23CR94nofyX+RlGVd8Pzq/SYnzqjlXTtQ2UisIKSCTmL5AChEL4f4ZtNBXOQjHGnCV8i 3IXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764889885; x=1765494685; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xqy3wcsk4O+DQIbyxqEYo0Dly3qr2S6LsCBX00uMEIk=; b=T4KoCD/ZX5He2or9MPhVB9GQXi9NTOJOhg59VB1uT5IxsjRkBirbyojVIimFXSxY0A 7xmlneGG9kuiusx+uOLn0ruF1/LAsNDgYEzRjfF6E4zoFthPMlnOUtsWbdInka7IUK93 rRZa2oKoahJYx/0n+Jziuk3B/gDsit0RVagXEXo1y95pWoxfBH3LzyXu6iLpnpy1bSDU Wzew4+oudnZY488LD/EHrLubUlPF1mxNFkwGdmWayYsJG3S6UkVzKmIEcypjiPXk3zz7 NQWAVJdF+NU74xf+myye6Yc7gCfAhh+xwGFC4e65KczD3Z9RRHMM/6KVphh5mbIXzWMv UBeQ== X-Forwarded-Encrypted: i=1; AJvYcCUrNHTRZ4BOiWjZV5JSek/YmHT5unO5V5VKJhAnnY0HIdOhWUCerr9II4saKTQG8SKh+X9oDxy2dBp9nEc=@vger.kernel.org X-Gm-Message-State: AOJu0YytBNjRUoxAKAeX7s51W+lz3SoyWZv13KjNEn44Oqidp1pKMQJK nC4LPPkAYUO0PJyKeQ/X6XpfLcrB5m36oCHOmfOVAdZq9yeTNIsNbia7yHYBXLtDym4= X-Gm-Gg: ASbGnctMi2aiLqHnBLFqRGsWjYlpW5l1Qz3+dOjN/lhftl+pTPsI/IW2f1fCw+mAqJ+ jT0dRPbbTyD8+Ed1++acDLJigtxuv77OKZeQkQr4hDa9sXA0roMJVyUHSh4NotLXV6bDDSZOCbz U/vg9EPwhGbMSc1qH21Hk3YpG6BaMpiu/dkxcpkjLirwfCpFuef6QgVq01iHHwmOVkShnThYqnM KZcrRsCqesHoXS3Z+gxdJxUkN1MLUyR/kTR8dTNPYxgGU76EPOYH0PhYbMNShzUMd6LO2CZmkgT nrwZTYX5XzbRB5GPaxqg/ntmufrXAJsHJLjUlolSNfWtdJrjCLRVMa8bGoA86QE6jAv5bvuqc3I E057EDh/QUMkMgh9s2dGqzy2uRPfa+56EmapwRFUoo3jFM5SUm8si0bipq9Noynb/5nU2J2ssXd cKLiHhXIXgXlJa X-Google-Smtp-Source: AGHT+IGChwRhiuJpt1m7HWoo3n75LeO2jMMDnp2qXu4+IWXfmH04+yQWZYyW7q8gk/r2FK9JKF9qDg== X-Received: by 2002:a05:7300:8b86:b0:2a4:3593:ddd8 with SMTP id 5a478bee46e88-2ab92d4fd2amr5006514eec.5.1764889884665; Thu, 04 Dec 2025 15:11:24 -0800 (PST) Received: from archlinux ([2804:1b2:9545:c615:2358:ef44:78a3:f69a]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2aba87aa5fcsm8000962eec.3.2025.12.04.15.11.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Dec 2025 15:11:24 -0800 (PST) From: Julioccps To: hvaibhav.linux@gmail.com, johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org Cc: greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Julioccps Subject: [PATCH v3] staging: greybus: arche-apb-ctrl: switch to device_property_read_bool Date: Thu, 4 Dec 2025 20:11:10 -0300 Message-ID: <20251204231110.65847-1-julio191096@gmail.com> X-Mailer: git-send-email 2.52.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Switch from the deprecated of_property_read_bool() to the common device_property_read_bool() API. This makes the driver agnostic to the underlying firmware interface (DT or ACPI) and simplifies the logic. Since the driver is no longer strictly dependent on Device Tree, include directly for the struct of_device_id definition, instead of relying on implicit inclusion via , which has been removed as it is unused. Also rename apb_ctrl_get_devtree_data() to apb_ctrl_get_fw_data() to better reflect the agnostic nature of the new implementation. Signed-off-by: Julio Cesar Carvalho de Paula Souza --- hanges in v3: - Added version history (changelog) required by the subsystem maintainer. Changes in v2: - Updated the subject line to match the subsystem standard. - Updated Signed-off-by to use full real name. drivers/staging/greybus/arche-apb-ctrl.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/gre= ybus/arche-apb-ctrl.c index 90ab32638d3f..eea9648a461c 100644 --- a/drivers/staging/greybus/arche-apb-ctrl.c +++ b/drivers/staging/greybus/arche-apb-ctrl.c @@ -10,13 +10,14 @@ #include #include #include -#include #include #include #include #include +#include #include #include +#include #include "arche_platform.h" =20 static void apb_bootret_deassert(struct device *dev); @@ -314,7 +315,7 @@ static ssize_t state_show(struct device *dev, =20 static DEVICE_ATTR_RW(state); =20 -static int apb_ctrl_get_devtree_data(struct platform_device *pdev, +static int apb_ctrl_get_fw_data(struct platform_device *pdev, struct arche_apb_ctrl_drvdata *apb) { struct device *dev =3D &pdev->dev; @@ -378,7 +379,7 @@ static int apb_ctrl_get_devtree_data(struct platform_de= vice *pdev, } =20 /* Only applicable for platform >=3D V2 */ - if (of_property_read_bool(pdev->dev.of_node, "gb,spi-en-active-high")) + if (device_property_read_bool(&pdev->dev, "gb,spi-en-active-high")) apb->spi_en_polarity_high =3D true; =20 return 0; @@ -394,7 +395,7 @@ static int arche_apb_ctrl_probe(struct platform_device = *pdev) if (!apb) return -ENOMEM; =20 - ret =3D apb_ctrl_get_devtree_data(pdev, apb); + ret =3D apb_ctrl_get_fw_data(pdev, apb); if (ret) { dev_err(dev, "failed to get apb devicetree data %d\n", ret); return ret; @@ -403,7 +404,7 @@ static int arche_apb_ctrl_probe(struct platform_device = *pdev) /* Initially set APB to OFF state */ apb->state =3D ARCHE_PLATFORM_STATE_OFF; /* Check whether device needs to be enabled on boot */ - if (of_property_read_bool(pdev->dev.of_node, "arche,init-disable")) + if (device_property_read_bool(&pdev->dev, "arche,init-disable")) apb->init_disabled =3D true; =20 platform_set_drvdata(pdev, apb); --=20 2.52.0