From: Marcus Wolf <linux@wolf-entwicklungen.de>
To: gregkh@linuxfoundation.org, dan.carpenter@oracle.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Cc: Marcus Wolf <linux@wolf-entwicklungen.de>
Subject: [PATCH] staging: pi433: Removed some obsolete or duplicated defines; moved two defines to better locations
Date: Sat, 2 Dec 2017 17:14:08 +0200 [thread overview]
Message-ID: <1512227648-16008-1-git-send-email-linux@wolf-entwicklungen.de> (raw)
The define FIFO_SIZE was moved to rf69_registers.h. Although it is not a register,
it is a value, that is given by hardware (like the registers).
The define FIFO_THRESHOLD was moved to pi433_if.c, since it is a value, that is
freely choosen by the interface implementation. The better the response time of
the driver, the lower threshold can be set.
Signed-off-by: Marcus Wolf <linux@wolf-entwicklungen.de>
---
drivers/staging/pi433/pi433_if.c | 1 +
drivers/staging/pi433/rf69.c | 1 -
drivers/staging/pi433/rf69.h | 5 -----
drivers/staging/pi433/rf69_registers.h | 5 +++++
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 2a205c6..292f121 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -59,6 +59,7 @@
#define MAX_MSG_SIZE 900 /* min: FIFO_SIZE! */
#define MSG_FIFO_SIZE 65536 /* 65536 = 2^16 */
#define NUM_DIO 2
+#define FIFO_THRESHOLD 15 /* in byte */
static dev_t pi433_dev;
static DEFINE_IDR(pi433_idr);
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index 767b565..ec4b540 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -31,7 +31,6 @@
#include "rf69_registers.h"
#define F_OSC 32000000 /* in Hz */
-#define FIFO_SIZE 66 /* in byte */
/*-------------------------------------------------------------------------*/
diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
index 5c0c956..645c8df 100644
--- a/drivers/staging/pi433/rf69.h
+++ b/drivers/staging/pi433/rf69.h
@@ -20,11 +20,6 @@
#include "rf69_enum.h"
#include "rf69_registers.h"
-#define F_OSC 32000000 /* in Hz */
-#define FREQUENCY 433920000 /* in Hz, modifying this value impacts CE certification */
-#define FIFO_SIZE 66 /* in byte */
-#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_modulation(struct spi_device *spi, enum modulation modulation);
diff --git a/drivers/staging/pi433/rf69_registers.h b/drivers/staging/pi433/rf69_registers.h
index 6335d42..cffafd1 100644
--- a/drivers/staging/pi433/rf69_registers.h
+++ b/drivers/staging/pi433/rf69_registers.h
@@ -16,6 +16,11 @@
*/
/*******************************************/
+/* size of the hardware fifo */
+/*******************************************/
+#define FIFO_SIZE 66
+
+/*******************************************/
/* RF69 register addresses */
/*******************************************/
#define REG_FIFO 0x00
--
1.7.10.4
next reply other threads:[~2017-12-02 15:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-02 15:14 Marcus Wolf [this message]
2017-12-02 15:55 ` Greg KH
2017-12-02 16:00 ` Marcus Wolf
2017-12-02 16:09 ` Greg KH
2017-12-02 16:35 ` Marcus Wolf
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=1512227648-16008-1-git-send-email-linux@wolf-entwicklungen.de \
--to=linux@wolf-entwicklungen.de \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®