From nobody Fri Dec 19 17:18:33 2025 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (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 D89FE28D8D9 for ; Thu, 4 Dec 2025 23:18:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764890288; cv=none; b=m+8by1ur1gg9A1LlZopzSncWq3pN5uAPkBvrgWX6xf05TuOO8M8glmA1ZwAVVpHIpboB9Xwfha2yUGrLO8pC8yPMFT2wmeFbWlPLyg5PJU0lt3GFjBkA0ls6C7dKp1QrS8SV9B/4ukWf7aeIcH/M4U/7gSWJWyU3jbVgRnTT6Uw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764890288; c=relaxed/simple; bh=vuBPTpEAuXyWcyMQDaP4RxcwNW++G9g8izMKoBAOQDA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tqSA0exuDM2MSTPK+KtEvwtIq7OSZrsKzngtrtj4g6OiV/e6CL0CGWgDzXuQto6EcaMD+zZJXcbwkluQEQAXsMGncMoBnY3zGvYZ5/jy9IHMEoUousQFX8IRK2utsJmHDJOpa8RHgBSdTl5GENEkJ90cHpJSvy1YuGKYnLRm63w= 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=EDac7sMK; arc=none smtp.client-ip=209.85.210.174 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="EDac7sMK" Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-7acd9a03ba9so1680271b3a.1 for ; Thu, 04 Dec 2025 15:18:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764890286; x=1765495086; 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=AWEQlYDaUsxp7jmlyLpjxPDtRsxXkORcN5A8Xf/todk=; b=EDac7sMKfBQ1ZTIx8TxSLz3bOAOZztKrd4y13Ys1guzuumWqasuhQOigxf58OXwewM VoKzJ+bDNSGu/rnGQuelVI6MxYfARbOAxATJsr/Je7Pl1n9fmI7yFtD1cXM56z6Ypxk6 DzOCQzAZqxnEwCxDbmHt/gdtwFD7OKuoB6l8gunHk1U+9NzvFWEj8h92MqxgHOTVnA89 oamEerba2VJ+cC/8srhYitEPk2E/Fl9Td7LB0f7PhdQyw8zJaO0eJbarFSq0BvehdNQF F/R8ZV7+9CJKP+7YWYZCst34HesGQNm+N4NtSpz1PpIHwhJjIKn9/7dCpA4tLcKrblHJ zPmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764890286; x=1765495086; 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=AWEQlYDaUsxp7jmlyLpjxPDtRsxXkORcN5A8Xf/todk=; b=HW6lqeKNQksvlxEQyZtcDQG7zVuI7T48aG5GBQWkLvepNeQpHreSe2thOfWsZH8ZnC ZHeQUS22eXzU8S5VCD0f2UpEZgmhwN2LMStmgM3K4hHngEwtoidlKq81NIsPC3dFvZ0Q DrOfR70LPEXYEW57AbQWS8ck9ZSdNtrDLYm2wukYerAI6VR3ydDc4NVDeubUTAj0Ra8U ukJKoMAPJgQqxsNcyQIzBu7jsNRKTNit975oXce6SmB8ZIXeXRoOJmgJ6UPeuIITnx1G A5lnh0Zom00AHxbNG0iIDEK6uayyL7Mzpb4/3B+1ZJGNpGIMzK08Xn5AEGFi9l537PMj gEWw== X-Forwarded-Encrypted: i=1; AJvYcCUGNGv5NRpYK1cdMr1p0O2+VHTl2SPmxaByGDmjhNPdsipb/fLCpwXw3tpCeNgWt+T897tc+SDN2gPqad8=@vger.kernel.org X-Gm-Message-State: AOJu0YwCXPgsg81qlKu0oqAeVIE3kFd9yinQQFnzSAxkIGbZtwlDzVbj yVb7CxLchMPObhheWP39YdwqsO8LpRyFoKDCWLexe7/Criltcp8egkP422tBrM9cWcY= X-Gm-Gg: ASbGncuJY7HGAoamHFMsXyOv8KBSdEUiCPEzo68lbASHXHwM47bmt69MRXpunN/eRPD fbqA6TL2oc2VsJmulqFYdNbwTAf5YZO1xRrOVNWT18VVXjWksvxjg8oUClkKXaGUjh6j+W2CXKV dmRg93GM8djYg+HAfLkt5d6EB6Kqpr4iu4rGJjsZAzIbGj1X+xUKicb5brtpq6RIpqgA+LtsA2X Y7A1rd0pWhFElE2bOgG8MJ1/33ETCJ2dYcuaYBLcPiCwntPBwIozRjhwF1n2pVajah/6v5woz7L tAB3ia51D2Ib3OwCVKI5AziDiBoI5gLFXUFZ7aAqyWfZfkVLkA4o07y/fp2ZBx7n3uu0Fnkai/U bBGF92WXfZ+h15rHUFaKkhUVcbTSanubofGaMk0n9Lsyunl449mscsli7oums4dTCowqzHVrHKK La8CtXHiASppqF X-Google-Smtp-Source: AGHT+IHxs1tQ1xeBAWh/tIWleP9GOEzT7NgHbhxODFuKWUB91u3R5HydNGSERen5RlQkjRsawkj7kQ== X-Received: by 2002:a05:7022:23a4:b0:11a:962:99c2 with SMTP id a92af1059eb24-11df0cd9026mr6352423c88.38.1764890285862; Thu, 04 Dec 2025 15:18:05 -0800 (PST) Received: from archlinux ([2804:1b2:9545:c615:2358:ef44:78a3:f69a]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-11df749f8ddsm8406971c88.0.2025.12.04.15.18.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Dec 2025 15:18:05 -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 v4] staging: greybus: arche-apb-ctrl: switch to device_property_read_bool Date: Thu, 4 Dec 2025 20:17:53 -0300 Message-ID: <20251204231753.66229-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 --- Changes in v4: - Fixed a typo in the v3 commit Changes in v3: - Added changelog history as requested by the maintainer bot. Changes in v2: - Shortened the subject line to match subsystem standards. - 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