Commit Graph

83 Commits

Author SHA1 Message Date
Michael Straube 7e9463709c 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>
2018-11-20 10:53:54 +01:00
Dan Carpenter d947dddf1c staging: pi433: eliminate a temporary variable
We can just get rid of the "spi_address".  It's not clear what the
"address" part of the name means, and the type should have been a u8.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 12:07:56 +02:00
Sophie Matter 75971225d8 staging: pi433: Make only one statement per line
Lines containing multiple statements were broken into multiple
lines, increasing readability and complying with the coding standard.
This also fixes several checkpatch.pl errors complaining about
the lines being too long.

Signed-off-by: Sophie Matter <sophie.matter@web.de>
Signed-off-by: Rico Schrage <rico.schrage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11 13:12:34 +02:00
Sophie Matter 3689281604 staging: pi433: Use preferred commenting style
For multi-line comments, the preferred commenting style from the
coding style Documentation was applied to the comments, meaning
almost blank lines at the beginning and end of the comment.
One changed comment includes a line over 80 characters, causing
checkpatch.pl to complain, however breaking this line would not
make much sense, so it is kept like it is.

Signed-off-by: Sophie Matter <sophie.matter@web.de>
Signed-off-by: Rico Schrage <rico.schrage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11 13:12:34 +02:00
Sophie Matter 63688e61d5 staging: pi433: Comply with 80 character column limit
Lines have been split where it makes sense to shorten them in order
to comply with the coding standards and fix checkpatch.pl warnings.
There are still lines left that are too long, however breaking
those would impair readability.

Changes in v2:
 - now working on staging-next branch of the staging tree
 - the changes to the defines previously made are deleted
   due to readability

Signed-off-by: Sophie Matter <sophie.matter@web.de>
Signed-off-by: Rico Schrage <rico.schrage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11 13:12:33 +02:00
Valentin Vidic ecfacacf3f 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>
2018-06-28 22:00:13 +09:00
Valentin Vidic 8679339524 staging: pi433: replace simple switch statements
Use const array to map switch cases to resulting values.

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Reviewed-by: Marcus Wolf <Marcus.Wolf@Wolf-Entwicklungen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28 22:00:13 +09:00
Simon Sandström d7b09e6521 staging: pi433: break long lines in rf69.c
Breaks long lines in rf69.c, 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-04-23 15:41:05 +02:00
Valentin Vidic bcb4f0d75b staging: pi433: fix CamelCase for dagc enum
Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <normalMode>
  CHECK: Avoid CamelCase: <improve4LowModulationIndex>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-19 19:46:51 +01:00
Valentin Vidic e4928ac29b 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>
2018-03-19 19:46:51 +01:00
Valentin Vidic 9d985d127a 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>
2018-03-19 19:46:51 +01:00
Valentin Vidic 31e045ab54 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>
2018-03-19 19:46:51 +01:00
Valentin Vidic 803058902b staging: pi433: fix CamelCase for syncSize variable
Fixes checkpatch warning:

  CHECK: Avoid CamelCase: <syncSize>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-19 19:46:51 +01:00
Valentin Vidic 4e3290dbf3 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>
2018-03-19 19:46:51 +01:00
Valentin Vidic a9f83a65f1 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>
2018-03-06 04:22:17 -08:00
Valentin Vidic d9a74d5f1e 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>
2018-03-06 04:22:17 -08:00
Valentin Vidic cd9d5291bb staging: pi433: fix CamelCase for address_filtering enum
Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <filteringOff>
  CHECK: Avoid CamelCase: <nodeAddress>
  CHECK: Avoid CamelCase: <nodeOrBroadcastAddress>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06 04:22:17 -08:00
Valentin Vidic 53e0b83d01 staging: pi433: fix CamelCase for afterSyncInterrupt
Fixes checkpatch warning:

  CHECK: Avoid CamelCase: <afterSyncInterrupt>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06 04:22:17 -08:00
Valentin Vidic 1cd41fc3f3 staging: pi433: fix CamelCase for flag enum
Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <modeSwitchCompleted>
  CHECK: Avoid CamelCase: <readyToReceive>
  CHECK: Avoid CamelCase: <readyToSend>
  CHECK: Avoid CamelCase: <pllLocked>
  CHECK: Avoid CamelCase: <rssiExceededThreshold>
  CHECK: Avoid CamelCase: <syncAddressMatch>
  CHECK: Avoid CamelCase: <packetSent>
  CHECK: Avoid CamelCase: <crcOk>
  CHECK: Avoid CamelCase: <batteryLow>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06 04:22:16 -08:00
Valentin Vidic c436ef3b9a 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>
2018-03-06 04:22:16 -08:00
Valentin Vidic e69a0500f2 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>
2018-02-22 14:53:05 +01:00
Valentin Vidic b52a5b7936 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>
2018-02-22 14:53:05 +01:00
Valentin Vidic 6252016c86 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>
2018-02-22 14:53:05 +01:00
Valentin Vidic e6dd870a00 staging: pi433: fix CamelCase for regValue
Local variable storing the new value for dio register
so replace with dio_value.  Update regaddr to dio_addr
to match.

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <regValue>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16 15:35:04 +01:00
Valentin Vidic f53c5d92b5 staging: pi433: fix CamelCase for newValue
Local variable storing the new value for bandwidth register
so replace with bandwidth.

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <newValue>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16 15:35:04 +01:00
Valentin Vidic e64dbd5cd0 staging: pi433: fix CamelCase for currentValue
Local variable storing the value for modulation register so replace
with modulation_reg.

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <currentValue>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16 15:35:04 +01:00
Valentin Vidic 0b89706583 staging: pi433: fix CamelCase for Ohm identifiers
Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <fiftyOhm>
  CHECK: Avoid CamelCase: <twohundretOhm>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16 15:35:04 +01:00
Valentin Vidic 370d7ce625 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>
2018-02-16 15:35:04 +01:00
Valentin Vidic 842e05d52d 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>
2018-02-16 15:35:04 +01:00
Valentin Vidic 5ca565adaf 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>
2018-02-16 15:35:04 +01:00
Michael Panzlaff a66a4e8e01 staging: pi433: Cleanup codestyle, indent statements after case labels
This patch changes the indentation of the statements after case labels.
The linux coding guidelines do not explicitly mentiond this but pretty
much all existing code doesn't put any statements into the same line of
their belonging case labels. Therefore this adapts to the more usual style.

Please note that there is still a lot of > 80 character lines which will
cause checkpatch warnings. This patch does not intent to fix this
already existing issue.

Signed-off-by: Michael Panzlaff <michael.panzlaff@fau.de>
Signed-off-by: Tillmann Zipperer <tillmann.zipperer@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-10 19:29:34 +01:00
Valentin Vidic 0b9acf7ddb 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>
2018-01-08 16:32:27 +01:00
Valentin Vidic b167a524d2 staging: pi433: fix CamelCase for maxMinus variables
Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <maxMinus12>
  CHECK: Avoid CamelCase: <maxMinus24>
  CHECK: Avoid CamelCase: <maxMinus36>
  CHECK: Avoid CamelCase: <maxMinus48>
  CHECK: Avoid CamelCase: <maxMinus6>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08 16:32:23 +01:00
Marcin Ciupak 7ebee24ba1 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>
2018-01-08 16:30:47 +01:00
Marcin Ciupak 109fb18fcc 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>
2018-01-08 16:30:47 +01:00
Marcin Ciupak f235bcfe6a 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>
2017-12-21 18:29:59 +01:00
Marcin Ciupak 9924a8339f 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>
2017-12-21 18:29:59 +01:00
Marcin Ciupak 418e175a99 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>
2017-12-21 18:29:59 +01:00
Marcin Ciupak b44badd30b 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>
2017-12-21 18:29:57 +01:00
Marcin Ciupak 68701fb146 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>
2017-12-21 18:29:57 +01:00
Marcin Ciupak 68a87a9a23 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>
2017-12-21 18:29:40 +01:00
Marcin Ciupak db1bad5235 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>
2017-12-21 18:29:40 +01:00
Valentin Vidic acf71f8dfc 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>
2017-12-21 18:17:05 +01:00
Valentin Vidic f772fa121d 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>
2017-12-19 16:05:54 +01:00
Valentin Vidic 6106cfbd05 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>
2017-12-19 15:14:58 +01:00
Greg Kroah-Hartman 7f9d04bc56 Merge 4.15-rc4 into staging-next
We want the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-18 09:12:51 +01:00
Kari Argillander 9a38450ac3 staging: pi433: Fix disordered switch case
Case: SHAPING_0_5 is writing DATAMODUL_MODLATION_SHAPE_0_3 value and
vice versa

Signed-off-by: Kari Argillander <kari.argillander@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13 13:00:31 +01:00
Valentin Vidic 2f58f293c2 staging: pi433: remove spaces before tabs
Fixes checkpatch warning for hidden spaces before tabs.

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13 12:58:04 +01:00
Valentin Vidic 7b15049c4d 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>
2017-12-13 12:56:29 +01:00
Simon Sandström b01c3553a9 staging: pi433: Remove unnecessary #ifdef DEBUG around dev_dbg
dev_dbg() already depends on DEBUG.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13 12:53:56 +01:00