diff options
author | Tudor Ambarus <tudor.ambarus@microchip.com> | 2019-02-05 12:33:14 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-02-06 12:18:57 -0500 |
commit | 1db6de22b2c64c7d4d05530e16772069486b3bd1 (patch) | |
tree | 2858097f3997815a1ef1a937e7a49220fe522b43 /drivers/spi/atmel-quadspi.c | |
parent | 18b6f6e176dfc7585988be06bf2dedddd43f4e55 (diff) |
spi: atmel-quadspi: fix naming scheme
Let general names to core drivers.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Boris Brezillon <bbrezillon@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/atmel-quadspi.c')
-rw-r--r-- | drivers/spi/atmel-quadspi.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c index c745e75b755e..be1d1ba7898c 100644 --- a/drivers/spi/atmel-quadspi.c +++ b/drivers/spi/atmel-quadspi.c | |||
@@ -158,14 +158,14 @@ struct atmel_qspi { | |||
158 | struct completion cmd_completion; | 158 | struct completion cmd_completion; |
159 | }; | 159 | }; |
160 | 160 | ||
161 | struct qspi_mode { | 161 | struct atmel_qspi_mode { |
162 | u8 cmd_buswidth; | 162 | u8 cmd_buswidth; |
163 | u8 addr_buswidth; | 163 | u8 addr_buswidth; |
164 | u8 data_buswidth; | 164 | u8 data_buswidth; |
165 | u32 config; | 165 | u32 config; |
166 | }; | 166 | }; |
167 | 167 | ||
168 | static const struct qspi_mode sama5d2_qspi_modes[] = { | 168 | static const struct atmel_qspi_mode sama5d2_qspi_modes[] = { |
169 | { 1, 1, 1, QSPI_IFR_WIDTH_SINGLE_BIT_SPI }, | 169 | { 1, 1, 1, QSPI_IFR_WIDTH_SINGLE_BIT_SPI }, |
170 | { 1, 1, 2, QSPI_IFR_WIDTH_DUAL_OUTPUT }, | 170 | { 1, 1, 2, QSPI_IFR_WIDTH_DUAL_OUTPUT }, |
171 | { 1, 1, 4, QSPI_IFR_WIDTH_QUAD_OUTPUT }, | 171 | { 1, 1, 4, QSPI_IFR_WIDTH_QUAD_OUTPUT }, |
@@ -175,8 +175,8 @@ static const struct qspi_mode sama5d2_qspi_modes[] = { | |||
175 | { 4, 4, 4, QSPI_IFR_WIDTH_QUAD_CMD }, | 175 | { 4, 4, 4, QSPI_IFR_WIDTH_QUAD_CMD }, |
176 | }; | 176 | }; |
177 | 177 | ||
178 | static inline bool is_compatible(const struct spi_mem_op *op, | 178 | static inline bool atmel_qspi_is_compatible(const struct spi_mem_op *op, |
179 | const struct qspi_mode *mode) | 179 | const struct atmel_qspi_mode *mode) |
180 | { | 180 | { |
181 | if (op->cmd.buswidth != mode->cmd_buswidth) | 181 | if (op->cmd.buswidth != mode->cmd_buswidth) |
182 | return false; | 182 | return false; |
@@ -190,12 +190,12 @@ static inline bool is_compatible(const struct spi_mem_op *op, | |||
190 | return true; | 190 | return true; |
191 | } | 191 | } |
192 | 192 | ||
193 | static int find_mode(const struct spi_mem_op *op) | 193 | static int atmel_qspi_find_mode(const struct spi_mem_op *op) |
194 | { | 194 | { |
195 | u32 i; | 195 | u32 i; |
196 | 196 | ||
197 | for (i = 0; i < ARRAY_SIZE(sama5d2_qspi_modes); i++) | 197 | for (i = 0; i < ARRAY_SIZE(sama5d2_qspi_modes); i++) |
198 | if (is_compatible(op, &sama5d2_qspi_modes[i])) | 198 | if (atmel_qspi_is_compatible(op, &sama5d2_qspi_modes[i])) |
199 | return i; | 199 | return i; |
200 | 200 | ||
201 | return -1; | 201 | return -1; |
@@ -204,7 +204,7 @@ static int find_mode(const struct spi_mem_op *op) | |||
204 | static bool atmel_qspi_supports_op(struct spi_mem *mem, | 204 | static bool atmel_qspi_supports_op(struct spi_mem *mem, |
205 | const struct spi_mem_op *op) | 205 | const struct spi_mem_op *op) |
206 | { | 206 | { |
207 | if (find_mode(op) < 0) | 207 | if (atmel_qspi_find_mode(op) < 0) |
208 | return false; | 208 | return false; |
209 | 209 | ||
210 | /* special case not supported by hardware */ | 210 | /* special case not supported by hardware */ |
@@ -236,7 +236,7 @@ static int atmel_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) | |||
236 | aq->mr = QSPI_MR_SMM; | 236 | aq->mr = QSPI_MR_SMM; |
237 | } | 237 | } |
238 | 238 | ||
239 | mode = find_mode(op); | 239 | mode = atmel_qspi_find_mode(op); |
240 | if (mode < 0) | 240 | if (mode < 0) |
241 | return -ENOTSUPP; | 241 | return -ENOTSUPP; |
242 | 242 | ||