From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E14162C80 for ; Fri, 31 Dec 2021 00:19:39 +0000 (UTC) Received: by mail-pl1-f170.google.com with SMTP id u16so19217283plg.9 for ; Thu, 30 Dec 2021 16:19:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=NkqRNNqdWnGnE0W/FPoPkuJT53qZDL0ppvXkFpYOLH0=; b=Wyr+9BhjCsOXR3L78Hkb48nq/AiQO0hWGBvmvgeWkGmDfGbULdR67cAiqu5foOt0Y8 ZSqNuZQEJ8EyCjbJIuR/uK7I7X5qnXeqXgiKAqHUmJUH0+lZ0HP80YbkPgLZHHRHBQIJ 5uCTUvM+8poGE8Hsp3AHoKZhTNBdPmTftsFjeX0YfdNWp5xXVcV3Qo7loaCp5DJ+Jkg/ doztlJX7ZFKJMDv5suL+3LoA7CsoQ8Q9C2DB8BPGY7V2Z3OLobudOdikRSn9Fu4EVzzi uFtxwa6PzZZFFuXXK0ERZGVkKp6TOQUUqWkIu671PVoiD/q+C0Thylj5RKYi4T6PDG/8 ibPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=NkqRNNqdWnGnE0W/FPoPkuJT53qZDL0ppvXkFpYOLH0=; b=RP/aKIXxuIDXcJ+FZaQotbNl0Ln2j4ER1tEMOXYUQ6TWESX9FyThtw65mdyongcOvV iTl2j4mE52nJybaddEe5xfJQtU3o6/bc9FTjkkSBG4wXgh26N8KxtL3HIRTi55U1M04W /DI/0Gagw9AeZ4+jEmnltrZMenK21HQ9WROhwEWIYmOpLQ7p/78NbHAl1UMiu3oGXHA3 8Ai/m6tLqKvGRcy+2u6dF7rMgkS1dkwn8HX6Ot/sZIzEDKZir8pXZZP/BqkPq5zSnkKk hewIpq82bfHtDYIf+aVuLPWak4tH7Kz8YS1GY9pt+mU5U7Y7mT7C9gtsicICzqfx8Ml7 f8lQ== X-Gm-Message-State: AOAM533znCKfyBeSHknsCi4JGyEQHsd+n9Y5tX1oYoo1Pjp+UhFPHWoO EihAfkLY6C2Nlhr4lEHfwas= X-Google-Smtp-Source: ABdhPJw+ibIWzDJmRsxqV8rxNJpYCQa722YIWG/QIFpWLfxbcbZVrugjVI+wrejWywkT62zAraOt8g== X-Received: by 2002:a17:902:e28a:b0:149:907a:1b4e with SMTP id o10-20020a170902e28a00b00149907a1b4emr15380960plc.44.1640909979409; Thu, 30 Dec 2021 16:19:39 -0800 (PST) Received: from mail.google.com (122-58-164-114-fibre.sparkbb.co.nz. [122.58.164.114]) by smtp.gmail.com with ESMTPSA id ev3sm28843282pjb.48.2021.12.30.16.19.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Dec 2021 16:19:38 -0800 (PST) Date: Fri, 31 Dec 2021 13:19:33 +1300 From: Paulo Miguel Almeida To: gregkh@linuxfoundation.org, paulo.miguel.almeida.rodenas@gmail.com Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v3] staging: pi433: add docs to packet_format and tx_start_condition enum Message-ID: <20211231001933.GA6779@mail.google.com> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline While pi433 driver deals with the nuances of the different possible config combinations, it's hard (at first) to understand the rationale for some of the tx/rx-related source code unless you're fairly familiar with the rf69's inner workings. This patch documents the expected behaviour and limits of both packet_format and tx_start_condition enum fields. Signed-off-by: Paulo Miguel Almeida --- v3: fix formatting issue (Req Greg k-h bot) v2: remove comments pointed out during v1 review (Req Greg k-h) v1: https://lore.kernel.org/lkml/20211229094713.GA28795@localhost.localdomain/ --- drivers/staging/pi433/rf69_enum.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/staging/pi433/rf69_enum.h b/drivers/staging/pi433/rf69_enum.h index fbf56fcf5fe8..b33a33a85d3b 100644 --- a/drivers/staging/pi433/rf69_enum.h +++ b/drivers/staging/pi433/rf69_enum.h @@ -110,12 +110,24 @@ enum fifo_fill_condition { }; enum packet_format { + /* + * Used when the size of payload is fixed in advance. This mode of + * operation may be of interest to minimize RF overhead by 1 byte as + * no length byte field is required + */ packet_length_fix, + /* + * Used when the size of payload isn't known in advance. It requires the + * transmitter to send the length byte in each packet so the receiver + * would know how to operate properly + */ packet_length_var }; enum tx_start_condition { + /* the number of bytes in the FIFO exceeds FIFO_THRESHOLD */ fifo_level, + /* at least one byte in the FIFO */ fifo_not_empty }; -- 2.25.4