Skip to content

Commit d76cfc7

Browse files
committed
Merge tag 'qcom-drivers-for-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers
Qualcomm driver additional updates for 5.9 This fixes a potential race condition with remoteprocs by not sending acknowledgements until after registered drivers has processed the event. It adds IPQ6018 support to the SMD RPM driver, fixes kerneldoc in the same and converts the related DT binding to YAML. Finally it fixes a compilation warning in the geni serial engine driver when compiled without CONFIG_SERIAL_EARLYCON. * tag 'qcom-drivers-for-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: soc: qcom: geni: Fix unused label warning soc: qcom: smd-rpm: Fix kerneldoc soc: qcom: pdr: Reorder the PD state indication ack dt-bindings: soc: qcom: smd-rpm: Convert binding to YAML schema soc: qcom: smd-rpm: Add IPQ6018 compatible dt-bindings: soc: qcom: smd-rpm: Add IPQ6018 compatible Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents d7c6dbc + 0fec861 commit d76cfc7

File tree

5 files changed

+94
-66
lines changed

5 files changed

+94
-66
lines changed

Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.txt

Lines changed: 0 additions & 64 deletions
This file was deleted.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: "http://devicetree.org/schemas/soc/qcom/qcom,smd-rpm.yaml#"
5+
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
6+
7+
title: Qualcomm Resource Power Manager (RPM) over SMD
8+
9+
description: |
10+
This driver is used to interface with the Resource Power Manager (RPM) found
11+
in various Qualcomm platforms. The RPM allows each component in the system
12+
to vote for state of the system resources, such as clocks, regulators and bus
13+
frequencies.
14+
15+
The SMD information for the RPM edge should be filled out. See qcom,smd.txt
16+
for the required edge properties. All SMD related properties will reside
17+
within the RPM node itself.
18+
19+
The RPM exposes resources to its subnodes. The rpm_requests node must be
20+
present and this subnode may contain children that designate regulator
21+
resources.
22+
23+
Refer to Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt
24+
for information on the regulator subnodes that can exist under the
25+
rpm_requests.
26+
27+
maintainers:
28+
- Kathiravan T <[email protected]>
29+
30+
properties:
31+
compatible:
32+
enum:
33+
- qcom,rpm-apq8084
34+
- qcom,rpm-ipq6018
35+
- qcom,rpm-msm8916
36+
- qcom,rpm-msm8974
37+
- qcom,rpm-msm8976
38+
- qcom,rpm-msm8996
39+
- qcom,rpm-msm8998
40+
- qcom,rpm-sdm660
41+
- qcom,rpm-qcs404
42+
43+
qcom,smd-channels:
44+
$ref: /schemas/types.yaml#/definitions/string-array
45+
description: Channel name used for the RPM communication
46+
items:
47+
- const: rpm_requests
48+
49+
if:
50+
properties:
51+
compatible:
52+
contains:
53+
enum:
54+
- qcom,rpm-apq8084
55+
- qcom,rpm-msm8916
56+
- qcom,rpm-msm8974
57+
then:
58+
required:
59+
- qcom,smd-channels
60+
61+
required:
62+
- compatible
63+
64+
additionalProperties: false
65+
66+
examples:
67+
- |
68+
#include <dt-bindings/interrupt-controller/arm-gic.h>
69+
#include <dt-bindings/interrupt-controller/irq.h>
70+
71+
smd {
72+
compatible = "qcom,smd";
73+
74+
rpm {
75+
interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
76+
qcom,ipc = <&apcs 8 0>;
77+
qcom,smd-edge = <15>;
78+
79+
rpm_requests {
80+
compatible = "qcom,rpm-msm8974";
81+
qcom,smd-channels = "rpm_requests";
82+
83+
/* Regulator nodes to follow */
84+
};
85+
};
86+
};
87+
...

drivers/soc/qcom/pdr_interface.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,15 @@ static void pdr_indack_work(struct work_struct *work)
278278

279279
list_for_each_entry_safe(ind, tmp, &pdr->indack_list, node) {
280280
pds = ind->pds;
281-
pdr_send_indack_msg(pdr, pds, ind->transaction_id);
282281

283282
mutex_lock(&pdr->status_lock);
284283
pds->state = ind->curr_state;
285284
pdr->status(pds->state, pds->service_path, pdr->priv);
286285
mutex_unlock(&pdr->status_lock);
287286

287+
/* Ack the indication after clients release the PD resources */
288+
pdr_send_indack_msg(pdr, pds, ind->transaction_id);
289+
288290
mutex_lock(&pdr->list_lock);
289291
list_del(&ind->node);
290292
mutex_unlock(&pdr->list_lock);

drivers/soc/qcom/qcom-geni-se.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,8 +910,8 @@ static int geni_se_probe(struct platform_device *pdev)
910910
if (of_get_compatible_child(pdev->dev.of_node, "qcom,geni-debug-uart"))
911911
earlycon_wrapper = wrapper;
912912
of_node_put(pdev->dev.of_node);
913-
#endif
914913
exit:
914+
#endif
915915
dev_set_drvdata(dev, wrapper);
916916
dev_dbg(dev, "GENI SE Driver probed\n");
917917
return devm_of_platform_populate(dev);

drivers/soc/qcom/smd-rpm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* struct qcom_smd_rpm - state of the rpm device driver
2121
* @rpm_channel: reference to the smd channel
2222
* @icc: interconnect proxy device
23+
* @dev: rpm device
2324
* @ack: completion for acks
2425
* @lock: mutual exclusion around the send/complete pair
2526
* @ack_status: result of the rpm request
@@ -86,6 +87,7 @@ struct qcom_rpm_message {
8687
/**
8788
* qcom_rpm_smd_write - write @buf to @type:@id
8889
* @rpm: rpm handle
90+
* @state: active/sleep state flags
8991
* @type: resource type
9092
* @id: resource identifier
9193
* @buf: the data to be written
@@ -230,6 +232,7 @@ static void qcom_smd_rpm_remove(struct rpmsg_device *rpdev)
230232

231233
static const struct of_device_id qcom_smd_rpm_of_match[] = {
232234
{ .compatible = "qcom,rpm-apq8084" },
235+
{ .compatible = "qcom,rpm-ipq6018" },
233236
{ .compatible = "qcom,rpm-msm8916" },
234237
{ .compatible = "qcom,rpm-msm8936" },
235238
{ .compatible = "qcom,rpm-msm8974" },

0 commit comments

Comments
 (0)