unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 09a49b6a286d3b6f75075636eee3fe3dd6528593 3010 bytes (raw)
name: gnu/packages/patches/amlogic-0018-FROMLIST-v5-dt-bindings-auxdisplay-Add-Titan-Micro-E.patch 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
 
From 1bc9224b52be0df338c4e63e122460df0f651d96 Mon Sep 17 00:00:00 2001
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Sun, 20 Feb 2022 08:24:47 +0000
Subject: [PATCH 18/73] FROMLIST(v5): dt-bindings: auxdisplay: Add Titan Micro
 Electronics TM1628
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Add a YAML schema binding for TM1628 auxdisplay
(7/11-segment LED) controller.

This patch is partially based on previous RFC work from
Andreas Färber <afaerber@suse.de>.

Co-developed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 .../bindings/auxdisplay/titanmec,tm1628.yaml  | 82 +++++++++++++++++++
 1 file changed, 82 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml

diff --git a/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml b/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml
new file mode 100644
index 000000000000..d9cbbc950aab
--- /dev/null
+++ b/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml
@@ -0,0 +1,82 @@
+# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/titanmec,tm1628.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Titan Micro Electronics TM1628 LED controller
+
+properties:
+  compatible:
+    enum:
+    - titanmec,tm1628
+
+  reg:
+    maxItems: 1
+
+  grid:
+    description:
+      Mapping of display digit position to grid number.
+      This implicitly defines the display size.
+    $ref: /schemas/types.yaml#/definitions/uint8-array
+    minItems: 1
+    maxItems: 7
+
+  segment-mapping:
+    description:
+      Mapping of 7 segment display segments A-G to bit numbers 1-12.
+    $ref: /schemas/types.yaml#/definitions/uint8-array
+    minItems: 7
+    maxItems: 7
+
+  "#address-cells":
+    const: 2
+
+  "#size-cells":
+    const: 0
+
+required:
+  - compatible
+  - reg
+
+patternProperties:
+  "^.*@[1-7],([1-9]|1[0-6])$":
+    type: object
+    description: |
+      Properties for a single LED.
+
+    properties:
+      reg:
+        description: |
+          1-based grid number, followed by 1-based segment bit number.
+        maxItems: 1
+
+    required:
+      - reg
+
+examples:
+  - |
+    #include <dt-bindings/leds/common.h>
+
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        led-controller@0 {
+            compatible = "titanmec,tm1628";
+            reg = <0>;
+            spi-3-wire;
+            spi-lsb-first;
+            spi-max-frequency = <500000>;
+            grid = /bits/ 8 <4 3 2 1>;
+            segment-mapping = /bits/ 8 <4 5 6 1 2 3 7>;
+            #address-cells = <2>;
+            #size-cells = <0>;
+
+            alarmn@5,4 {
+                reg = <5 4>;
+                function = LED_FUNCTION_ALARM;
+            };
+        };
+    };
+...
-- 
2.17.1


debug log:

solving 09a49b6a28 ...
found 09a49b6a28 in https://yhetil.org/guix-patches/C2ORkCSHJz-4jxwCauZznk4tZlP9KS4u_3Ywe4q2QrfJ7tvIswRWw4vX6OuzXDIHRriNNTQaCiYC67GgL30p8g80J9OcduCgaoZ8XNf-amE=@protonmail.com/

applying [1/1] https://yhetil.org/guix-patches/C2ORkCSHJz-4jxwCauZznk4tZlP9KS4u_3Ywe4q2QrfJ7tvIswRWw4vX6OuzXDIHRriNNTQaCiYC67GgL30p8g80J9OcduCgaoZ8XNf-amE=@protonmail.com/
diff --git a/gnu/packages/patches/amlogic-0018-FROMLIST-v5-dt-bindings-auxdisplay-Add-Titan-Micro-E.patch b/gnu/packages/patches/amlogic-0018-FROMLIST-v5-dt-bindings-auxdisplay-Add-Titan-Micro-E.patch
new file mode 100644
index 0000000000..09a49b6a28

1:118: trailing whitespace.
-- 
Checking patch gnu/packages/patches/amlogic-0018-FROMLIST-v5-dt-bindings-auxdisplay-Add-Titan-Micro-E.patch...
1:120: new blank line at EOF.
+
Applied patch gnu/packages/patches/amlogic-0018-FROMLIST-v5-dt-bindings-auxdisplay-Add-Titan-Micro-E.patch cleanly.
warning: 2 lines add whitespace errors.

index at:
100644 09a49b6a286d3b6f75075636eee3fe3dd6528593	gnu/packages/patches/amlogic-0018-FROMLIST-v5-dt-bindings-auxdisplay-Add-Titan-Micro-E.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).