summaryrefslogtreecommitdiff
path: root/drivers/staging/pi433/rf69.h
AgeCommit message (Collapse)AuthorFilesLines
2024-05-04staging: pi433: Remove unused driverPhilipp Hortmann1-66/+0
Marcus started a project in 2016 to bring the pi433 alive. One project was funded successfully but the second not. So only a few pi433 got sold to early adaptors during this time that ended late 2017. There is a simple user space program available for a demo with the pi433 but that does not use this driver. The driver is unused since 2018. No description or user space application to use it can be found. To bring it alive the device tree needs to be adjusted manually. The last patch reviewed by Marcus was in June 2018, last patch tested was in July 2017. No response since 27. March 2024 regarding the removal of the driver. Remove unused driver because of the above named reasons. Link: https://lore.kernel.org/linux-staging/c4c5ab38-8c67-4c21-86bc-f4f3c06be358@gmail.com/ Link: https://www.kickstarter.com/projects/1292669042/pi433-a-radio-module-funkmodul-for-raspberry-pi Link: https://www.kickstarter.com/projects/1292669042/smarthome-pi/comments Link: https://www.pi433.de/en.html Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Cc: Marcus Wolf <marcus.wolf@wolf-entwicklungen.de> Link: https://lore.kernel.org/r/20240421195717.GA10943@matrix-ESPRIMO-P710 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-05staging: pi433: Move FIFO_THRESHOLD define to source fileShahar Avidar1-1/+0
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>
2024-03-05staging: pi433: Remove the unused FREQUENCY defineShahar Avidar1-2/+0
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>
2024-03-05staging: pi433: Remove a duplicated F_OSC defineShahar Avidar1-1/+0
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>
2022-03-02staging: pi433: remove rf69_get_flag function resolving enum conflictPaulo Miguel Almeida1-1/+0
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>
2022-02-04staging: pi433: add debugfs interfacePaulo Miguel Almeida1-0/+1
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>
2022-01-25staging: pi433: move get version func to where all other functions arePaulo Miguel Almeida1-0/+1
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>
2020-02-10staging: pi433: Use the correct style for SPDX License IdentifierNishad Kamdar1-2/+2
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>
2018-11-20staging: pi433: remove GPL boiler plate textMichael Straube1-10/+0
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>
2018-06-28staging: pi433: cleanup comments in rf69.hValentin Vidic1-4/+5
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>
2018-06-28staging: pi433: add SPDX-License-Identifier tagValentin Vidic1-1/+2
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>
2018-04-23staging: pi433: break long linesSimon Sandström1-9/+19
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>
2018-03-19staging: pi433: fix CamelCase for lnaGain enumValentin Vidic1-1/+1
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>
2018-03-19staging: pi433: fix CamelCase for DIONumber variableValentin Vidic1-1/+1
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>
2018-03-19staging: pi433: fix CamelCase for bitRate variablesValentin Vidic1-1/+1
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>
2018-03-19staging: pi433: fix CamelCase for preambleLength variableValentin Vidic1-1/+1
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>
2018-03-06staging: pi433: fix CamelCase for paRamp enumValentin Vidic1-1/+1
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>
2018-03-06staging: pi433: fix CamelCase for Address variablesValentin Vidic1-2/+2
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>
2018-03-06staging: pi433: fix CamelCase for packetFormat enumValentin Vidic1-1/+1
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>
2018-02-22staging: pi433: fix CamelCase for addressFilteringValentin Vidic1-1/+1
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>
2018-02-22staging: pi433: fix CamelCase for thresholdDecrementValentin Vidic1-1/+1
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>
2018-02-22staging: pi433: fix CamelCase for txStartConditionValentin Vidic1-1/+1
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>
2018-02-16staging: pi433: fix CamelCase for antennaImpedanceValentin Vidic1-1/+1
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>
2018-02-16staging: pi433: fix CamelCase for powerLevelValentin Vidic1-1/+1
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>
2018-02-16staging: pi433: fix CamelCase for syncValuesValentin Vidic1-1/+1
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>
2018-01-08staging: pi433: fix CamelCase for payload identifiersValentin Vidic1-1/+1
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>
2018-01-08staging: pi433: remove unused rf69_reset_flag functionMarcin Ciupak1-1/+0
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>
2018-01-08staging: pi433: remove unused rf69_set_sync_tolerance functionMarcin Ciupak1-1/+0
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>
2017-12-21staging: pi433: remove unused rf69_set_dc_cut_off_frequency* functionsMarcin Ciupak1-3/+0
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>
2017-12-21staging: pi433: remove unused rf69_set_ook_threshold_type functionMarcin Ciupak1-1/+0
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>
2017-12-21staging: pi433: remove unused rf69_set_ook_threshold_step functionMarcin Ciupak1-1/+0
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>
2017-12-21staging: pi433: remove unused rf69_set_rx_start_timeout functionMarcin Ciupak1-1/+0
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>
2017-12-21staging: pi433: remove unused rf69_set_rssi_timeout functionMarcin Ciupak1-1/+0
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>
2017-12-21staging: pi433: remove unused rf69_get_payload_length functionMarcin Ciupak1-1/+0
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>
2017-12-21staging: pi433: make local functions staticMarcin Ciupak1-3/+0
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>
2017-12-21staging: pi433: fix CamelCase for fifo variablesValentin Vidic1-1/+1
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>
2017-12-19staging: pi433: remove unused functionValentin Vidic1-1/+0
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>
2017-12-19staging: pi433: remove multiple blank linesValentin Vidic1-2/+0
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>
2017-12-19staging: pi433: fix CamelCase for dccPercent variablesValentin Vidic1-3/+3
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>
2017-12-13staging: pi433: remove space inside parenthesisValentin Vidic1-2/+2
Fixes checkpatch error for prohibited spaces. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-07staging: pi433: Combine all rf69_set_amplifier_x()Simon Sandström1-6/+2
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>
2017-12-07staging: pi433: Remove enum data_modeSimon Sandström1-1/+1
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>
2017-12-07staging: pi433: Split rf69_set_sync_enabled into two functionsSimon Sandström1-2/+2
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>
2017-12-07staging: pi433: Split rf69_set_crc_enabled into two functionsSimon Sandström1-2/+2
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>
2017-12-06staging: pi433: Rename enum modShaping in rf69_enum.hSimon Sandström1-1/+1
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>
2017-12-06staging: pi433: Rename enum optionOnOff in rf69_enum.hSimon Sandström1-5/+10
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>
2017-08-31Staging: Pi433: style fix - tabs and spacesDerek Robson1-3/+3
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>
2017-08-15staging: pi433: style fix - space after asteriskMarcin Ciupak1-1/+1
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>
2017-07-16staging: pi433: New driverMarcus Wolf1-0/+82
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>