diff options
author | Konrad Dybcio <quic_kdybcio@quicinc.com> | 2024-08-14 12:27:27 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2024-08-19 13:53:48 +0200 |
commit | b27622f1317271b88048ff2d76fead28b72aeccf (patch) | |
tree | a9d717ba6f887837a9d18a07b4edf79984ecc04b /drivers/platform/surface/aggregator/bus.c | |
parent | ceccd196e158805a4e9b69d92318dafe7b9d3ea2 (diff) |
platform/surface: Add OF support
Add basic support for registering the aggregator module on Device Tree-
based platforms. These include at least three generations of Qualcomm
Snapdragon-based Surface devices:
- SC8180X / SQ1 / SQ2: Pro X,
- SC8280XP / SQ3: Devkit 2023, Pro 9
- X Elite: Laptop 7 / Pro11
Thankfully, the aggregators on these seem to be configured in an
identical way, which allows for using these settings as defaults and
no DT properties need to be introduced (until that changes, anyway).
Based on the work done by Maximilian Luz, largely rewritten.
Signed-off-by: Konrad Dybcio <quic_kdybcio@quicinc.com>
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
Tested-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20240814-topic-sam-v3-3-a84588aad233@quicinc.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/surface/aggregator/bus.c')
-rw-r--r-- | drivers/platform/surface/aggregator/bus.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/platform/surface/aggregator/bus.c b/drivers/platform/surface/aggregator/bus.c index af8d573aae93..d68d231e716e 100644 --- a/drivers/platform/surface/aggregator/bus.c +++ b/drivers/platform/surface/aggregator/bus.c @@ -6,6 +6,7 @@ */ #include <linux/device.h> +#include <linux/of.h> #include <linux/property.h> #include <linux/slab.h> @@ -441,6 +442,7 @@ static int ssam_add_client_device(struct device *parent, struct ssam_controller sdev->dev.parent = parent; sdev->dev.fwnode = fwnode_handle_get(node); + sdev->dev.of_node = to_of_node(node); status = ssam_device_add(sdev); if (status) |