Re: [PATCH 1/2] device property: Split property reading bool and presence test ops
From: Krzysztof Kozlowski
Date: Sat Jan 11 2025 - 05:14:29 EST
On Thu, Jan 09, 2025 at 01:42:05PM -0600, Rob Herring (Arm) wrote:
> The fwnode/device property API currently implement
> (fwnode|device)_property_read_bool() with (fwnode|device)_property_present().
> That does not allow having different behavior depending on the backend.
>
> Specifically, the usage of (fwnode|device)_property_read_bool() on
> non-boolean properties is deprecated on DT. In order to add a warning
> on this deprecated use, these 2 APIs need separate ops for the backend.
>
> Signed-off-by: Rob Herring (Arm) <robh@xxxxxxxxxx>
> ---
> drivers/acpi/property.c | 1 +
> drivers/base/property.c | 38 ++++++++++++++++++++++++++++++++++++++
> drivers/base/swnode.c | 1 +
> drivers/of/property.c | 7 +++++++
> include/linux/fwnode.h | 3 +++
> include/linux/of.h | 4 +++-
> include/linux/property.h | 15 +++------------
> 7 files changed, 56 insertions(+), 13 deletions(-)
Reviewed-by: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Best regards,
Krzysztof