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

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: default avatarSimon Sandström <simon@nikanor.nu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d7b8943c
...@@ -260,7 +260,7 @@ rf69_set_tx_cfg(struct pi433_device *dev, struct pi433_tx_cfg *tx_cfg) ...@@ -260,7 +260,7 @@ rf69_set_tx_cfg(struct pi433_device *dev, struct pi433_tx_cfg *tx_cfg)
SET_CHECKED(rf69_set_modulation (dev->spi, tx_cfg->modulation)); SET_CHECKED(rf69_set_modulation (dev->spi, tx_cfg->modulation));
SET_CHECKED(rf69_set_deviation (dev->spi, tx_cfg->dev_frequency)); SET_CHECKED(rf69_set_deviation (dev->spi, tx_cfg->dev_frequency));
SET_CHECKED(rf69_set_pa_ramp (dev->spi, tx_cfg->pa_ramp)); SET_CHECKED(rf69_set_pa_ramp (dev->spi, tx_cfg->pa_ramp));
SET_CHECKED(rf69_set_modulation_shaping(dev->spi, tx_cfg->modShaping)); SET_CHECKED(rf69_set_modulation_shaping(dev->spi, tx_cfg->mod_shaping));
SET_CHECKED(rf69_set_tx_start_condition(dev->spi, tx_cfg->tx_start_condition)); SET_CHECKED(rf69_set_tx_start_condition(dev->spi, tx_cfg->tx_start_condition));
/* packet format enable */ /* packet format enable */
......
...@@ -63,7 +63,7 @@ struct pi433_tx_cfg { ...@@ -63,7 +63,7 @@ struct pi433_tx_cfg {
__u16 bit_rate; __u16 bit_rate;
__u32 dev_frequency; __u32 dev_frequency;
enum modulation modulation; enum modulation modulation;
enum modShaping modShaping; enum mod_shaping mod_shaping;
enum paRamp pa_ramp; enum paRamp pa_ramp;
......
...@@ -133,27 +133,28 @@ enum modulation rf69_get_modulation(struct spi_device *spi) ...@@ -133,27 +133,28 @@ enum modulation rf69_get_modulation(struct spi_device *spi)
} }
} }
int rf69_set_modulation_shaping(struct spi_device *spi, enum modShaping modShaping) int rf69_set_modulation_shaping(struct spi_device *spi,
enum mod_shaping mod_shaping)
{ {
#ifdef DEBUG #ifdef DEBUG
dev_dbg(&spi->dev, "set: mod shaping"); dev_dbg(&spi->dev, "set: mod shaping");
#endif #endif
if (rf69_get_modulation(spi) == FSK) { if (rf69_get_modulation(spi) == FSK) {
switch (modShaping) { switch (mod_shaping) {
case shapingOff: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_NONE); case SHAPING_OFF: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_NONE);
case shaping1_0: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_1_0); case SHAPING_1_0: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_1_0);
case shaping0_5: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_0_3); case SHAPING_0_5: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_0_3);
case shaping0_3: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_0_5); case SHAPING_0_3: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_0_5);
default: default:
dev_dbg(&spi->dev, "set: illegal input param"); dev_dbg(&spi->dev, "set: illegal input param");
return -EINVAL; return -EINVAL;
} }
} else { } else {
switch (modShaping) { switch (mod_shaping) {
case shapingOff: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_NONE); case SHAPING_OFF: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_NONE);
case shapingBR: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_BR); case SHAPING_BR: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_BR);
case shaping2BR: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_2BR); case SHAPING_2BR: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_2BR);
default: default:
dev_dbg(&spi->dev, "set: illegal input param"); dev_dbg(&spi->dev, "set: illegal input param");
return -EINVAL; return -EINVAL;
......
...@@ -29,7 +29,7 @@ int rf69_set_mode(struct spi_device *spi, enum mode mode); ...@@ -29,7 +29,7 @@ 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, enum dataMode dataMode);
int rf69_set_modulation(struct spi_device *spi, enum modulation modulation); int rf69_set_modulation(struct spi_device *spi, enum modulation modulation);
enum modulation rf69_get_modulation(struct spi_device *spi); enum modulation rf69_get_modulation(struct spi_device *spi);
int rf69_set_modulation_shaping(struct spi_device *spi, enum modShaping modShaping); int rf69_set_modulation_shaping(struct spi_device *spi, enum mod_shaping mod_shaping);
int rf69_set_bit_rate(struct spi_device *spi, u16 bitRate); int rf69_set_bit_rate(struct spi_device *spi, u16 bitRate);
int rf69_set_deviation(struct spi_device *spi, u32 deviation); int rf69_set_deviation(struct spi_device *spi, u32 deviation);
int rf69_set_frequency(struct spi_device *spi, u32 frequency); int rf69_set_frequency(struct spi_device *spi, u32 frequency);
......
...@@ -42,13 +42,13 @@ enum modulation { ...@@ -42,13 +42,13 @@ enum modulation {
FSK FSK
}; };
enum modShaping { enum mod_shaping {
shapingOff, SHAPING_OFF,
shaping1_0, SHAPING_1_0,
shaping0_5, SHAPING_0_5,
shaping0_3, SHAPING_0_3,
shapingBR, SHAPING_BR,
shaping2BR SHAPING_2BR
}; };
enum paRamp { enum paRamp {
......
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