soc: support for multi-SKU platforms

Add status pages for the platforms with a single code name and multiple
SKUs.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
This commit is contained in:
Dmitry Baryshkov
2025-12-21 05:09:31 +02:00
parent f318329540
commit 9c155ec545
4 changed files with 49 additions and 7 deletions
+8
View File
@@ -4,6 +4,14 @@ layout: default
<h1>{{ page.name }}</h1>
<div class="soc">
<div class="content">
{%- if page.skus %}
<p>SKUs</p>
<ul>
{%- for sku in page.skus %}
<li>{{sku}}</li>
{%- endfor %}
</ul>
{%- endif %}
{{ content }}
</div>
+18 -2
View File
@@ -14,9 +14,25 @@ layout: home
<tbody>
{% for d in site.soc %}
<tr>
<td><a href="{{d.url | absolute_url}}">{{d.name}}</a></td>
<td><a href="{{d.url | absolute_url}}">{{d.name}}</a>
{%- if d.skus %}
<span class="tooltip">(*)<span class="tooltiptext">
{%- for sku in d.skus -%}
{{sku}}{% unless forloop.last %}, {% endunless %}
{%- endfor -%}
</span></span>
{%- endif -%}
</td>
{% include full_soc_status.liquid %}
<td><a href="{{d.url | absolute_url}}">{{d.name}}</a></td>
<td><a href="{{d.url | absolute_url}}">{{d.name}}</a>
{%- if d.skus %}
<span class="tooltip">(*)<span class="tooltiptext">
{%- for sku in d.skus -%}
{{sku}}{% unless forloop.last %}, {% endunless %}
{%- endfor -%}
</span></span>
{%- endif -%}
</td>
</tr>
{% endfor %}
</tbody>
+18 -2
View File
@@ -15,9 +15,25 @@ layout: home
<tbody>
{% for d in site.soc %}
<tr>
<td><a href="{{d.url | absolute_url}}">{{d.name}}</a></td>
<td><a href="{{d.url | absolute_url}}">{{d.name}}</a>
{%- if d.skus %}
<span class="tooltip">(*)<span class="tooltiptext">
{%- for sku in d.skus -%}
{{sku}}{% unless forloop.last %}, {% endunless %}
{%- endfor -%}
</span></span>
{%- endif -%}
</td>
{% include index_soc_status.liquid %}
<td><a href="{{d.url | absolute_url}}">{{d.name}}</a></td>
<td><a href="{{d.url | absolute_url}}">{{d.name}}</a>
{%- if d.skus %}
<span class="tooltip">(*)<span class="tooltiptext">
{%- for sku in d.skus -%}
{{sku}}{% unless forloop.last %}, {% endunless %}
{%- endfor -%}
</span></span>
{%- endif -%}
</td>
</tr>
{% endfor %}
</tbody>
+5 -3
View File
@@ -93,7 +93,7 @@ def generate_template(data, prefix, check_fn):
if 'items' in v:
yield from generate_template(v['items'], prefix + '-' + k, check_fn)
def handle_soc_pmic(data, kind, prefix):
def handle_soc_pmic(data, kind, prefix, is_soc):
has_nested = False
for (k, v) in data.items():
if 'items' in v:
@@ -136,6 +136,8 @@ def handle_soc_pmic(data, kind, prefix):
with open('_%s.template' % kind, 'w') as out:
out.write('---\n')
out.write('name: ???\n')
if is_soc:
out.write('skus: [??, ??]\n')
out.write('layout: %s\n' % kind)
out.write(': N/A\n'.join(sorted(generate_template(data, prefix, is_intop))))
out.write(': N/A\n')
@@ -143,9 +145,9 @@ def handle_soc_pmic(data, kind, prefix):
with open('soc.yaml', "r") as file:
data = load(file, Loader=Loader)
handle_soc_pmic(data, 'soc', 'status')
handle_soc_pmic(data, 'soc', 'status', True)
with open('pmic.yaml', "r") as file:
data = load(file, Loader=Loader)
handle_soc_pmic(data, 'pmic', 'pmic')
handle_soc_pmic(data, 'pmic', 'pmic', False)