aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-mt65xx.c
diff options
context:
space:
mode:
authorLeilk Liu <leilk.liu@mediatek.com>2015-08-20 05:19:07 -0400
committerMark Brown <broonie@kernel.org>2015-08-20 14:09:48 -0400
commitaf57937e862370c14b7d71d15d969593ffca1ba8 (patch)
tree2ae765bfef1e3a0b1e62e66eb7a4b43377a68d3a /drivers/spi/spi-mt65xx.c
parent44f636da4e71e0c73d6e29d0319a8954ce3f247a (diff)
spi: medaitek: revise quirks compatibility style
The quirks are true/false, so define these as bool. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-mt65xx.c')
-rw-r--r--drivers/spi/spi-mt65xx.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
index 2eda2d1782f3..55d1c3e51864 100644
--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -71,10 +71,6 @@
71#define SPI_CMD_FINISH_IE BIT(16) 71#define SPI_CMD_FINISH_IE BIT(16)
72#define SPI_CMD_PAUSE_IE BIT(17) 72#define SPI_CMD_PAUSE_IE BIT(17)
73 73
74#define MTK_SPI_QUIRK_PAD_SELECT 1
75/* Must explicitly send dummy Tx bytes to do Rx only transfer */
76#define MTK_SPI_QUIRK_MUST_TX 1
77
78#define MT8173_SPI_MAX_PAD_SEL 3 74#define MT8173_SPI_MAX_PAD_SEL 3
79 75
80#define MTK_SPI_IDLE 0 76#define MTK_SPI_IDLE 0
@@ -84,8 +80,9 @@
84#define MTK_SPI_PACKET_SIZE 1024 80#define MTK_SPI_PACKET_SIZE 1024
85 81
86struct mtk_spi_compatible { 82struct mtk_spi_compatible {
87 u32 need_pad_sel; 83 bool need_pad_sel;
88 u32 must_tx; 84 /* Must explicitly send dummy Tx bytes to do Rx only transfer */
85 bool must_tx;
89}; 86};
90 87
91struct mtk_spi { 88struct mtk_spi {
@@ -100,19 +97,11 @@ struct mtk_spi {
100 const struct mtk_spi_compatible *dev_comp; 97 const struct mtk_spi_compatible *dev_comp;
101}; 98};
102 99
103static const struct mtk_spi_compatible mt6589_compat = { 100static const struct mtk_spi_compatible mt6589_compat;
104 .need_pad_sel = 0, 101static const struct mtk_spi_compatible mt8135_compat;
105 .must_tx = 0,
106};
107
108static const struct mtk_spi_compatible mt8135_compat = {
109 .need_pad_sel = 0,
110 .must_tx = 0,
111};
112
113static const struct mtk_spi_compatible mt8173_compat = { 102static const struct mtk_spi_compatible mt8173_compat = {
114 .need_pad_sel = MTK_SPI_QUIRK_PAD_SELECT, 103 .need_pad_sel = true,
115 .must_tx = MTK_SPI_QUIRK_MUST_TX, 104 .must_tx = true,
116}; 105};
117 106
118/* 107/*