[GIT PULL] Device properties framework updates for v5.4-rc1
From: Rafael J. Wysocki
Date: Tue Sep 17 2019 - 06:27:30 EST
Hi Linus,
Please pull from the tag
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
devprop-5.4-rc1
with top-most commit 016049a816774edc9c3cd81afa7724d7ab001585
software node: Initialize the return value in software_node_find_by_name()
on top of commit a55aa89aab90fae7c815b0551b07be37db359d76
Linux 5.3-rc6
to receive device properties framework updates for 5.4-rc1.
These include software node support improvements (Heikki Krogerus)
and two assorted cleanups (Andy Shevchenko, Geert Uytterhoeven).
There was a conflict between this and the USB tree in linux-next
which was resolved by Stephen by applying the appended diff.
Thanks!
---------------
Andy Shevchenko (1):
device property: Remove duplicate test for NULL
Geert Uytterhoeven (1):
ACPI / property: Fix acpi_graph_get_remote_endpoint() name in kerneldoc
Heikki Krogerus (5):
software node: Add software_node_find_by_name()
usb: roles: intel_xhci: Supplying software node for the role mux
platform/x86: intel_cht_int33fe: Use new API to gain access to
the role switch
software node: Initialize the return value in software_node_to_swnode()
software node: Initialize the return value in software_node_find_by_name()
---------------
drivers/acpi/property.c | 2 +-
drivers/base/swnode.c | 39 +++++++++++++++++-
drivers/platform/x86/intel_cht_int33fe.c | 57 +++++---------------------
drivers/usb/roles/intel-xhci-usb-role-switch.c | 27 ++++++++----
include/linux/fwnode.h | 9 ++--
include/linux/property.h | 4 ++
6 files changed, 78 insertions(+), 60 deletions(-)
---------------
diff --cc drivers/usb/roles/intel-xhci-usb-role-switch.c
index 7325a84dd1c8,88d041601c51..000000000000
--- a/drivers/usb/roles/intel-xhci-usb-role-switch.c
+++ b/drivers/usb/roles/intel-xhci-usb-role-switch.c
@@@ -37,12 -44,9 +44,13 @@@
struct intel_xhci_usb_data {
struct usb_role_switch *role_sw;
void __iomem *base;
+ bool enable_sw_switch;
};
+static const struct software_node intel_xhci_usb_node = {
+ "intel-xhci-usb-sw",
+};
+
static int intel_xhci_usb_set_role(struct device *dev, enum usb_role role)
{
struct intel_xhci_usb_data *data = dev_get_drvdata(dev);
@@@ -147,20 -167,12 +167,22 @@@ static int intel_xhci_usb_probe(struct
platform_set_drvdata(pdev, data);
+ data->enable_sw_switch = !device_property_read_bool(dev,
+ "sw_switch_disable");
+ ret = software_node_register(&intel_xhci_usb_node);
+ if (ret)
+ return ret;
+
+ sw_desc.set = intel_xhci_usb_set_role,
+ sw_desc.get = intel_xhci_usb_get_role,
+ sw_desc.allow_userspace_control = true,
+ sw_desc.fwnode = software_node_fwnode(&intel_xhci_usb_node);
data->role_sw = usb_role_switch_register(dev, &sw_desc);
- if (IS_ERR(data->role_sw))
+ if (IS_ERR(data->role_sw)) {
+ fwnode_handle_put(sw_desc.fwnode);
return PTR_ERR(data->role_sw);
+ }
pm_runtime_set_active(dev);
pm_runtime_enable(dev);