projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[scripts] env: colorize git output
[openwrt.git]
/
target
/
linux
/
ar71xx
/
patches-3.2
/
207-spi-ath79-make-chipselect-logic-more-flexible.patch
diff --git
a/target/linux/ar71xx/patches-3.2/207-spi-ath79-make-chipselect-logic-more-flexible.patch
b/target/linux/ar71xx/patches-3.2/207-spi-ath79-make-chipselect-logic-more-flexible.patch
index
7c45b73
..
af96f55
100644
(file)
--- a/
target/linux/ar71xx/patches-3.2/207-spi-ath79-make-chipselect-logic-more-flexible.patch
+++ b/
target/linux/ar71xx/patches-3.2/207-spi-ath79-make-chipselect-logic-more-flexible.patch
@@
-38,7
+38,7
@@
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
struct ath79_spi {
struct spi_bitbang bitbang;
u32 ioc_base;
struct ath79_spi {
struct spi_bitbang bitbang;
u32 ioc_base;
-@@ -62,6 +64,7 @@ static void ath79_spi_chipselect(struct
+@@ -62,6 +64,7 @@ static void ath79_spi_chipselect(struct
{
struct ath79_spi *sp = ath79_spidev_to_sp(spi);
int cs_high = (spi->mode & SPI_CS_HIGH) ? is_active : !is_active;
{
struct ath79_spi *sp = ath79_spidev_to_sp(spi);
int cs_high = (spi->mode & SPI_CS_HIGH) ? is_active : !is_active;
@@
-46,7
+46,7
@@
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
if (is_active) {
/* set initial clock polarity */
if (is_active) {
/* set initial clock polarity */
-@@ -73,20 +76,21 @@ static void ath79_spi_chipselect(struct
+@@ -73,20 +76,21 @@ static void ath79_spi_chipselect(struct
ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base);
}
ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base);
}
@@
-77,9
+77,9
@@
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
}
static void ath79_spi_enable(struct ath79_spi *sp)
}
static void ath79_spi_enable(struct ath79_spi *sp)
-@@ -114,24 +118,30 @@ static int ath79_spi_setup_cs(struct spi
+@@ -113,24 +117,30 @@ static void ath79_spi_disable(struct ath
+ static int ath79_spi_setup_cs(struct spi_device *spi)
{
{
- struct ath79_spi *sp = ath79_spidev_to_sp(spi);
struct ath79_spi_controller_data *cdata;
+ unsigned long flags;
int status;
struct ath79_spi_controller_data *cdata;
+ unsigned long flags;
int status;
@@
-112,16
+112,15
@@
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
}
return status;
}
return status;
-@@ -13
9,11 +149
,15 @@ static int ath79_spi_setup_cs(struct spi
+@@ -13
8,9 +148
,15 @@ static int ath79_spi_setup_cs(struct spi
static void ath79_spi_cleanup_cs(struct spi_device *spi)
{
static void ath79_spi_cleanup_cs(struct spi_device *spi)
{
-- struct ath79_spi *sp = ath79_spidev_to_sp(spi);
-+ struct ath79_spi_controller_data *cdata = spi->controller_data;
-
- if (spi->chip_select) {
- struct ath79_spi_controller_data *cdata = spi->controller_data;
- gpio_free(cdata->gpio);
- if (spi->chip_select) {
- struct ath79_spi_controller_data *cdata = spi->controller_data;
- gpio_free(cdata->gpio);
++ struct ath79_spi_controller_data *cdata = spi->controller_data;
++
+ switch (cdata->cs_type) {
+ case ATH79_SPI_CS_TYPE_INTERNAL:
+ /* nothing to do */
+ switch (cdata->cs_type) {
+ case ATH79_SPI_CS_TYPE_INTERNAL:
+ /* nothing to do */
@@
-132,7
+131,7
@@
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
}
}
}
}
-@@ -20
9,6 +223
,10 @@ static __devinit int ath79_spi_probe(str
+@@ -20
6,6 +222
,10 @@ static __devinit int ath79_spi_probe(str
struct resource *r;
int ret;
struct resource *r;
int ret;
@@
-143,7
+142,7
@@
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
master = spi_alloc_master(&pdev->dev, sizeof(*sp));
if (master == NULL) {
dev_err(&pdev->dev, "failed to allocate spi master\n");
master = spi_alloc_master(&pdev->dev, sizeof(*sp));
if (master == NULL) {
dev_err(&pdev->dev, "failed to allocate spi master\n");
-@@ -21
8,17 +236
,10 @@ static __devinit int ath79_spi_probe(str
+@@ -21
5,17 +235
,10 @@ static __devinit int ath79_spi_probe(str
sp = spi_master_get_devdata(master);
platform_set_drvdata(pdev, sp);
sp = spi_master_get_devdata(master);
platform_set_drvdata(pdev, sp);
This page took
0.024987 seconds
and
4
git commands to generate.