Skip to content

Commit 9d39b0e

Browse files
committed
scripts: genpinctrl: genpinctrl.py checks out HAL2 related SoCs
Prevent Git from tracking removal on pinctrl sub-directories for SoCs relying on HAL2 (currently only the stm32c5 SoC family). This change prevents genpinctrl.py from removing the pinctrl DTSI files related to such SoCs while still showing changes if any. Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
1 parent fca1491 commit 9d39b0e

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

scripts/genpinctrl/genpinctrl.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from pathlib import Path
1818
import re
1919
import shutil
20-
from subprocess import check_output, STDOUT, CalledProcessError
20+
from subprocess import check_output, STDOUT, CalledProcessError, run
2121
import xml.etree.ElementTree as ET
2222

2323
from jinja2 import Environment, FileSystemLoader
@@ -78,6 +78,11 @@
7878
]
7979
"""Supported SoC families"""
8080

81+
HAL2_FAMILIES = [
82+
"stm32c5",
83+
]
84+
"""SoC families relying on HAL2"""
85+
8186
PIN_MODS = [
8287
"_C", # Pins with analog switch (H7)
8388
]
@@ -616,6 +621,10 @@ def main(data_path, output):
616621
if output.exists() and not FAMILY_FILTER.is_active():
617622
shutil.rmtree(output)
618623
output.mkdir(parents=True)
624+
# Do not consider SoCs related to HAL2
625+
for family in HAL2_FAMILIES:
626+
family_path = output / "st" / family.removeprefix("stm32")
627+
run(["git", "checkout", "--", family_path], check=True)
619628

620629
for family, refs in mcu_signals.items():
621630
# check family is supported

0 commit comments

Comments
 (0)