Commit 1cd41fc3 authored by Valentin Vidic's avatar Valentin Vidic Committed by Greg Kroah-Hartman

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: default avatarValentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c436ef3b
...@@ -443,7 +443,7 @@ pi433_receive(void *data) ...@@ -443,7 +443,7 @@ pi433_receive(void *data)
return retval; return retval;
/* now check RSSI, if low wait for getting high (RSSI interrupt) */ /* now check RSSI, if low wait for getting high (RSSI interrupt) */
while (!rf69_get_flag(dev->spi, rssiExceededThreshold)) { while (!rf69_get_flag(dev->spi, rssi_exceeded_threshold)) {
/* allow tx to interrupt us while waiting for high RSSI */ /* allow tx to interrupt us while waiting for high RSSI */
dev->interrupt_rx_allowed = true; dev->interrupt_rx_allowed = true;
wake_up_interruptible(&dev->tx_wait_queue); wake_up_interruptible(&dev->tx_wait_queue);
...@@ -452,7 +452,7 @@ pi433_receive(void *data) ...@@ -452,7 +452,7 @@ pi433_receive(void *data)
dev_dbg(dev->dev, "rx: going to wait for high RSSI level"); dev_dbg(dev->dev, "rx: going to wait for high RSSI level");
retval = wait_event_interruptible(dev->rx_wait_queue, retval = wait_event_interruptible(dev->rx_wait_queue,
rf69_get_flag(dev->spi, rf69_get_flag(dev->spi,
rssiExceededThreshold)); rssi_exceeded_threshold));
if (retval) /* wait was interrupted */ if (retval) /* wait was interrupted */
goto abort; goto abort;
dev->interrupt_rx_allowed = false; dev->interrupt_rx_allowed = false;
......
...@@ -545,21 +545,21 @@ int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value) ...@@ -545,21 +545,21 @@ int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value)
bool rf69_get_flag(struct spi_device *spi, enum flag flag) bool rf69_get_flag(struct spi_device *spi, enum flag flag)
{ {
switch (flag) { switch (flag) {
case modeSwitchCompleted: case mode_switch_completed:
return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_MODE_READY); return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_MODE_READY);
case readyToReceive: case ready_to_receive:
return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_RX_READY); return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_RX_READY);
case readyToSend: case ready_to_send:
return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_TX_READY); return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_TX_READY);
case pllLocked: case pll_locked:
return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_PLL_LOCK); return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_PLL_LOCK);
case rssiExceededThreshold: case rssi_exceeded_threshold:
return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_RSSI); return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_RSSI);
case timeout: case timeout:
return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_TIMEOUT); return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_TIMEOUT);
case automode: case automode:
return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_AUTOMODE); return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_AUTOMODE);
case syncAddressMatch: case sync_address_match:
return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_SYNC_ADDRESS_MATCH); return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_SYNC_ADDRESS_MATCH);
case fifo_full: case fifo_full:
return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_FULL); return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_FULL);
...@@ -571,13 +571,13 @@ bool rf69_get_flag(struct spi_device *spi, enum flag flag) ...@@ -571,13 +571,13 @@ bool rf69_get_flag(struct spi_device *spi, enum flag flag)
return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_LEVEL); return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_LEVEL);
case fifo_overrun: case fifo_overrun:
return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_OVERRUN); return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_OVERRUN);
case packetSent: case packet_sent:
return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_PACKET_SENT); return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_PACKET_SENT);
case payload_ready: case payload_ready:
return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_PAYLOAD_READY); return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_PAYLOAD_READY);
case crcOk: case crc_ok:
return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_CRC_OK); return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_CRC_OK);
case batteryLow: case battery_low:
return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_LOW_BAT); return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_LOW_BAT);
default: return false; default: return false;
} }
......
...@@ -94,23 +94,23 @@ enum threshold_decrement { ...@@ -94,23 +94,23 @@ enum threshold_decrement {
}; };
enum flag { enum flag {
modeSwitchCompleted, mode_switch_completed,
readyToReceive, ready_to_receive,
readyToSend, ready_to_send,
pllLocked, pll_locked,
rssiExceededThreshold, rssi_exceeded_threshold,
timeout, timeout,
automode, automode,
syncAddressMatch, sync_address_match,
fifo_full, fifo_full,
// fifo_not_empty, collision with next enum; replaced by following enum... // fifo_not_empty, collision with next enum; replaced by following enum...
fifo_empty, fifo_empty,
fifo_level_below_threshold, fifo_level_below_threshold,
fifo_overrun, fifo_overrun,
packetSent, packet_sent,
payload_ready, payload_ready,
crcOk, crc_ok,
batteryLow battery_low
}; };
enum fifo_fill_condition { enum fifo_fill_condition {
......
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