{
struct ar71xx_spi *sp = spidev_to_sp(spi);
{
struct ar71xx_spi *sp = spidev_to_sp(spi);
if (spi->chip_select) {
unsigned long gpio = (unsigned long) spi->controller_data;
int status = 0;
if (spi->chip_select) {
unsigned long gpio = (unsigned long) spi->controller_data;
int status = 0;
static void pb44_spi_cleanup_cs(struct spi_device *spi)
{
static void pb44_spi_cleanup_cs(struct spi_device *spi)
{
- struct ar71xx_spi *sp = spidev_to_sp(spi);
-
if (spi->chip_select) {
unsigned long gpio = (unsigned long) spi->controller_data;
gpio_free(gpio);
}
if (spi->chip_select) {
unsigned long gpio = (unsigned long) spi->controller_data;
gpio_free(gpio);
}
-
- pb44_spi_disable(sp);
}
static int pb44_spi_setup(struct spi_device *spi)
}
static int pb44_spi_setup(struct spi_device *spi)
ret = spi_bitbang_start(&sp->bitbang);
if (!ret)
return 0;
ret = spi_bitbang_start(&sp->bitbang);
if (!ret)
return 0;
iounmap(sp->base);
err1:
platform_set_drvdata(pdev, NULL);
iounmap(sp->base);
err1:
platform_set_drvdata(pdev, NULL);
struct ar71xx_spi *sp = platform_get_drvdata(pdev);
spi_bitbang_stop(&sp->bitbang);
struct ar71xx_spi *sp = platform_get_drvdata(pdev);
spi_bitbang_stop(&sp->bitbang);
iounmap(sp->base);
platform_set_drvdata(pdev, NULL);
spi_master_put(sp->bitbang.master);
iounmap(sp->base);
platform_set_drvdata(pdev, NULL);
spi_master_put(sp->bitbang.master);