Commit b92025a8 authored by Simon Sandström's avatar Simon Sandström Committed by Greg Kroah-Hartman

staging: pi433: Remove enum data_mode

Call rf69_set_data_mode with DATAMODUL_MODE value directly.
Signed-off-by: default avatarSimon Sandström <simon@nikanor.nu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 966debe0
......@@ -1125,7 +1125,7 @@ static int pi433_probe(struct spi_device *spi)
/* setup the radio module */
SET_CHECKED(rf69_set_mode (spi, standby));
SET_CHECKED(rf69_set_data_mode (spi, packet));
SET_CHECKED(rf69_set_data_mode (spi, DATAMODUL_MODE_PACKET));
SET_CHECKED(rf69_set_amplifier_0 (spi, OPTION_ON));
SET_CHECKED(rf69_set_amplifier_1 (spi, OPTION_OFF));
SET_CHECKED(rf69_set_amplifier_2 (spi, OPTION_OFF));
......
......@@ -85,20 +85,9 @@ int rf69_set_mode(struct spi_device *spi, enum mode mode)
}
int rf69_set_data_mode(struct spi_device *spi, enum dataMode dataMode)
int rf69_set_data_mode(struct spi_device *spi, u8 data_mode)
{
#ifdef DEBUG
dev_dbg(&spi->dev, "set: data mode");
#endif
switch (dataMode) {
case packet: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODE, DATAMODUL_MODE_PACKET);
case continuous: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODE, DATAMODUL_MODE_CONTINUOUS);
case continuousNoSync: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODE, DATAMODUL_MODE_CONTINUOUS_NOSYNC);
default:
dev_dbg(&spi->dev, "set: illegal input param");
return -EINVAL;
}
return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODE, data_mode);
}
int rf69_set_modulation(struct spi_device *spi, enum modulation modulation)
......
......@@ -26,7 +26,7 @@
#define FIFO_THRESHOLD 15 /* in byte */
int rf69_set_mode(struct spi_device *spi, enum mode mode);
int rf69_set_data_mode(struct spi_device *spi, enum dataMode dataMode);
int rf69_set_data_mode(struct spi_device *spi, u8 data_mode);
int rf69_set_modulation(struct spi_device *spi, enum modulation modulation);
enum modulation rf69_get_modulation(struct spi_device *spi);
int rf69_set_modulation_shaping(struct spi_device *spi, enum mod_shaping mod_shaping);
......
......@@ -31,12 +31,6 @@ enum mode {
receive
};
enum dataMode {
packet,
continuous,
continuousNoSync
};
enum modulation {
OOK,
FSK
......
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