Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
9270d827
Commit
9270d827
authored
Oct 25, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/fix/efm' into spi-linus
parents
9fbeace7
9191546f
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
35 additions
and
26 deletions
+35
-26
drivers/spi/spi-altera.c
drivers/spi/spi-altera.c
+1
-1
drivers/spi/spi-ath79.c
drivers/spi/spi-ath79.c
+1
-1
drivers/spi/spi-au1550.c
drivers/spi/spi-au1550.c
+1
-1
drivers/spi/spi-bitbang.c
drivers/spi/spi-bitbang.c
+11
-1
drivers/spi/spi-butterfly.c
drivers/spi/spi-butterfly.c
+1
-1
drivers/spi/spi-davinci.c
drivers/spi/spi-davinci.c
+4
-6
drivers/spi/spi-efm32.c
drivers/spi/spi-efm32.c
+3
-1
drivers/spi/spi-fsl-dspi.c
drivers/spi/spi-fsl-dspi.c
+1
-1
drivers/spi/spi-gpio.c
drivers/spi/spi-gpio.c
+2
-3
drivers/spi/spi-imx.c
drivers/spi/spi-imx.c
+1
-1
drivers/spi/spi-lm70llp.c
drivers/spi/spi-lm70llp.c
+1
-1
drivers/spi/spi-nuc900.c
drivers/spi/spi-nuc900.c
+1
-2
drivers/spi/spi-oc-tiny.c
drivers/spi/spi-oc-tiny.c
+1
-1
drivers/spi/spi-ppc4xx.c
drivers/spi/spi-ppc4xx.c
+2
-1
drivers/spi/spi-s3c24xx.c
drivers/spi/spi-s3c24xx.c
+1
-1
drivers/spi/spi-sh-sci.c
drivers/spi/spi-sh-sci.c
+1
-1
drivers/spi/spi-sirf.c
drivers/spi/spi-sirf.c
+1
-1
drivers/spi/spi-xilinx.c
drivers/spi/spi-xilinx.c
+1
-1
No files found.
drivers/spi/spi-altera.c
View file @
9270d827
...
...
@@ -219,7 +219,7 @@ static int altera_spi_probe(struct platform_device *pdev)
platform_set_drvdata
(
pdev
,
hw
);
/* setup the state for the bitbang driver */
hw
->
bitbang
.
master
=
spi_master_get
(
master
)
;
hw
->
bitbang
.
master
=
master
;
if
(
!
hw
->
bitbang
.
master
)
return
err
;
hw
->
bitbang
.
chipselect
=
altera_spi_chipsel
;
...
...
drivers/spi/spi-ath79.c
View file @
9270d827
...
...
@@ -231,7 +231,7 @@ static int ath79_spi_probe(struct platform_device *pdev)
master
->
num_chipselect
=
pdata
->
num_chipselect
;
}
sp
->
bitbang
.
master
=
spi_master_get
(
master
)
;
sp
->
bitbang
.
master
=
master
;
sp
->
bitbang
.
chipselect
=
ath79_spi_chipselect
;
sp
->
bitbang
.
txrx_word
[
SPI_MODE_0
]
=
ath79_spi_txrx_mode0
;
sp
->
bitbang
.
setup_transfer
=
spi_bitbang_setup_transfer
;
...
...
drivers/spi/spi-au1550.c
View file @
9270d827
...
...
@@ -775,7 +775,7 @@ static int au1550_spi_probe(struct platform_device *pdev)
hw
=
spi_master_get_devdata
(
master
);
hw
->
master
=
spi_master_get
(
master
)
;
hw
->
master
=
master
;
hw
->
pdata
=
dev_get_platdata
(
&
pdev
->
dev
);
hw
->
dev
=
&
pdev
->
dev
;
...
...
drivers/spi/spi-bitbang.c
View file @
9270d827
...
...
@@ -414,10 +414,16 @@ static int spi_bitbang_unprepare_hardware(struct spi_master *spi)
* This routine registers the spi_master, which will process requests in a
* dedicated task, keeping IRQs unblocked most of the time. To stop
* processing those requests, call spi_bitbang_stop().
*
* On success, this routine will take a reference to master. The caller is
* responsible for calling spi_bitbang_stop() to decrement the reference and
* spi_master_put() as counterpart of spi_alloc_master() to prevent a memory
* leak.
*/
int
spi_bitbang_start
(
struct
spi_bitbang
*
bitbang
)
{
struct
spi_master
*
master
=
bitbang
->
master
;
int
ret
;
if
(
!
master
||
!
bitbang
->
chipselect
)
return
-
EINVAL
;
...
...
@@ -449,7 +455,11 @@ int spi_bitbang_start(struct spi_bitbang *bitbang)
/* driver may get busy before register() returns, especially
* if someone registered boardinfo for devices
*/
return
spi_register_master
(
master
);
ret
=
spi_register_master
(
spi_master_get
(
master
));
if
(
ret
)
spi_master_put
(
master
);
return
0
;
}
EXPORT_SYMBOL_GPL
(
spi_bitbang_start
);
...
...
drivers/spi/spi-butterfly.c
View file @
9270d827
...
...
@@ -225,7 +225,7 @@ static void butterfly_attach(struct parport *p)
master
->
bus_num
=
42
;
master
->
num_chipselect
=
2
;
pp
->
bitbang
.
master
=
spi_master_get
(
master
)
;
pp
->
bitbang
.
master
=
master
;
pp
->
bitbang
.
chipselect
=
butterfly_chipselect
;
pp
->
bitbang
.
txrx_word
[
SPI_MODE_0
]
=
butterfly_txrx_word_mode0
;
...
...
drivers/spi/spi-davinci.c
View file @
9270d827
...
...
@@ -916,7 +916,7 @@ static int davinci_spi_probe(struct platform_device *pdev)
if
(
ret
)
goto
unmap_io
;
dspi
->
bitbang
.
master
=
spi_master_get
(
master
)
;
dspi
->
bitbang
.
master
=
master
;
if
(
dspi
->
bitbang
.
master
==
NULL
)
{
ret
=
-
ENODEV
;
goto
irq_free
;
...
...
@@ -925,7 +925,7 @@ static int davinci_spi_probe(struct platform_device *pdev)
dspi
->
clk
=
clk_get
(
&
pdev
->
dev
,
NULL
);
if
(
IS_ERR
(
dspi
->
clk
))
{
ret
=
-
ENODEV
;
goto
put_master
;
goto
irq_free
;
}
clk_prepare_enable
(
dspi
->
clk
);
...
...
@@ -1015,8 +1015,6 @@ static int davinci_spi_probe(struct platform_device *pdev)
free_clk:
clk_disable_unprepare
(
dspi
->
clk
);
clk_put
(
dspi
->
clk
);
put_master:
spi_master_put
(
master
);
irq_free:
free_irq
(
dspi
->
irq
,
dspi
);
unmap_io:
...
...
@@ -1024,7 +1022,7 @@ static int davinci_spi_probe(struct platform_device *pdev)
release_region:
release_mem_region
(
dspi
->
pbase
,
resource_size
(
r
));
free_master:
kfree
(
master
);
spi_master_put
(
master
);
err:
return
ret
;
}
...
...
@@ -1051,11 +1049,11 @@ static int davinci_spi_remove(struct platform_device *pdev)
clk_disable_unprepare
(
dspi
->
clk
);
clk_put
(
dspi
->
clk
);
spi_master_put
(
master
);
free_irq
(
dspi
->
irq
,
dspi
);
iounmap
(
dspi
->
base
);
r
=
platform_get_resource
(
pdev
,
IORESOURCE_MEM
,
0
);
release_mem_region
(
dspi
->
pbase
,
resource_size
(
r
));
spi_master_put
(
master
);
return
0
;
}
...
...
drivers/spi/spi-efm32.c
View file @
9270d827
...
...
@@ -347,7 +347,7 @@ static int efm32_spi_probe(struct platform_device *pdev)
ddata
=
spi_master_get_devdata
(
master
);
ddata
->
bitbang
.
master
=
spi_master_get
(
master
)
;
ddata
->
bitbang
.
master
=
master
;
ddata
->
bitbang
.
chipselect
=
efm32_spi_chipselect
;
ddata
->
bitbang
.
setup_transfer
=
efm32_spi_setup_transfer
;
ddata
->
bitbang
.
txrx_bufs
=
efm32_spi_txrx_bufs
;
...
...
@@ -478,6 +478,8 @@ static int efm32_spi_remove(struct platform_device *pdev)
struct
spi_master
*
master
=
platform_get_drvdata
(
pdev
);
struct
efm32_spi_ddata
*
ddata
=
spi_master_get_devdata
(
master
);
spi_bitbang_stop
(
&
ddata
->
bitbang
);
efm32_spi_write32
(
ddata
,
0
,
REG_IEN
);
free_irq
(
ddata
->
txirq
,
ddata
);
...
...
drivers/spi/spi-fsl-dspi.c
View file @
9270d827
...
...
@@ -450,7 +450,7 @@ static int dspi_probe(struct platform_device *pdev)
dspi
=
spi_master_get_devdata
(
master
);
dspi
->
pdev
=
pdev
;
dspi
->
bitbang
.
master
=
spi_master_get
(
master
)
;
dspi
->
bitbang
.
master
=
master
;
dspi
->
bitbang
.
chipselect
=
dspi_chipselect
;
dspi
->
bitbang
.
setup_transfer
=
dspi_setup_transfer
;
dspi
->
bitbang
.
txrx_bufs
=
dspi_txrx_transfer
;
...
...
drivers/spi/spi-gpio.c
View file @
9270d827
...
...
@@ -467,7 +467,7 @@ static int spi_gpio_probe(struct platform_device *pdev)
}
#endif
spi_gpio
->
bitbang
.
master
=
spi_master_get
(
master
)
;
spi_gpio
->
bitbang
.
master
=
master
;
spi_gpio
->
bitbang
.
chipselect
=
spi_gpio_chipselect
;
if
((
master_flags
&
(
SPI_MASTER_NO_TX
|
SPI_MASTER_NO_RX
))
==
0
)
{
...
...
@@ -486,7 +486,6 @@ static int spi_gpio_probe(struct platform_device *pdev)
status
=
spi_bitbang_start
(
&
spi_gpio
->
bitbang
);
if
(
status
<
0
)
{
spi_master_put
(
spi_gpio
->
bitbang
.
master
);
gpio_free:
if
(
SPI_MISO_GPIO
!=
SPI_GPIO_NO_MISO
)
gpio_free
(
SPI_MISO_GPIO
);
...
...
@@ -510,13 +509,13 @@ static int spi_gpio_remove(struct platform_device *pdev)
/* stop() unregisters child devices too */
status
=
spi_bitbang_stop
(
&
spi_gpio
->
bitbang
);
spi_master_put
(
spi_gpio
->
bitbang
.
master
);
if
(
SPI_MISO_GPIO
!=
SPI_GPIO_NO_MISO
)
gpio_free
(
SPI_MISO_GPIO
);
if
(
SPI_MOSI_GPIO
!=
SPI_GPIO_NO_MOSI
)
gpio_free
(
SPI_MOSI_GPIO
);
gpio_free
(
SPI_SCK_GPIO
);
spi_master_put
(
spi_gpio
->
bitbang
.
master
);
return
status
;
}
...
...
drivers/spi/spi-imx.c
View file @
9270d827
...
...
@@ -786,7 +786,7 @@ static int spi_imx_probe(struct platform_device *pdev)
master
->
num_chipselect
=
num_cs
;
spi_imx
=
spi_master_get_devdata
(
master
);
spi_imx
->
bitbang
.
master
=
spi_master_get
(
master
)
;
spi_imx
->
bitbang
.
master
=
master
;
for
(
i
=
0
;
i
<
master
->
num_chipselect
;
i
++
)
{
int
cs_gpio
=
of_get_named_gpio
(
np
,
"cs-gpios"
,
i
);
...
...
drivers/spi/spi-lm70llp.c
View file @
9270d827
...
...
@@ -222,7 +222,7 @@ static void spi_lm70llp_attach(struct parport *p)
/*
* SPI and bitbang hookup.
*/
pp
->
bitbang
.
master
=
spi_master_get
(
master
)
;
pp
->
bitbang
.
master
=
master
;
pp
->
bitbang
.
chipselect
=
lm70_chipselect
;
pp
->
bitbang
.
txrx_word
[
SPI_MODE_0
]
=
lm70_txrx
;
pp
->
bitbang
.
flags
=
SPI_3WIRE
;
...
...
drivers/spi/spi-nuc900.c
View file @
9270d827
...
...
@@ -349,7 +349,7 @@ static int nuc900_spi_probe(struct platform_device *pdev)
}
hw
=
spi_master_get_devdata
(
master
);
hw
->
master
=
spi_master_get
(
master
)
;
hw
->
master
=
master
;
hw
->
pdata
=
dev_get_platdata
(
&
pdev
->
dev
);
hw
->
dev
=
&
pdev
->
dev
;
...
...
@@ -435,7 +435,6 @@ static int nuc900_spi_probe(struct platform_device *pdev)
kfree
(
hw
->
ioarea
);
err_pdata:
spi_master_put
(
hw
->
master
);
err_nomem:
return
err
;
}
...
...
drivers/spi/spi-oc-tiny.c
View file @
9270d827
...
...
@@ -306,7 +306,7 @@ static int tiny_spi_probe(struct platform_device *pdev)
platform_set_drvdata
(
pdev
,
hw
);
/* setup the state for the bitbang driver */
hw
->
bitbang
.
master
=
spi_master_get
(
master
)
;
hw
->
bitbang
.
master
=
master
;
if
(
!
hw
->
bitbang
.
master
)
return
err
;
hw
->
bitbang
.
setup_transfer
=
tiny_spi_setup_transfer
;
...
...
drivers/spi/spi-ppc4xx.c
View file @
9270d827
...
...
@@ -396,7 +396,7 @@ static int spi_ppc4xx_of_probe(struct platform_device *op)
master
->
dev
.
of_node
=
np
;
platform_set_drvdata
(
op
,
master
);
hw
=
spi_master_get_devdata
(
master
);
hw
->
master
=
spi_master_get
(
master
)
;
hw
->
master
=
master
;
hw
->
dev
=
dev
;
init_completion
(
&
hw
->
done
);
...
...
@@ -558,6 +558,7 @@ static int spi_ppc4xx_of_remove(struct platform_device *op)
free_irq
(
hw
->
irqnum
,
hw
);
iounmap
(
hw
->
regs
);
free_gpios
(
hw
);
spi_master_put
(
master
);
return
0
;
}
...
...
drivers/spi/spi-s3c24xx.c
View file @
9270d827
...
...
@@ -524,7 +524,7 @@ static int s3c24xx_spi_probe(struct platform_device *pdev)
hw
=
spi_master_get_devdata
(
master
);
memset
(
hw
,
0
,
sizeof
(
struct
s3c24xx_spi
));
hw
->
master
=
spi_master_get
(
master
)
;
hw
->
master
=
master
;
hw
->
pdata
=
pdata
=
dev_get_platdata
(
&
pdev
->
dev
);
hw
->
dev
=
&
pdev
->
dev
;
...
...
drivers/spi/spi-sh-sci.c
View file @
9270d827
...
...
@@ -133,7 +133,7 @@ static int sh_sci_spi_probe(struct platform_device *dev)
sp
->
info
=
dev_get_platdata
(
&
dev
->
dev
);
/* setup spi bitbang adaptor */
sp
->
bitbang
.
master
=
spi_master_get
(
master
)
;
sp
->
bitbang
.
master
=
master
;
sp
->
bitbang
.
master
->
bus_num
=
sp
->
info
->
bus_num
;
sp
->
bitbang
.
master
->
num_chipselect
=
sp
->
info
->
num_chipselect
;
sp
->
bitbang
.
chipselect
=
sh_sci_spi_chipselect
;
...
...
drivers/spi/spi-sirf.c
View file @
9270d827
...
...
@@ -632,7 +632,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
if
(
ret
)
goto
free_master
;
sspi
->
bitbang
.
master
=
spi_master_get
(
master
)
;
sspi
->
bitbang
.
master
=
master
;
sspi
->
bitbang
.
chipselect
=
spi_sirfsoc_chipselect
;
sspi
->
bitbang
.
setup_transfer
=
spi_sirfsoc_setup_transfer
;
sspi
->
bitbang
.
txrx_bufs
=
spi_sirfsoc_transfer
;
...
...
drivers/spi/spi-xilinx.c
View file @
9270d827
...
...
@@ -372,7 +372,7 @@ static int xilinx_spi_probe(struct platform_device *pdev)
master
->
mode_bits
=
SPI_CPOL
|
SPI_CPHA
;
xspi
=
spi_master_get_devdata
(
master
);
xspi
->
bitbang
.
master
=
spi_master_get
(
master
)
;
xspi
->
bitbang
.
master
=
master
;
xspi
->
bitbang
.
chipselect
=
xilinx_spi_chipselect
;
xspi
->
bitbang
.
setup_transfer
=
xilinx_spi_setup_transfer
;
xspi
->
bitbang
.
txrx_bufs
=
xilinx_spi_txrx_bufs
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment