From patchwork Sat Oct 22 06:23:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 17658 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id B8813C0DA4 for ; Sat, 22 Oct 2022 06:23:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 465FB62EE0; Sat, 22 Oct 2022 08:23:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1666419815; bh=eUZ5iClDjXH4FfCv+fF4bKigaJ2ZOi/J+wjubQODn7k=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=i+5iEyTibKDWC8zvKrNrBGX74tHs5fCF9JTycOq9qHr369+dSJ7YMZzKm3Vomyis3 Tr56a5KmOPf4CK5DrtGWY1HTeLt6zcx0ZKEk6EBKgtDHvXluZfmKbiLVpaXnaqAjXv +huxfSh6PI90sWb2Q+w1hJSmem7UW+bM9s1w6EcHFJ9d+Ce8k5DH5Tfo62LBKq3TUE OcAIsikeITSNftWCB3ZKYgTwPxllqhvwgPU7UG9O/t0bh/OXa8L9hpVtomc4fjpiKL MdnrlnUr3Gfmc9+exWehn9E1ZVnDFpZt+Qb/+2MhzNMSV5X4yDRE3bTAvYlLeGnICK ypEP4+2L/I9cw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A6D3362ECF for ; Sat, 22 Oct 2022 08:23:33 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Qrt91SA9"; dkim-atps=neutral Received: from pyrite.rasen.tech (h175-177-042-159.catv02.itscom.jp [175.177.42.159]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2DE2A106; Sat, 22 Oct 2022 08:23:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1666419813; bh=eUZ5iClDjXH4FfCv+fF4bKigaJ2ZOi/J+wjubQODn7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qrt91SA9SCAyTePXpIgmBneC/npMzF5c8t8/9Ycldk7HFnUOwWHpvo6HLMqwmVzWg kG+0sz9Skru053LoQTGNP5YzoVItSdS7Xc2SHOxDt1GqqI3R37s0pSQWzZLrYhrTLa hlHgpFX46oAN/sGPLrF+ozxZGwDQX4/GfivQ/2b4= To: libcamera-devel@lists.libcamera.org Date: Sat, 22 Oct 2022 15:23:06 +0900 Message-Id: <20221022062310.2545463-8-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221022062310.2545463-1-paul.elder@ideasonboard.com> References: <20221022062310.2545463-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 07/11] [WIP] utils: libtuning: parsers: Add yaml parser X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Paul Elder via libcamera-devel From: Paul Elder Reply-To: Paul Elder Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a parser to libtuning for parsing configuration files in yaml format. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- Obviously this doesn't work. Technically it's fine because the only user of the yaml parser at the moment works fine with no input configuration file. --- utils/tuning/libtuning/parsers/__init__.py | 1 + utils/tuning/libtuning/parsers/yaml_parser.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 utils/tuning/libtuning/parsers/yaml_parser.py diff --git a/utils/tuning/libtuning/parsers/__init__.py b/utils/tuning/libtuning/parsers/__init__.py index 9d20d2fc..022c1e5d 100644 --- a/utils/tuning/libtuning/parsers/__init__.py +++ b/utils/tuning/libtuning/parsers/__init__.py @@ -3,3 +3,4 @@ # Copyright (C) 2022, Paul Elder from libtuning.parsers.raspberrypi_parser import RaspberryPiParser +from libtuning.parsers.yaml_parser import YamlParser diff --git a/utils/tuning/libtuning/parsers/yaml_parser.py b/utils/tuning/libtuning/parsers/yaml_parser.py new file mode 100644 index 00000000..e2ce6e20 --- /dev/null +++ b/utils/tuning/libtuning/parsers/yaml_parser.py @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2022, Paul Elder + +from .parser import Parser + + +class YamlParser(Parser): + def __init__(self): + super().__init__() + + # todo Implement this (it's fine for now as we don't need a config for + # rkisp1 LSC) + def _parse(self, config_file, modules): + return {}, []