History log of /linux-master/drivers/staging/pi433/rf69.h
Revision Date Author Comments
# d48d2aba 27-Feb-2024 Shahar Avidar <ikobh7@gmail.com>

staging: pi433: Move FIFO_THRESHOLD define to source file

FIFO_THRESHOLD is only being used in pi433_if.c source files.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240227221204.534131-6-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a6e475e8 27-Feb-2024 Shahar Avidar <ikobh7@gmail.com>

staging: pi433: Remove the unused FREQUENCY define

FREQUENCY is not being used, delete its comment.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240227221204.534131-5-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f26b0500 27-Feb-2024 Shahar Avidar <ikobh7@gmail.com>

staging: pi433: Remove a duplicated F_OSC define

F_OSC is already defined & only used by rf69.c source file.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240227221204.534131-3-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2d19e698 25-Feb-2022 Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>

staging: pi433: remove rf69_get_flag function resolving enum conflict

The reason why rf69_get_flag() existed was to provide a high-level way
to obtain values out of 1 (of 2) flags registers using bit masking. The
idea was to map the possible flag values found in the data sheet like
shown in page 70 of the RFM69HCW datasheet.

However, due to the fact that enums values in C must be unique, there
was a naming conflict on 'fifo_not_empty' which is used by the
tx_start_condition enum. So the author decided to create a 'fifo_empty'
one which would negate the value that comes from the flag register as
the solution to that conflict (which is very confusing).

this patch removes rf69_get_flag function which subsequently solves the
enum redeclaration problem so kernel developers can follow the data
sheet more easily.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/Yhla4a1Clpguoo2h@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 4ef027d5 04-Feb-2022 Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>

staging: pi433: add debugfs interface

This adds debugfs interface that can be used for debugging possible
hardware/software issues.

It currently exposes the following debugfs entries for each SPI device
probed:

/sys/kernel/debug/pi433/<DEVICE>/regs
...

The 'regs' file contains all rf69 uC registers values that are useful
for troubleshooting misconfigurations between 2 devices. It contains one
register per line so it should be easy to use normal filtering tools to
find the registers of interest if needed.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/YfzeEHJcd+qvYGZ8@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6cc2d1a6 08-Jan-2022 Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>

staging: pi433: move get version func to where all other functions are

As a convention for the pi433 driver, all routines that deals with the
rf69 chip are defined in the rf69.c file. There was an exception to the
rule in which the uC version verification was being done directly
elsewhere. While at it, the Version Register hardcoded value was
replaced with a pre-existing constant in the driver.

This patch adds rf69_get_version function to rf69.c

Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/20220108212728.GA7784@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# be5418d4 08-Feb-2020 Nishad Kamdar <nishadkamdar@gmail.com>

staging: pi433: Use the correct style for SPDX License Identifier

This patch corrects the SPDX License Identifier style in
header files related to pi433 radio module drivers.
It assigns explicit block comment to the SPDX License Identifier.

Changes made by using a script provided by Joe Perches here:
https://lkml.org/lkml/2019/2/7/46.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Link: https://lore.kernel.org/r/20200208083621.GA3797@nishad
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 7e946370 13-Nov-2018 Michael Straube <straube.linux@gmail.com>

staging: pi433: remove GPL boiler plate text

The SPDX identifier is a legally binding shorthand,
which can be used instead of the full boiler plate text.

All source and header files have SPDX identifiers.
Remove the GPL boiler plate text to reduce file size.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e8b8fc8a 25-Jun-2018 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: cleanup comments in rf69.h

Fixes checkpatch warning:

WARNING: line over 80 characters

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ecfacacf 25-Jun-2018 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: add SPDX-License-Identifier tag

Use GPL-2.0+ based on the license text in each of the files.

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ad90697b 06-Apr-2018 Simon Sandström <simon@nikanor.nu>

staging: pi433: break long lines

Breaks long lines in rf69.h, fixing checkpatch.pl warnings:
"WARNING: line over 80 characters"

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e4928ac2 14-Mar-2018 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: fix CamelCase for lnaGain enum

Fixes checkpatch warning:

CHECK: Avoid CamelCase: <lnaGain>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 9d985d12 14-Mar-2018 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: fix CamelCase for DIONumber variable

Fixes checkpatch warning:

CHECK: Avoid CamelCase: <DIONumber>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 31e045ab 14-Mar-2018 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: fix CamelCase for bitRate variables

Fixes checkpatch warnings:

CHECK: Avoid CamelCase: <bitRate>
CHECK: Avoid CamelCase: <bitRate_min>
CHECK: Avoid CamelCase: <bitRate_reg>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 4e3290db 14-Mar-2018 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: fix CamelCase for preambleLength variable

Fixes checkpatch warning:

CHECK: Avoid CamelCase: <preambleLength>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a9f83a65 05-Mar-2018 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: fix CamelCase for paRamp enum

Fixes checkpatch warning:

CHECK: Avoid CamelCase: <paRamp>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d9a74d5f 05-Mar-2018 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: fix CamelCase for Address variables

Fixes checkpatch warnings:

CHECK: Avoid CamelCase: <nodeAddress>
CHECK: Avoid CamelCase: <broadcastAddress>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c436ef3b 05-Mar-2018 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: fix CamelCase for packetFormat enum

Fixes checkpatch warnings:

CHECK: Avoid CamelCase: <packetFormat>
CHECK: Avoid CamelCase: <packetLengthFix>
CHECK: Avoid CamelCase: <packetLengthVar>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e69a0500 20-Feb-2018 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: fix CamelCase for addressFiltering

Fixes checkpatch warning:

CHECK: Avoid CamelCase: <addressFiltering>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b52a5b79 20-Feb-2018 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: fix CamelCase for thresholdDecrement

Fixes checkpatch warning:

CHECK: Avoid CamelCase: <thresholdDecrement>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6252016c 20-Feb-2018 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: fix CamelCase for txStartCondition

Fixes checkpatch warning:

CHECK: Avoid CamelCase: <txStartCondition>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 370d7ce6 27-Jan-2018 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: fix CamelCase for antennaImpedance

Fixes checkpatch warnings:

CHECK: Avoid CamelCase: <antennaImpedance>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 842e05d5 27-Jan-2018 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: fix CamelCase for powerLevel

Fixes checkpatch warnings:

CHECK: Avoid CamelCase: <powerLevel>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5ca565ad 27-Jan-2018 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: fix CamelCase for syncValues

Fixes checkpatch warnings:

CHECK: Avoid CamelCase: <syncValues>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 0b9acf7d 25-Dec-2017 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: fix CamelCase for payload identifiers

Fixes checkpatch warnings:

CHECK: Avoid CamelCase: <payloadLength>
CHECK: Avoid CamelCase: <payloadReady>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 7ebee24b 21-Dec-2017 Marcin Ciupak <marcin.s.ciupak@gmail.com>

staging: pi433: remove unused rf69_reset_flag function

Function rf69_reset_flag is unused and should be removed.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 109fb18f 21-Dec-2017 Marcin Ciupak <marcin.s.ciupak@gmail.com>

staging: pi433: remove unused rf69_set_sync_tolerance function

Function rf69_set_sync_tolerance is unused and should be removed.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f235bcfe 20-Dec-2017 Marcin Ciupak <marcin.s.ciupak@gmail.com>

staging: pi433: remove unused rf69_set_dc_cut_off_frequency* functions

The following functions:
* rf69_set_dc_cut_off_frequency,
* rf69_set_dc_cut_off_frequency_intern,
* rf69_set_dc_cut_off_frequency_during_afc
are unused and should be removed along with type enum dcc_percent which
was used only by these functions.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 9924a833 20-Dec-2017 Marcin Ciupak <marcin.s.ciupak@gmail.com>

staging: pi433: remove unused rf69_set_ook_threshold_type function

Function rf69_set_ook_threshold_type is unused and should be removed
along with type enum thresholdType which was used only by that function.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 418e175a 20-Dec-2017 Marcin Ciupak <marcin.s.ciupak@gmail.com>

staging: pi433: remove unused rf69_set_ook_threshold_step function

Function rf69_set_ook_threshold_step is unused and should be removed
along with type enum thresholdStep which was used only by that function.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b44badd3 20-Dec-2017 Marcin Ciupak <marcin.s.ciupak@gmail.com>

staging: pi433: remove unused rf69_set_rx_start_timeout function

Function rf69_set_rx_start_timeout is unused and should be removed.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 68701fb1 20-Dec-2017 Marcin Ciupak <marcin.s.ciupak@gmail.com>

staging: pi433: remove unused rf69_set_rssi_timeout function

Function rf69_set_rssi_timeout is unused and should be removed.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 68a87a9a 20-Dec-2017 Marcin Ciupak <marcin.s.ciupak@gmail.com>

staging: pi433: remove unused rf69_get_payload_length function

Function rf69_get_payload_length is unused and should be removed.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# db1bad52 20-Dec-2017 Marcin Ciupak <marcin.s.ciupak@gmail.com>

staging: pi433: make local functions static

Following functions:
* rf69_get_modulation
* rf69_read_reg
* rf69_write_reg
are used locally only and should be declared as static

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# acf71f8d 19-Dec-2017 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: fix CamelCase for fifo variables

Fixes checkpatch warnings:

CHECK: Avoid CamelCase: <fifoEmpty>
CHECK: Avoid CamelCase: <fifoFillCondition>
CHECK: Avoid CamelCase: <fifoFull>
CHECK: Avoid CamelCase: <fifoLevel>
CHECK: Avoid CamelCase: <fifoLevelBelowThreshold>
CHECK: Avoid CamelCase: <fifoNotEmpty>
CHECK: Avoid CamelCase: <fifoOverrun>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f772fa12 19-Dec-2017 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: remove unused function

As it turns out rf69_get_lna_gain is not used at all.

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 82a708e7 13-Dec-2017 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: remove multiple blank lines

Fixes checkpatch warning for multiple blank lines in source.

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6106cfbd 13-Dec-2017 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: fix CamelCase for dccPercent variables

Fixes checkpatch warning:

CHECK: Avoid CamelCase: <dccPercent>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 7b15049c 10-Dec-2017 Valentin Vidic <Valentin.Vidic@CARNet.hr>

staging: pi433: remove space inside parenthesis

Fixes checkpatch error for prohibited spaces.

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c5a5bd6b 06-Dec-2017 Simon Sandström <simon@nikanor.nu>

staging: pi433: Combine all rf69_set_amplifier_x()

Replaces the functions rf69_set_amplifier_1, _2, _3 with two
functions: rf69_enable_amplifier(dev, amp_mask) and
rf69_disable_amplifier(dev, amp_mask).

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b92025a8 06-Dec-2017 Simon Sandström <simon@nikanor.nu>

staging: pi433: Remove enum data_mode

Call rf69_set_data_mode with DATAMODUL_MODE value directly.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 966debe0 06-Dec-2017 Simon Sandström <simon@nikanor.nu>

staging: pi433: Split rf69_set_sync_enabled into two functions

Splits rf69_set_sync_enabled(dev, enabled) into
rf69_enable_sync(dev) and rf69_disable_sync(dev).

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 39252a4b 06-Dec-2017 Simon Sandström <simon@nikanor.nu>

staging: pi433: Split rf69_set_crc_enabled into two functions

Splits rf69_set_crc_enabled(dev, enabled) into
rf69_enable_crc(dev) and rf69_disable_crc(dev).

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 494b11b6 05-Dec-2017 Simon Sandström <simon@nikanor.nu>

staging: pi433: Rename enum modShaping in rf69_enum.h

Renames enum modShaping and its values to get rid of checkpatch.pl
warnings: "Avoid CamelCase: <modShaping>".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d423c809 05-Dec-2017 Simon Sandström <simon@nikanor.nu>

staging: pi433: Rename enum optionOnOff in rf69_enum.h

Renames the enum optionOnOff and its values optionOn, optionOff to enum
option_on_off and OPTION_ON, OPTION_OFF. Fixes checkpatch.pl warnings:
"Avoid CamelCase: <optionOnOff>, <optionOn>, <optionOff>".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 52056bd7 31-Aug-2017 Derek Robson <robsonde@gmail.com>

Staging: Pi433: style fix - tabs and spaces

Fixed checkpatch errors, spaces before tabs.
Found using checkpatch.

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 35acd78f 08-Aug-2017 Marcin Ciupak <marcin.s.ciupak@gmail.com>

staging: pi433: style fix - space after asterisk

This patch is intended to fix coding style issues in order to comply
with kernel coding style guide as requested by TODO file.

It fixes the following checkpatch.pl error:

ERROR: "foo * bar" should be "foo *bar"

Note:
"WARNING: line over 80 characters" remains valid here and could be fixed
by another patch.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Reviewed-by: Marcus Wolf <linux@wolf-entwicklungen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 874bcba6 16-Jul-2017 Marcus Wolf <linux@Wolf-Entwicklungen.de>

staging: pi433: New driver

Added a driver for the pi433 radio module
(see https://www.pi433.de/en.html for details).

Signed-off-by: Marcus Wolf <linux@Wolf-Entwicklungen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>