All of lore.kernel.org
 help / color / mirror / Atom feed
From: dirk.brandewie@gmail.com
To: linux-kernel@vger.kernel.org, spi-devel-general@lists.sourceforge.net
Cc: Dirk Brandewie <dirk.brandewie@gmail.com>,
	Alan Cox <alan@linux.intel.com>
Subject: [PATCH 2/5] spi/dw_spi: expose dw_spi platform data stucture.
Date: Wed, 15 Jun 2011 10:23:05 -0700	[thread overview]
Message-ID: <1308158588-17249-3-git-send-email-dirk.brandewie@gmail.com> (raw)
In-Reply-To: <1308158588-17249-1-git-send-email-dirk.brandewie@gmail.com>

From: Dirk Brandewie <dirk.brandewie@gmail.com>

This patch move the definition of the dw_spi_chip structure to
a header file available to the client drivers.

Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
---
 drivers/spi/spi-dw.h       |   20 +-------------------
 include/linux/spi/spi-dw.h |   20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 19 deletions(-)
 create mode 100644 include/linux/spi/spi-dw.h

diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h
index 7a5e78d..97baff6 100644
--- a/drivers/spi/spi-dw.h
+++ b/drivers/spi/spi-dw.h
@@ -3,6 +3,7 @@
 
 #include <linux/io.h>
 #include <linux/scatterlist.h>
+#include <linux/spi/dw_spi.h>
 
 /* Bit fields in CTRLR0 */
 #define SPI_DFS_OFFSET			0
@@ -49,12 +50,6 @@
 /* TX RX interrupt level threshold, max can be 256 */
 #define SPI_INT_THRESHOLD		32
 
-enum dw_ssi_type {
-	SSI_MOTO_SPI = 0,
-	SSI_TI_SSP,
-	SSI_NS_MICROWIRE,
-};
-
 struct dw_spi_reg {
 	u32	ctrl0;
 	u32	ctrl1;
@@ -208,19 +203,6 @@ static inline void spi_umask_intr(struct dw_spi *dws, u32 mask)
 	dw_writel(dws, imr, new_mask);
 }
 
-/*
- * Each SPI slave device to work with dw_api controller should
- * has such a structure claiming its working mode (PIO/DMA etc),
- * which can be save in the "controller_data" member of the
- * struct spi_device
- */
-struct dw_spi_chip {
-	u8 poll_mode;	/* 0 for contoller polling mode */
-	u8 type;	/* SPI/SSP/Micrwire */
-	u8 enable_dma;
-	void (*cs_control)(u32 command);
-};
-
 extern int dw_spi_add_host(struct dw_spi *dws);
 extern void dw_spi_remove_host(struct dw_spi *dws);
 extern int dw_spi_suspend_host(struct dw_spi *dws);
diff --git a/include/linux/spi/spi-dw.h b/include/linux/spi/spi-dw.h
new file mode 100644
index 0000000..75dba03
--- /dev/null
+++ b/include/linux/spi/spi-dw.h
@@ -0,0 +1,20 @@
+#ifndef DW_SPI_H
+#define DW_SPI_H
+
+enum dw_ssi_type {
+	SSI_MOTO_SPI = 0,
+	SSI_TI_SSP,
+	SSI_NS_MICROWIRE,
+};
+
+/*
+ * Each SPI slave device to work with dw_api controller should
+ * has such a structure claiming its working mode (PIO/DMA etc),
+ * which can be save in the "controller_data" member of the
+ * struct spi_device
+ */
+struct dw_spi_chip {
+	u8 type;	/* SPI/SSP/Micrwire */
+	u8 enable_dma;
+};
+#endif /* DW_SPI_H */
-- 
1.7.3.4


  parent reply	other threads:[~2011-06-15 17:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15 17:23 [PATCH 0/5] Designware SPI driver update dirk.brandewie
2011-06-15 17:23 ` [PATCH 1/5] spi/makefile: Fix typo from reorganize drivers patch dirk.brandewie
2011-06-16 12:31   ` Grant Likely
2011-06-15 17:23 ` dirk.brandewie [this message]
2011-06-15 17:23 ` [PATCH 3/5] dw_spi: rework message processing dirk.brandewie
2011-06-15 17:23   ` dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w
2011-06-16 13:14   ` Grant Likely
2011-06-16 16:03     ` Dirk Brandewie
2011-06-16 16:40       ` Grant Likely
2011-06-16 14:00   ` Feng Tang
2011-06-16 14:00     ` Feng Tang
2011-06-16 17:28     ` Dirk Brandewie
2011-06-16 17:28       ` Dirk Brandewie
2011-06-16 17:38       ` Grant Likely
2011-06-16 17:38         ` Grant Likely
2011-06-16 19:52         ` Dirk Brandewie
2011-06-16 19:52           ` Dirk Brandewie
2011-06-17  1:22       ` Feng Tang
2011-06-17  1:22         ` Feng Tang
2011-06-17  1:34     ` Du, Alek
2011-06-17  1:34       ` Du, Alek
2011-06-15 17:23 ` [PATCH 4/5] spi/spi-dw: update function naming convention dirk.brandewie
2011-06-15 17:23   ` dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w
2011-06-16 13:15   ` Grant Likely
2011-06-15 17:23 ` [PATCH 5/5] spi_dw_pci: Add runtime power management dirk.brandewie
2011-06-15 17:23   ` dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w
2011-06-16 13:16   ` Grant Likely

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=1308158588-17249-3-git-send-email-dirk.brandewie@gmail.com \
    --to=dirk.brandewie@gmail.com \
    --cc=alan@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.