The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Simon Sandström" <simon@nikanor.nu>
To: gregkh@linuxfoundation.org
Cc: linux@Wolf-Entwicklungen.de, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 02/11] staging: pi433: Capitalize constant definitions
Date: Tue,  5 Dec 2017 23:08:40 +0100	[thread overview]
Message-ID: <20171205220849.5486-3-simon@nikanor.nu> (raw)
In-Reply-To: <20171205220849.5486-1-simon@nikanor.nu>

Fixes checkpatch.pl warnings "Avoid CamelCase <DIO_x>".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
---
 drivers/staging/pi433/pi433_if.c       | 32 ++++++++++++-------------
 drivers/staging/pi433/rf69_registers.h | 44 +++++++++++++++++-----------------
 2 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 3404cb9722c9..840a7c7bf19a 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -133,20 +133,20 @@ static irqreturn_t DIO0_irq_handler(int irq, void *dev_id)
 {
 	struct pi433_device *device = dev_id;
 
-	if      (device->irq_state[DIO0] == DIO_PacketSent)
+	if      (device->irq_state[DIO0] == DIO_PACKET_SENT)
 	{
 		device->free_in_fifo = FIFO_SIZE;
 		dev_dbg(device->dev, "DIO0 irq: Packet sent\n");
 		wake_up_interruptible(&device->fifo_wait_queue);
 	}
-	else if (device->irq_state[DIO0] == DIO_Rssi_DIO0)
+	else if (device->irq_state[DIO0] == DIO_RSSI_DIO0)
 	{
 		dev_dbg(device->dev, "DIO0 irq: RSSI level over threshold\n");
 		wake_up_interruptible(&device->rx_wait_queue);
 	}
-	else if (device->irq_state[DIO0] == DIO_PayloadReady)
+	else if (device->irq_state[DIO0] == DIO_PAYLOAD_READY)
 	{
-		dev_dbg(device->dev, "DIO0 irq: PayloadReady\n");
+		dev_dbg(device->dev, "DIO0 irq: Payload ready\n");
 		device->free_in_fifo = 0;
 		wake_up_interruptible(&device->fifo_wait_queue);
 	}
@@ -158,11 +158,11 @@ static irqreturn_t DIO1_irq_handler(int irq, void *dev_id)
 {
 	struct pi433_device *device = dev_id;
 
-	if      (device->irq_state[DIO1] == DIO_FifoNotEmpty_DIO1)
+	if      (device->irq_state[DIO1] == DIO_FIFO_NOT_EMPTY_DIO1)
 	{
 		device->free_in_fifo = FIFO_SIZE;
 	}
-	else if (device->irq_state[DIO1] == DIO_FifoLevel)
+	else if (device->irq_state[DIO1] == DIO_FIFO_LEVEL)
 	{
 		if (device->rx_active)	device->free_in_fifo = FIFO_THRESHOLD - 1;
 		else			device->free_in_fifo = FIFO_SIZE - FIFO_THRESHOLD - 1;
@@ -309,14 +309,14 @@ pi433_start_rx(struct pi433_device *dev)
 	if (retval) return retval;
 
 	/* setup rssi irq */
-	SET_CHECKED(rf69_set_dio_mapping(dev->spi, DIO0, DIO_Rssi_DIO0));
-	dev->irq_state[DIO0] = DIO_Rssi_DIO0;
+	SET_CHECKED(rf69_set_dio_mapping(dev->spi, DIO0, DIO_RSSI_DIO0));
+	dev->irq_state[DIO0] = DIO_RSSI_DIO0;
 	irq_set_irq_type(dev->irq_num[DIO0], IRQ_TYPE_EDGE_RISING);
 
 	/* setup fifo level interrupt */
 	SET_CHECKED(rf69_set_fifo_threshold(dev->spi, FIFO_SIZE - FIFO_THRESHOLD));
-	SET_CHECKED(rf69_set_dio_mapping(dev->spi, DIO1, DIO_FifoLevel));
-	dev->irq_state[DIO1] = DIO_FifoLevel;
+	SET_CHECKED(rf69_set_dio_mapping(dev->spi, DIO1, DIO_FIFO_LEVEL));
+	dev->irq_state[DIO1] = DIO_FIFO_LEVEL;
 	irq_set_irq_type(dev->irq_num[DIO1], IRQ_TYPE_EDGE_RISING);
 
 	/* set module to receiving mode */
@@ -378,8 +378,8 @@ pi433_receive(void *data)
 	}
 
 	/* configure payload ready irq */
-	SET_CHECKED(rf69_set_dio_mapping(spi, DIO0, DIO_PayloadReady));
-	dev->irq_state[DIO0] = DIO_PayloadReady;
+	SET_CHECKED(rf69_set_dio_mapping(spi, DIO0, DIO_PAYLOAD_READY));
+	dev->irq_state[DIO0] = DIO_PAYLOAD_READY;
 	irq_set_irq_type(dev->irq_num[DIO0], IRQ_TYPE_EDGE_RISING);
 
 	/* fixed or unlimited length? */
@@ -590,13 +590,13 @@ pi433_tx_thread(void *data)
 		rf69_set_tx_cfg(device, &tx_cfg);
 
 		/* enable fifo level interrupt */
-		SET_CHECKED(rf69_set_dio_mapping(spi, DIO1, DIO_FifoLevel));
-		device->irq_state[DIO1] = DIO_FifoLevel;
+		SET_CHECKED(rf69_set_dio_mapping(spi, DIO1, DIO_FIFO_LEVEL));
+		device->irq_state[DIO1] = DIO_FIFO_LEVEL;
 		irq_set_irq_type(device->irq_num[DIO1], IRQ_TYPE_EDGE_FALLING);
 
 		/* enable packet sent interrupt */
-		SET_CHECKED(rf69_set_dio_mapping(spi, DIO0, DIO_PacketSent));
-		device->irq_state[DIO0] = DIO_PacketSent;
+		SET_CHECKED(rf69_set_dio_mapping(spi, DIO0, DIO_PACKET_SENT));
+		device->irq_state[DIO0] = DIO_PACKET_SENT;
 		irq_set_irq_type(device->irq_num[DIO0], IRQ_TYPE_EDGE_RISING);
 		enable_irq(device->irq_num[DIO0]); /* was disabled by rx active check */
 
diff --git a/drivers/staging/pi433/rf69_registers.h b/drivers/staging/pi433/rf69_registers.h
index 6335d42142fe..d23b8b668ef5 100644
--- a/drivers/staging/pi433/rf69_registers.h
+++ b/drivers/staging/pi433/rf69_registers.h
@@ -346,28 +346,28 @@
 #define  DIO5					5
 
 /* DIO Mapping values (packet mode) */
-#define  DIO_ModeReady_DIO4			0x00
-#define  DIO_ModeReady_DIO5			0x03
-#define  DIO_ClkOut				0x00
-#define  DIO_Data				0x01
-#define  DIO_TimeOut_DIO1			0x03
-#define  DIO_TimeOut_DIO4			0x00
-#define  DIO_Rssi_DIO0				0x03
-#define  DIO_Rssi_DIO3_4			0x01
-#define  DIO_RxReady				0x02
-#define  DIO_PLLLock				0x03
-#define  DIO_TxReady				0x01
-#define  DIO_FifoFull_DIO1			0x01
-#define  DIO_FifoFull_DIO3			0x00
-#define  DIO_SyncAddress			0x02
-#define  DIO_FifoNotEmpty_DIO1			0x02
-#define  DIO_FifoNotEmpty_FIO2			0x00
-#define  DIO_Automode				0x04
-#define  DIO_FifoLevel				0x00
-#define  DIO_CrcOk				0x00
-#define  DIO_PayloadReady			0x01
-#define  DIO_PacketSent				0x00
-#define  DIO_Dclk				0x00
+#define  DIO_MODE_READY_DIO4			0x00
+#define  DIO_MODE_READY_DIO5			0x03
+#define  DIO_CLK_OUT				0x00
+#define  DIO_DATA				0x01
+#define  DIO_TIMEOUT_DIO1			0x03
+#define  DIO_TIMEOUT_DIO4			0x00
+#define  DIO_RSSI_DIO0				0x03
+#define  DIO_RSSI_DIO3_4			0x01
+#define  DIO_RX_READY				0x02
+#define  DIO_PLL_LOCK				0x03
+#define  DIO_TX_READY				0x01
+#define  DIO_FIFO_FULL_DIO1			0x01
+#define  DIO_FIFO_FULL_DIO3			0x00
+#define  DIO_SYNC_ADDRESS			0x02
+#define  DIO_FIFO_NOT_EMPTY_DIO1		0x02
+#define  DIO_FIFO_NOT_EMPTY_FIO2		0x00
+#define  DIO_AUTOMODE				0x04
+#define  DIO_FIFO_LEVEL				0x00
+#define  DIO_CRC_OK				0x00
+#define  DIO_PAYLOAD_READY			0x01
+#define  DIO_PACKET_SENT			0x00
+#define  DIO_DCLK				0x00
 
 /* RegDioMapping2 CLK_OUT part */
 #define  MASK_DIOMAPPING2_CLK_OUT		0x07
-- 
2.11.0

  parent reply	other threads:[~2017-12-05 22:09 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-05 22:08 [PATCH v2 00/11] Fix indentation and CamelCase issue in staging/pi433 Simon Sandström
2017-12-05 22:08 ` [PATCH v2 01/11] staging: pi433: Fix indentation in rf69_enum.h Simon Sandström
2017-12-05 22:08 ` Simon Sandström [this message]
2017-12-05 22:08 ` [PATCH v2 03/11] staging: pi433: Rename variable in struct pi433_rx_cfg Simon Sandström
2017-12-05 22:08 ` [PATCH v2 04/11] staging: pi433: Rename enum optionOnOff in rf69_enum.h Simon Sandström
2017-12-06  9:46   ` Marcus Wolf
2017-12-06 10:23     ` Dan Carpenter
2017-12-06 10:31       ` Marcus Wolf
2017-12-06 10:44         ` Dan Carpenter
2017-12-06 11:07           ` Marcus Wolf
2017-12-06 19:57           ` Simon Sandström
2017-12-06 22:17             ` Marcus Wolf
2017-12-07  9:41               ` Dan Carpenter
2017-12-05 22:08 ` [PATCH v2 05/11] staging: pi433: Rename enum modShaping " Simon Sandström
2017-12-05 22:08 ` [PATCH v2 06/11] staging: pi433: Split rf69_set_crc_enabled into two functions Simon Sandström
2017-12-06  9:05   ` Marcus Wolf
2017-12-06  9:37     ` Dan Carpenter
2017-12-06 10:07       ` Marcus Wolf
2017-12-06 15:11         ` Greg KH
2017-12-06 10:36       ` Marcus Wolf
2017-12-06 15:16   ` Greg KH
2017-12-06 20:27     ` Simon Sandström
2017-12-05 22:08 ` [PATCH v2 07/11] staging: pi433: Split rf69_set_sync_enabled " Simon Sandström
2017-12-05 22:08 ` [PATCH v2 08/11] staging: pi433: Remove enum data_mode Simon Sandström
2017-12-06  9:11   ` Marcus Wolf
2017-12-06 12:47     ` Dan Carpenter
2017-12-07  9:47       ` staging: pi433: Plans from Smarthome-Wolf Marcus Wolf
2017-12-05 22:08 ` [PATCH v2 09/11] staging: pi433: Combine all rf69_set_amplifier_x() Simon Sandström
2017-12-06  9:43   ` Marcus Wolf
2017-12-05 22:08 ` [PATCH v2 10/11] staging: pi433: Move enum option_on_off to pi433_if.h Simon Sandström
2017-12-05 22:08 ` [PATCH v2 11/11] staging: pi433: Remove SET_CHECKED usage from pi433_probe Simon Sandström

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171205220849.5486-3-simon@nikanor.nu \
    --to=simon@nikanor.nu \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@Wolf-Entwicklungen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox