Commit 63688e61 authored by Sophie Matter's avatar Sophie Matter Committed by Greg Kroah-Hartman

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: default avatarSophie Matter <sophie.matter@web.de>
Signed-off-by: default avatarRico Schrage <rico.schrage@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2427d174
...@@ -826,11 +826,15 @@ pi433_write(struct file *filp, const char __user *buf, ...@@ -826,11 +826,15 @@ pi433_write(struct file *filp, const char __user *buf,
instance = filp->private_data; instance = filp->private_data;
device = instance->device; device = instance->device;
/* check, whether internal buffer (tx thread) is big enough for requested size */ /*
* check, whether internal buffer (tx thread) is big enough
* for requested size
*/
if (count > MAX_MSG_SIZE) if (count > MAX_MSG_SIZE)
return -EMSGSIZE; return -EMSGSIZE;
/* write the following sequence into fifo: /*
* write the following sequence into fifo:
* - tx_cfg * - tx_cfg
* - size of message * - size of message
* - message * - message
...@@ -1116,7 +1120,10 @@ static int pi433_probe(struct spi_device *spi) ...@@ -1116,7 +1120,10 @@ static int pi433_probe(struct spi_device *spi)
/* setup spi parameters */ /* setup spi parameters */
spi->mode = 0x00; spi->mode = 0x00;
spi->bits_per_word = 8; spi->bits_per_word = 8;
/* spi->max_speed_hz = 10000000; 1MHz already set by device tree overlay */ /*
* spi->max_speed_hz = 10000000;
* 1MHz already set by device tree overlay
*/
retval = spi_setup(spi); retval = spi_setup(spi);
if (retval) { if (retval) {
......
...@@ -43,7 +43,8 @@ enum option_on_off { ...@@ -43,7 +43,8 @@ enum option_on_off {
/* IOCTL structs and commands */ /* IOCTL structs and commands */
/** /**
* struct pi433_tx_config - describes the configuration of the radio module for sending * struct pi433_tx_config
* describes the configuration of the radio module for sending
* @frequency: * @frequency:
* @bit_rate: * @bit_rate:
* @modulation: * @modulation:
...@@ -90,7 +91,8 @@ struct pi433_tx_cfg { ...@@ -90,7 +91,8 @@ struct pi433_tx_cfg {
}; };
/** /**
* struct pi433_rx_config - describes the configuration of the radio module for sending * struct pi433_rx_config
* describes the configuration of the radio module for sending
* @frequency: * @frequency:
* @bit_rate: * @bit_rate:
* @modulation: * @modulation:
......
...@@ -128,9 +128,13 @@ int rf69_set_mode(struct spi_device *spi, enum mode mode) ...@@ -128,9 +128,13 @@ int rf69_set_mode(struct spi_device *spi, enum mode mode)
return rf69_read_mod_write(spi, REG_OPMODE, MASK_OPMODE_MODE, return rf69_read_mod_write(spi, REG_OPMODE, MASK_OPMODE_MODE,
mode_map[mode]); mode_map[mode]);
// we are using packet mode, so this check is not really needed /*
// but waiting for mode ready is necessary when going from sleep because the FIFO may not be immediately available from previous mode * we are using packet mode, so this check is not really needed
//while (_mode == RF69_MODE_SLEEP && (READ_REG(REG_IRQFLAGS1) & RF_IRQFLAGS1_MODEREADY) == 0x00); // Wait for ModeReady * but waiting for mode ready is necessary when going from sleep
* because the FIFO may not be immediately available from previous mode
* while (_mode == RF69_MODE_SLEEP && (READ_REG(REG_IRQFLAGS1) &
RF_IRQFLAGS1_MODEREADY) == 0x00); // Wait for ModeReady
*/
} }
int rf69_set_data_mode(struct spi_device *spi, u8 data_mode) int rf69_set_data_mode(struct spi_device *spi, u8 data_mode)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment