]> www.infradead.org Git - users/jedix/linux-maple.git/commit
device property: Split property reading bool and presence test ops
authorRob Herring (Arm) <robh@kernel.org>
Thu, 9 Jan 2025 19:42:05 +0000 (13:42 -0600)
committerRob Herring (Arm) <robh@kernel.org>
Mon, 13 Jan 2025 23:47:29 +0000 (17:47 -0600)
commitbb3914101f704a8282f65238d6b021d216efc608
treef7467e58da6cdcb3df24531da2875278af8e96db
parentde7323f6fc10f36307895ce604585a539d1cc89a
device property: Split property reading bool and presence test ops

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.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/20250109-dt-type-warnings-v1-1-0150e32e716c@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
drivers/acpi/property.c
drivers/base/property.c
drivers/base/swnode.c
drivers/of/property.c
include/linux/fwnode.h
include/linux/of.h
include/linux/property.h