diff mbox series

[v4,05/18] dt-bindings: usb: Add qcom,pmic-typec dt-binding header

Message ID 20230318121828.739424-6-bryan.odonoghue@linaro.org
State New
Headers show
Series Add Qualcomm PMIC TPCM support | expand

Commit Message

Bryan O'Donoghue March 18, 2023, 12:18 p.m. UTC
Adds a series of defines which are used in the DTS and type-c driver for
identifying interrupts.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 .../dt-bindings/usb/typec/qcom,pmic-typec.h    | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 include/dt-bindings/usb/typec/qcom,pmic-typec.h

Comments

Krzysztof Kozlowski March 19, 2023, 11:50 a.m. UTC | #1
On 18/03/2023 13:18, Bryan O'Donoghue wrote:
> Adds a series of defines which are used in the DTS and type-c driver for
> identifying interrupts.

I see your driver uses them, but I don't understand why and what for...
Why would we define them as bindings? We do not define interrupt numbers
as bindings. Why the driver needs it?

> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>  .../dt-bindings/usb/typec/qcom,pmic-typec.h    | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>  create mode 100644 include/dt-bindings/usb/typec/qcom,pmic-typec.h
> 
> diff --git a/include/dt-bindings/usb/typec/qcom,pmic-typec.h b/include/dt-bindings/usb/typec/qcom,pmic-typec.h
> new file mode 100644
> index 0000000000000..733e23b6cdbc4
> --- /dev/null
> +++ b/include/dt-bindings/usb/typec/qcom,pmic-typec.h
> @@ -0,0 +1,18 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */

If the file stays: dual license.

And squash it with next patch. Binding headers are not a separate
feature. It's the same as adding bindings.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/include/dt-bindings/usb/typec/qcom,pmic-typec.h b/include/dt-bindings/usb/typec/qcom,pmic-typec.h
new file mode 100644
index 0000000000000..733e23b6cdbc4
--- /dev/null
+++ b/include/dt-bindings/usb/typec/qcom,pmic-typec.h
@@ -0,0 +1,18 @@ 
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2023, The Linux Foundation. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_TCPM_QCOM_PMIC_TYPEC_H
+#define _DT_BINDINGS_TCPM_QCOM_PMIC_TYPEC_H
+
+#define PMIC_TYPEC_OR_RID_IRQ		0x0
+#define PMIC_TYPEC_VPD_IRQ		0x1
+#define PMIC_TYPEC_CC_STATE_IRQ		0x2
+#define PMIC_TYPEC_VCONN_OC_IRQ		0x3
+#define PMIC_TYPEC_VBUS_IRQ		0x4
+#define PMIC_TYPEC_ATTACH_DETACH_IRQ	0x5
+#define PMIC_TYPEC_LEGACY_CABLE_IRQ	0x6
+#define PMIC_TYPEC_TRY_SNK_SRC_IRQ	0x7
+
+#endif