From nobody Fri Dec 19 17:18:52 2025 Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) (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 DF6872F99A3 for ; Fri, 5 Dec 2025 11:21:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764933713; cv=none; b=EDzuWkXhJrxgHbBdro5ONZFtW5f/4o11lU9/P1xWXunOHD1rf6H4lmLkZGOWD9zQwMscRb/PEZRJLsezAP4ZTjODqw9zBOVwH0zvDPGacGvohMp0uvCfId4o6d002k55GD4XzXWLh+nq22ENjrKHQ9L0YHL17aYd0SgR8SA99b4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764933713; c=relaxed/simple; bh=2/gAulKtzzFr7YJbE8Gp5IY/e1RbiN7OHhRPWyb3QN8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rxAYyvw4zvY9zvrq1yps0iCGUzX5a21zudK18iR2fmCtPvCYvutpE0y/VfaVcxayFTAax+GT0RgLFfh+14yoCdU7KeRK7zkjJ91I4bVCuXy2FzRSbF8OKtJiF/BdNOpcdLifimPVfoSVz06Gf5B1sYfenEDKTtgY6O7YOEDqOoQ= 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=dtc0uIpT; arc=none smtp.client-ip=209.85.210.169 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="dtc0uIpT" Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-7b75e366866so958882b3a.2 for ; Fri, 05 Dec 2025 03:21:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764933710; x=1765538510; 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=P55QFDL5j85Vhd3CMucSVVVZVJ9u57AheboaCTxtyrw=; b=dtc0uIpTM57hzo/ZgTZtZahSUWS5dFfc5WKLm8YpliZwYd77hX+GjCAtPWkgVqnvM7 xAdy9Z9mEDR8PbGBT2WFCZuEwlWSYZlsZoLiYvbMOmT9H3PdlNUJpWnXpVLdnt9/3eGS iDWf6pS1uyHVB07eRlfl2ZNAR8arO8TlagcAzTuWWmEwYk4aAoJG3MwA2t1dmz393P3p RECJ+tGGHBPuFKdAn/fzV0dzgFYIQ+keqdRPMuzfZUeNM0YDRp06/V5FL4pvOvNQ35HV yasTIhzqfQsE6fWI86gp2BGgkEUy7Rz6SssQxm6O4pnOw1esvLJGZdvHOaYx+GOVoXtS n8bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764933710; x=1765538510; 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=P55QFDL5j85Vhd3CMucSVVVZVJ9u57AheboaCTxtyrw=; b=gESFtypidr5BHxZ2SBkUkcpjtdt6dEVhMz8h1MFuRxVdCO3dEtPPJPJikxL0rk7okt 1fIMkZ7y/SYj8KX5vUr9vdhPQxRPmfVYstlZ0+w9BcEMbzQewedSKhGkFjZ5B+ztfLqt Z1B/UYSdGLc/mxYPuVJIPcmIN+w+NjWluZNCa9F9QXkP7YHosksFikUkn1eQEjvfxR6c U+3X3WnvQk7iJKWpiKEuog5R0EbMzOMdm/axk8yQFt2JAQbSwCT3vkPD8/WDmyr3zq2D l0hGomOjuXeKB/LnmKdp+SG+P8Dq4UuPWhioU9jYVuzYmC7RLH4Cujx/A6PDSNkC5m2n bBhg== X-Forwarded-Encrypted: i=1; AJvYcCVN2buU4MtNuL8PRaVOxbhSUWiMN4uurFKMBymoY4rSzxhlwSQiIH/H7BlLiDQ6S3qPAP4qA0FTfVDjZys=@vger.kernel.org X-Gm-Message-State: AOJu0YwFs/TVv9es6o8XbrBVOPM8LYxkPAC8vONxLGjpdXGbO8k4EAQB GXxqH6K4Ocos3SEo+TdFUotjuD1w7mYqdrd24Ei/eEWpbuij4/QLgm4o X-Gm-Gg: ASbGncvzVhIqKNCs7J6L3bebX9aTifnQBudVJpqGIDbBioexB98+3uuNf9hHyUyuejp 1s5FTKNtfVMxt9RRaOEH95Q4vWJ4pgorrjA4mVQJ8i5yQpXkri71OcEoXXNhP6911cbVX0Ci1/b glKSwLGeGw6PqjlgLrghv9HkOjDsbWPUvo30SVK3nTcodpsSkDxV0rtWkfI2yWlKENj0uz6d91z wqsXAxajmKSzrv4lkpfDLT/6nUt0PJ+t/+yYO59nwxKd3dK8CQT5UcwQu4TXSljXHJeUtHcUa30 iT5trRxaogIPUjFNJoxp8ktDbPjcgGDwJ0URtFGruDE0BGzGEKzwwZIbHWCMN1u/GVuroZMGkF3 qq8FAXl7GzzDKPcYlBHAd8N7eKDs3H2uZz3FbVcvYREBsLW+EU5u8iGFCeuUx/r7lhlrGKOrBk5 b/Ti4MXiStfKnD X-Google-Smtp-Source: AGHT+IFy2MHfCerrGnaj1Qc+/LL4wDTJCmzPsBHd2bOjZVbGPNG91rncOd1PgzI9xp3MZTEio0x3zw== X-Received: by 2002:a05:7022:e1f:b0:11b:af12:ba30 with SMTP id a92af1059eb24-11df643bf9emr4174980c88.8.1764933709822; Fri, 05 Dec 2025 03:21:49 -0800 (PST) Received: from archlinux ([2804:1b2:9545:c615:2358:ef44:78a3:f69a]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-11df76edd4fsm15756550c88.8.2025.12.05.03.21.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Dec 2025 03:21:49 -0800 (PST) From: Julio Cesar Carvalho de Paula Souza To: hvaibhav.linux@gmail.com, johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org, dan.carpenter@linaro.org Cc: greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Julio Cesar Carvalho de Paula Souza Subject: [PATCH v6] staging: greybus: arche-apb-ctrl: switch to device_property_read_bool Date: Fri, 5 Dec 2025 08:21:38 -0300 Message-ID: <20251205112138.3431-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 v6: - Aligned function arguments with the open parenthesis in function decl= aration. Changes in v5: - Fixed 'From' header mismatch(updated git config user.name) - Fixed indentation aligment in function declaration as pointed out by Dan Carpenter 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 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/gre= ybus/arche-apb-ctrl.c index 90ab32638d3f..33f26a65f0cc 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,8 +315,8 @@ 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, - struct arche_apb_ctrl_drvdata *apb) +static int apb_ctrl_get_fw_data(struct platform_device *pdev, + struct arche_apb_ctrl_drvdata *apb) { struct device *dev =3D &pdev->dev; int ret; @@ -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