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@xxxxxxxxx> --- drivers/staging/pi433/Documentation/pi433.txt | 4 +-- drivers/staging/pi433/rf69.c | 46 +++++++++++++-------------- drivers/staging/pi433/rf69.h | 2 +- drivers/staging/pi433/rf69_enum.h | 16 +++++----- 4 files changed, 34 insertions(+), 34 deletions(-) diff --git a/drivers/staging/pi433/Documentation/pi433.txt b/drivers/staging/pi433/Documentation/pi433.txt index f79e998112fd..c082878be0b1 100644 --- a/drivers/staging/pi433/Documentation/pi433.txt +++ b/drivers/staging/pi433/Documentation/pi433.txt @@ -110,9 +110,9 @@ rf params: ramp12 - amp ramps up in 12us ramp10 - amp ramps up in 10us tx_start_condition - fifoLevel - transmission starts, if fifo is filled to + fifo_level - transmission starts, if fifo is filled to threshold level - fifoNotEmpty - transmission starts, as soon as there is one + fifo_not_empty - transmission starts, as soon as there is one byte in internal fifo repetitions This gives the option, to send a telegram multiple times. Default: 1 diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index d777e31688ad..82b65832d39f 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -523,24 +523,24 @@ int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value) bool rf69_get_flag(struct spi_device *spi, enum flag flag) { switch (flag) { - case modeSwitchCompleted: return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_MODE_READY); - case readyToReceive: return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_RX_READY); - case readyToSend: return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_TX_READY); - case pllLocked: return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_PLL_LOCK); - case rssiExceededThreshold: return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_RSSI); - case timeout: return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_TIMEOUT); - case automode: return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_AUTOMODE); - case syncAddressMatch: return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_SYNC_ADDRESS_MATCH); - case fifoFull: return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_FULL); -/* case fifoNotEmpty: return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_NOT_EMPTY); */ - case fifoEmpty: return !(rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_NOT_EMPTY); - case fifoLevelBelowThreshold: return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_LEVEL); - case fifoOverrun: return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_OVERRUN); - case packetSent: return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_PACKET_SENT); - case payloadReady: return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_PAYLOAD_READY); - case crcOk: return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_CRC_OK); - case batteryLow: return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_LOW_BAT); - default: return false; + case modeSwitchCompleted: return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_MODE_READY); + case readyToReceive: return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_RX_READY); + case readyToSend: return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_TX_READY); + case pllLocked: return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_PLL_LOCK); + case rssiExceededThreshold: return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_RSSI); + case timeout: return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_TIMEOUT); + case automode: return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_AUTOMODE); + case syncAddressMatch: return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_SYNC_ADDRESS_MATCH); + case fifo_full: return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_FULL); +/* case fifo_not_empty: return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_NOT_EMPTY); */ + case fifo_empty: return !(rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_NOT_EMPTY); + case fifo_level_below_threshold: return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_LEVEL); + case fifo_overrun: return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_OVERRUN); + case packetSent: return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_PACKET_SENT); + case payloadReady: return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_PAYLOAD_READY); + case crcOk: return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_CRC_OK); + case batteryLow: return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_LOW_BAT); + default: return false; } } @@ -549,7 +549,7 @@ int rf69_reset_flag(struct spi_device *spi, enum flag flag) switch (flag) { case rssiExceededThreshold: return rf69_write_reg(spi, REG_IRQFLAGS1, MASK_IRQFLAGS1_RSSI); case syncAddressMatch: return rf69_write_reg(spi, REG_IRQFLAGS1, MASK_IRQFLAGS1_SYNC_ADDRESS_MATCH); - case fifoOverrun: return rf69_write_reg(spi, REG_IRQFLAGS2, MASK_IRQFLAGS2_FIFO_OVERRUN); + case fifo_overrun: return rf69_write_reg(spi, REG_IRQFLAGS2, MASK_IRQFLAGS2_FIFO_OVERRUN); default: dev_dbg(&spi->dev, "set: illegal input param"); return -EINVAL; @@ -607,9 +607,9 @@ int rf69_disable_sync(struct spi_device *spi) return rf69_clear_bit(spi, REG_SYNC_CONFIG, MASK_SYNC_CONFIG_SYNC_ON); } -int rf69_set_fifo_fill_condition(struct spi_device *spi, enum fifoFillCondition fifoFillCondition) +int rf69_set_fifo_fill_condition(struct spi_device *spi, enum fifo_fill_condition fifo_fill_condition) { - switch (fifoFillCondition) { + switch (fifo_fill_condition) { case always: return rf69_set_bit(spi, REG_SYNC_CONFIG, MASK_SYNC_CONFIG_FIFO_FILL_CONDITION); case afterSyncInterrupt: return rf69_clear_bit(spi, REG_SYNC_CONFIG, MASK_SYNC_CONFIG_FIFO_FILL_CONDITION); default: @@ -714,8 +714,8 @@ int rf69_set_broadcast_address(struct spi_device *spi, u8 broadcastAddress) int rf69_set_tx_start_condition(struct spi_device *spi, enum txStartCondition txStartCondition) { switch (txStartCondition) { - case fifoLevel: return rf69_clear_bit(spi, REG_FIFO_THRESH, MASK_FIFO_THRESH_TXSTART); - case fifoNotEmpty: return rf69_set_bit(spi, REG_FIFO_THRESH, MASK_FIFO_THRESH_TXSTART); + case fifo_level: return rf69_clear_bit(spi, REG_FIFO_THRESH, MASK_FIFO_THRESH_TXSTART); + case fifo_not_empty: return rf69_set_bit(spi, REG_FIFO_THRESH, MASK_FIFO_THRESH_TXSTART); default: dev_dbg(&spi->dev, "set: illegal input param"); return -EINVAL; diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h index 079acbd8a366..ac5d8d7940b2 100644 --- a/drivers/staging/pi433/rf69.h +++ b/drivers/staging/pi433/rf69.h @@ -57,7 +57,7 @@ int rf69_set_rssi_timeout(struct spi_device *spi, u8 timeout); int rf69_set_preamble_length(struct spi_device *spi, u16 preambleLength); int rf69_enable_sync(struct spi_device *spi); int rf69_disable_sync(struct spi_device *spi); -int rf69_set_fifo_fill_condition(struct spi_device *spi, enum fifoFillCondition fifoFillCondition); +int rf69_set_fifo_fill_condition(struct spi_device *spi, enum fifo_fill_condition fifo_fill_condition); int rf69_set_sync_size(struct spi_device *spi, u8 sync_size); int rf69_set_sync_tolerance(struct spi_device *spi, u8 syncTolerance); int rf69_set_sync_values(struct spi_device *spi, u8 syncValues[8]); diff --git a/drivers/staging/pi433/rf69_enum.h b/drivers/staging/pi433/rf69_enum.h index dd33126817b6..f4b0a7823c93 100644 --- a/drivers/staging/pi433/rf69_enum.h +++ b/drivers/staging/pi433/rf69_enum.h @@ -130,18 +130,18 @@ enum flag { timeout, automode, syncAddressMatch, - fifoFull, -// fifoNotEmpty, collision with next enum; replaced by following enum... - fifoEmpty, - fifoLevelBelowThreshold, - fifoOverrun, + fifo_full, +// fifo_not_empty, collision with next enum; replaced by following enum... + fifo_empty, + fifo_level_below_threshold, + fifo_overrun, packetSent, payloadReady, crcOk, batteryLow }; -enum fifoFillCondition { +enum fifo_fill_condition { afterSyncInterrupt, always }; @@ -152,8 +152,8 @@ enum packetFormat { }; enum txStartCondition { - fifoLevel, - fifoNotEmpty + fifo_level, + fifo_not_empty }; enum addressFiltering { -- 2.15.0 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel