mirror of
https://github.com/linux-msm/cdba.git
synced 2026-02-25 13:11:56 -08:00
Add samples and CI test
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
This commit is contained in:
42
.github/workflows/yaml.yml
vendored
Normal file
42
.github/workflows/yaml.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
# Copyright (c) 2021 Canonical Ltd.
|
||||
# Copyright (c) 2023 Linaro Ltd
|
||||
# Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
|
||||
# <krzk@kernel.org>
|
||||
#
|
||||
# Loosely based on: https://github.com/linux-test-project/ltp
|
||||
# https://github.com/linux-nfc/neard
|
||||
#
|
||||
name: "Yaml"
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
job:
|
||||
name: Yaml
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
container:
|
||||
image: ubuntu:jammy
|
||||
|
||||
steps:
|
||||
- name: Git checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install additional packages
|
||||
run: |
|
||||
export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true
|
||||
apt update
|
||||
apt install -y --no-install-recommends yamllint python3-jsonschema python3-ruamel.yaml
|
||||
|
||||
- name: Lint samples
|
||||
run: for file in config-samples/*; do yamllint $file; done
|
||||
|
||||
- name: Check samples
|
||||
run: for file in config-samples/*; do python3 ./validate.py -s schema.yaml $file; done
|
||||
39
.yamllint
Normal file
39
.yamllint
Normal file
@@ -0,0 +1,39 @@
|
||||
extends: relaxed
|
||||
|
||||
rules:
|
||||
line-length:
|
||||
# 80 chars should be enough, but don't fail if a line is longer
|
||||
max: 110
|
||||
allow-non-breakable-words: true
|
||||
level: warning
|
||||
braces:
|
||||
min-spaces-inside: 0
|
||||
max-spaces-inside: 1
|
||||
min-spaces-inside-empty: 0
|
||||
max-spaces-inside-empty: 0
|
||||
brackets:
|
||||
min-spaces-inside: 0
|
||||
max-spaces-inside: 1
|
||||
min-spaces-inside-empty: 0
|
||||
max-spaces-inside-empty: 0
|
||||
colons: {max-spaces-before: 0, max-spaces-after: 1}
|
||||
commas: {min-spaces-after: 1, max-spaces-after: 1}
|
||||
comments:
|
||||
require-starting-space: true
|
||||
min-spaces-from-content: 1
|
||||
comments-indentation: disable
|
||||
document-start:
|
||||
present: true
|
||||
empty-lines:
|
||||
max: 3
|
||||
max-end: 1
|
||||
empty-values:
|
||||
forbid-in-block-mappings: true
|
||||
forbid-in-flow-mappings: true
|
||||
hyphens:
|
||||
max-spaces-after: 1
|
||||
indentation:
|
||||
spaces: 2
|
||||
indent-sequences: true
|
||||
check-multi-line-strings: false
|
||||
trailing-spaces: false
|
||||
13
config-samples/sample1.yaml
Normal file
13
config-samples/sample1.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
devices:
|
||||
- board: myboard
|
||||
name: "My Board"
|
||||
description: |
|
||||
My Awesome board
|
||||
console: /dev/ttyABC0
|
||||
fastboot: cacafada
|
||||
fastboot_set_active: a
|
||||
fastboot_key_timeout: 2
|
||||
usb_always_on: false
|
||||
cdba: /dev/serial/by-id/usb-CDBA-if00
|
||||
voltage: 1800
|
||||
65
config-samples/sample10.yaml
Normal file
65
config-samples/sample10.yaml
Normal file
@@ -0,0 +1,65 @@
|
||||
---
|
||||
devices:
|
||||
- board: myboard
|
||||
name: "My Board"
|
||||
description: |
|
||||
My Awesome board
|
||||
console: /dev/ttyABC0
|
||||
fastboot: cacafada
|
||||
ftdi_gpio: "s:0x0403:0x6011:FT7YWRL8;D;POWER,1,ACTIVE_LOW;FASTBOOT_KEY,0,ACTIVE_HIGH;POWER_KEY,3,ACTIVE_HIGH;USB_DISCONNECT,7,ACTIVE_LOW"
|
||||
- board: myboard-2
|
||||
name: "My Board 2"
|
||||
description: |
|
||||
My Awesome board Number 2
|
||||
console: /dev/ttyABC1
|
||||
fastboot: cacafada
|
||||
ftdi_gpio: "s:0x0403:0x6011:FT7YWRL8;D;POWER_KEY,3,ACTIVE_HIGH;POWER,1,ACTIVE_LOW;FASTBOOT_KEY,0,ACTIVE_HIGH"
|
||||
- board: myboard-3
|
||||
name: "My Board 2"
|
||||
description: |
|
||||
My Awesome board Number 3
|
||||
console: /dev/ttyABC2
|
||||
fastboot: cacafada
|
||||
ftdi_gpio: "s:0x0403:0x6011:FT7YWRL8;D;FASTBOOT_KEY,0,ACTIVE_HIGH;POWER,1,ACTIVE_LOW"
|
||||
- board: myboard-4
|
||||
name: "My Board 2"
|
||||
description: |
|
||||
My Awesome board Number 4
|
||||
console: /dev/ttyABC3
|
||||
fastboot: cacafada
|
||||
ftdi_gpio: "s:0x0403:0x6011:FT7YWRL8;D;POWER,1,ACTIVE_LOW"
|
||||
- board: myboard-5
|
||||
name: "My Board 2"
|
||||
description: |
|
||||
My Awesome board Number 5
|
||||
console: /dev/ttyABC4
|
||||
fastboot: cacafada
|
||||
ftdi_gpio: "s:0x0403:0x6011:FT7YWRL8;D"
|
||||
- board: myboard-6
|
||||
name: "My Board 2"
|
||||
description: |
|
||||
My Awesome board Number 6
|
||||
console: /dev/ttyABC5
|
||||
fastboot: cacafada
|
||||
ftdi_gpio: "s:0x0403:0x6011:FT7YWRL8"
|
||||
- board: myboard-7
|
||||
name: "My Board 2"
|
||||
description: |
|
||||
My Awesome board Number 7
|
||||
console: /dev/ttyABC6
|
||||
fastboot: cacafada
|
||||
ftdi_gpio: "i:0x0403:0x6011;D;POWER,1,ACTIVE_LOW;FASTBOOT_KEY,0,ACTIVE_HIGH;POWER_KEY,3,ACTIVE_HIGH;USB_DISCONNECT,7,ACTIVE_LOW"
|
||||
- board: myboard-8
|
||||
name: "My Board 2"
|
||||
description: |
|
||||
My Awesome board Number 7
|
||||
console: /dev/ttyABC6
|
||||
fastboot: cacafada
|
||||
ftdi_gpio: "i:0x0403:0x6011:0;D;POWER,1,ACTIVE_LOW;FASTBOOT_KEY,0,ACTIVE_HIGH;POWER_KEY,3,ACTIVE_HIGH;USB_DISCONNECT,7,ACTIVE_LOW"
|
||||
- board: myboard-9
|
||||
name: "My Board 2"
|
||||
description: |
|
||||
My Awesome board Number 7
|
||||
console: /dev/ttyABC6
|
||||
fastboot: cacafada
|
||||
ftdi_gpio: "d:/dev/bus/usb/006/001;D;POWER,1,ACTIVE_LOW;FASTBOOT_KEY,0,ACTIVE_HIGH;POWER_KEY,3,ACTIVE_HIGH;USB_DISCONNECT,7,ACTIVE_LOW"
|
||||
12
config-samples/sample2.yaml
Normal file
12
config-samples/sample2.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
devices:
|
||||
- board: myboard
|
||||
name: "My Board"
|
||||
description: |
|
||||
My Awesome board
|
||||
console: /dev/ttyABC0
|
||||
fastboot: cacafada
|
||||
fastboot_set_active: b
|
||||
fastboot_key_timeout: 2
|
||||
usb_always_on: false
|
||||
conmux: /dev/serial/by-id/usb-CDBA-if00
|
||||
12
config-samples/sample3.yaml
Normal file
12
config-samples/sample3.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
devices:
|
||||
- board: myboard
|
||||
name: "My Board"
|
||||
description: |
|
||||
My Awesome board
|
||||
console: /dev/ttyABC0
|
||||
fastboot: cacafada
|
||||
fastboot_set_active: true
|
||||
fastboot_key_timeout: 2
|
||||
usb_always_on: false
|
||||
external: /path/to/my/awesome/script.sh
|
||||
13
config-samples/sample4.yaml
Normal file
13
config-samples/sample4.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
devices:
|
||||
- board: myboard
|
||||
name: "My Board"
|
||||
description: |
|
||||
My Awesome board
|
||||
console: /dev/ttyABC0
|
||||
fastboot: cacafada
|
||||
fastboot_set_active: true
|
||||
fastboot_key_timeout: 2
|
||||
usb_always_on: false
|
||||
ppps_path: 2-2:1.0/2-2-port2
|
||||
ppps3_path: 2-2:2.0/2-2-port2
|
||||
12
config-samples/sample5.yaml
Normal file
12
config-samples/sample5.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
devices:
|
||||
- board: myboard
|
||||
name: "My Board"
|
||||
description: |
|
||||
My Awesome board
|
||||
console: /dev/ttyABC0
|
||||
fastboot: cacafada
|
||||
fastboot_set_active: true
|
||||
fastboot_key_timeout: 2
|
||||
usb_always_on: false
|
||||
qcomlt_debug_board: /dev/serial/by-id/usb-DebugBoard-if00
|
||||
12
config-samples/sample6.yaml
Normal file
12
config-samples/sample6.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
devices:
|
||||
- board: myboard
|
||||
name: "My Board"
|
||||
description: |
|
||||
My Awesome board
|
||||
console: /dev/ttyABC0
|
||||
fastboot: cacafada
|
||||
fastboot_set_active: true
|
||||
fastboot_key_timeout: 2
|
||||
usb_always_on: false
|
||||
alpaca: /dev/serial/by-id/usb-ALPACA-if00
|
||||
16
config-samples/sample7.yaml
Normal file
16
config-samples/sample7.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
devices:
|
||||
- board: myboard
|
||||
name: "My Board"
|
||||
description: |
|
||||
My Awesome board
|
||||
console: /dev/ttyABC0
|
||||
fastboot: cacafada
|
||||
fastboot_set_active: true
|
||||
fastboot_key_timeout: 2
|
||||
usb_always_on: false
|
||||
cdba: /dev/serial/by-id/usb-CDBA-if00
|
||||
voltage: 1800
|
||||
users:
|
||||
- toto
|
||||
- tata
|
||||
75
config-samples/sample8.yaml
Normal file
75
config-samples/sample8.yaml
Normal file
@@ -0,0 +1,75 @@
|
||||
---
|
||||
devices:
|
||||
- board: myboard
|
||||
name: "My Board"
|
||||
description: |
|
||||
My Awesome board
|
||||
console: /dev/ttyABC0
|
||||
fastboot: cacafada
|
||||
ftdi_gpio:
|
||||
vendor: "0x0403"
|
||||
product: "0x6011"
|
||||
serial: FT7YWRL8
|
||||
power_key:
|
||||
interface: A
|
||||
line: 2
|
||||
fastboot_key:
|
||||
interface: A
|
||||
line: 0
|
||||
active_low: true
|
||||
power:
|
||||
interface: A
|
||||
line: 1
|
||||
active_low: true
|
||||
- board: myboard-2
|
||||
name: "My Board 2"
|
||||
description: |
|
||||
My Awesome board Number 2
|
||||
console: /dev/ttyABC1
|
||||
fastboot: cacafada
|
||||
ftdi_gpio:
|
||||
vendor: "0x0403"
|
||||
product: "0x6011"
|
||||
index: 0
|
||||
power:
|
||||
interface: B
|
||||
line: 1
|
||||
active_low: true
|
||||
fastboot_key:
|
||||
interface: B
|
||||
line: 0
|
||||
active_low: true
|
||||
power_key:
|
||||
interface: B
|
||||
line: 2
|
||||
usb_disconnect:
|
||||
interface: C
|
||||
line: 7
|
||||
active_low: true
|
||||
- board: myboard-3
|
||||
name: "My Board 3"
|
||||
description: |
|
||||
My Awesome board Number 3
|
||||
console: /dev/ttyABC1
|
||||
fastboot: cacafada
|
||||
ftdi_gpio:
|
||||
vendor: "0x0403"
|
||||
product: "0x6011"
|
||||
power_key:
|
||||
interface: B
|
||||
line: 2
|
||||
power:
|
||||
interface: D
|
||||
line: 1
|
||||
active_low: true
|
||||
- board: myboard-4
|
||||
name: "My Board 4"
|
||||
description: |
|
||||
My Awesome board Number 4
|
||||
console: /dev/ttyABC1
|
||||
fastboot: cacafada
|
||||
ftdi_gpio:
|
||||
devicenode: /dev/bus/usb/006/001
|
||||
power:
|
||||
interface: D
|
||||
line: 6
|
||||
26
config-samples/sample9.yaml
Normal file
26
config-samples/sample9.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
devices:
|
||||
- board: myboard
|
||||
name: "My Board"
|
||||
description: |
|
||||
My Awesome board
|
||||
console: /dev/ttyABC0
|
||||
fastboot: cacafada
|
||||
fastboot_set_active: true
|
||||
fastboot_key_timeout: 2
|
||||
local_gpio:
|
||||
power:
|
||||
chip: gpiochip0
|
||||
line: 7
|
||||
active_low: true
|
||||
fastboot_key:
|
||||
chip: gpiochip0
|
||||
line: 8
|
||||
active_low: true
|
||||
power_key:
|
||||
chip: gpiochip0
|
||||
line: 14
|
||||
active_low: true
|
||||
usb_disconnect:
|
||||
chip: gpiochip0
|
||||
line: 4
|
||||
Reference in New Issue
Block a user