From nobody Sun Feb 8 05:42:22 2026 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 AB5B829B795 for ; Thu, 4 Dec 2025 16:29:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764865762; cv=none; b=sdi9aVNp5wfcL3hCfGpscXx1kSG7sctuES9yuApkEI0a7JImiLtW0zO2FUIkdS/7RUfPmyHuDs10ZvTcGrAp/2jGVNLadf+bbvq/eRixGOL8H58HBzEekPv+6DKrdT5E9JzBEl2Z8M2Y4ynw0HkgNngBHJifb6ZN1GqCaMA1ms0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764865762; c=relaxed/simple; bh=JmW6IfkNs6IQgXkkoQY6XBDJbkEtq06TJWwGCWOYDs4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KOoO1Xl2fQLY2JeVVgKLi2H6mL2BOyowi8eC9nVzbPt5/VcuLvhtwQo7ovJeqWNwH2/y21dVcKVw1QoK9DBx1DpjyemJdKSJ45T3HgCilyTUFGAzJd8H64bf1ABo6RIxInwxoWGuC74j2V+v+cmbVseepW7dsBph8MTSwMf+3c4= 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=G5ACtwIS; arc=none smtp.client-ip=209.85.214.180 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="G5ACtwIS" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-29555b384acso11943895ad.1 for ; Thu, 04 Dec 2025 08:29:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764865758; x=1765470558; 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=p2EOKJaJr5DVsyfexp+IIbTVfdVI8+rHJ5+Gsh6Mpxw=; b=G5ACtwISCbDWYtZpq8B9mzlljQHEn7G0EG4zQ6PqJBHYkUq3Ef7BcECkfua78rndfB akUfg/evETfIVDIpQnUHHe+habzuOLZbxYhxQXptR/BGuFUXrozEEmWxQnw3X4H81OuY zTcjcpVJJ2moKDzgNsgw6XSa5/38dQEewkRYR8W7iOuatH8LPpQ1C62N8HTv770jaDhM ffrrCNvM7oErNnRAiQ6i6GWzw169gumsZQTKaCdL8rF4oZbux1cIZOymghi4C5ONSbtI v4INAX9fDlt/qQqbw0bvGtOjGuk3pKU0fVcRTJcfKB5GCl0EP88J+zu9uG8llHToG8u/ ZtrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764865758; x=1765470558; 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=p2EOKJaJr5DVsyfexp+IIbTVfdVI8+rHJ5+Gsh6Mpxw=; b=ETwS3rN7IbdJtxHBHYVJ88ua6AlqEsezE3A6RoaLticnHnfy0WTON74KTw1Zqo+9Jv GUFiiZe82M4szRB3OSgbMEwwXJnil7+Qlzk0ACRGorRc+0qA9x+rsitxcYUpgYgsOnEF mOoCOA6Az46vgBDVQebxjTIQlDbf+KixodUywEaYIc6Epqno1N5mApHF1q7Ni+DhFuw0 SyFCbd3ta7Sa9UW91SUjL2QVBo4wajdT52ZgE/zXCMlQfMZQXqBd7jCRZ87PkpA/Vag4 zvrpCyxkfZJGo2MvcjEfWvYbTOio49xhxeTHGIz5JbDTmZFcGNTl65Ablo00ApPuHbtV RS+Q== X-Forwarded-Encrypted: i=1; AJvYcCWw/+k/UxssblQb3PLBj3L5nMxorYBUwUiTB5v9uEwXeB94bdOA8dsS1RflAXdLBZ+vlhPBzVPD5oCy8ew=@vger.kernel.org X-Gm-Message-State: AOJu0YzdObryBbIgR2E65J//JokMnS+Rb7fHtidXzqgZMEH0pO4kka3s r3+8lq/EUrqqbBl4uyVmr228PoiqAk/khfI0KSJo0YNOHmPVLTgilyub X-Gm-Gg: ASbGncsu5ID9+3NTtIzgbhOcrKcgwXC2Tje/qwCWW3Y+KKHbMYni0pAuBYDSwmjaBbu WV8ZWbzyRzxDZGrH2X85dtZ1lIva2zukQGdZqI9OQTuzQomd2aoZYbmz5eCUTHNwwuDA6J1xyxK 9PbkZqdS/DAjRc4xdTqYDHWi89PD62CIAWs637SgYay9i7uhUOMDOOvkAbGrBmQjGQm48NbUcDF QqKbwdxf8VQ9gTcW6Ox0mupMRepTIY2aNrZifSEevWgfLDd9wEsz5QGAbDjvyqKZvih1arSqSoK sLjp4pHlWlING9NGCq9Sy6EK4X6QhoQDjn6sPtWyYWN9f1WUMrEHBndeXozF0Rlcgqtgk1shwfJ HyFuuCTXVX8xTe8DmZ/lcE6EjCZpRwdTKrla2o2gGiA9TCO7JCO31Ju/rdHE4MMnbiIPoJLMu3x cG4/ccyCVsIxAR X-Google-Smtp-Source: AGHT+IF8+Njgaeb1d/EncpVZ5EbXG3MJ+qNBAPIadQrubEDDyDmXTY/rcCmPXRT1WfIGcI0A1pBxsA== X-Received: by 2002:a05:7022:f95:b0:119:e56b:91ed with SMTP id a92af1059eb24-11df0c2fc7fmr4599394c88.30.1764865758250; Thu, 04 Dec 2025 08:29:18 -0800 (PST) Received: from archlinux ([2804:1b2:9545:c615:2358:ef44:78a3:f69a]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2aba8395d99sm10106454eec.1.2025.12.04.08.29.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Dec 2025 08:29:17 -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 v2] staging: greybus: arche-apb-ctrl: switch to device_property_read_bool Date: Thu, 4 Dec 2025 13:29:06 -0300 Message-ID: <20251204162906.45005-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 --- 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