本文整理汇总了C++中spi_bitbang_stop函数的典型用法代码示例。如果您正苦于以下问题:C++ spi_bitbang_stop函数的具体用法?C++ spi_bitbang_stop怎么用?C++ spi_bitbang_stop使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了spi_bitbang_stop函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: butterfly_detach
static void butterfly_detach(struct parport *p)
{
struct butterfly *pp;
int status;
/* FIXME this global is ugly ... but, how to quickly get from
* the parport to the "struct butterfly" associated with it?
* "old school" driver-internal device lists?
*/
if (!butterfly || butterfly->port != p)
return;
pp = butterfly;
butterfly = NULL;
/* stop() unregisters child devices too */
status = spi_bitbang_stop(&pp->bitbang);
/* turn off VCC */
parport_write_data(pp->port, 0);
msleep(10);
parport_release(pp->pd);
parport_unregister_device(pp->pd);
(void) spi_master_put(pp->bitbang.master);
}
示例2: spi_imx_remove
static int __devexit spi_imx_remove(struct platform_device *pdev)
{
struct spi_master *master = platform_get_drvdata(pdev);
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
struct spi_imx_data *spi_imx = spi_master_get_devdata(master);
int i;
spi_bitbang_stop(&spi_imx->bitbang);
writel(0, spi_imx->base + MXC_CSPICTRL);
clk_disable(spi_imx->clk);
clk_put(spi_imx->clk);
free_irq(spi_imx->irq, spi_imx);
iounmap(spi_imx->base);
for (i = 0; i < master->num_chipselect; i++)
if (spi_imx->chipselect[i] >= 0)
gpio_free(spi_imx->chipselect[i]);
spi_master_put(master);
release_mem_region(res->start, resource_size(res));
platform_set_drvdata(pdev, NULL);
return 0;
}
示例3: davinci_spi_remove
/**
* davinci_spi_remove - remove function for SPI Master Controller
* @dev: platform_device structure which contains plateform specific data
*
* This function will do the reverse action of davinci_spi_probe function
* It will free the IRQ and SPI controller's memory region.
* It will also call spi_bitbang_stop to destroy the work queue which was
* created by spi_bitbang_start.
*/
static int __devexit davinci_spi_remove(struct device *d)
{
struct platform_device *dev =
container_of(d, struct platform_device, dev);
struct davinci_spi *davinci_spi;
struct spi_master *master;
struct davinci_spi_platform_data *pdata = dev->dev.platform_data;
master = dev_get_drvdata(&(dev)->dev);
davinci_spi = spi_master_get_devdata(master);
spi_bitbang_stop(&davinci_spi->bitbang);
kfree(davinci_spi->dma_channels);
clk_disable(pdata->clk_info);
clk_put(pdata->clk_info);
pdata->clk_info = NULL;
spi_master_put(master);
kfree(davinci_spi->tmp_buf);
free_irq(davinci_spi->irq, davinci_spi);
iounmap(davinci_spi->base);
release_mem_region(davinci_spi->pbase, davinci_spi->region_size);
return 0;
}
示例4: s3c2410_spigpio_remove
static int s3c2410_spigpio_remove(struct platform_device *dev)
{
struct s3c2410_spigpio *sp = platform_get_drvdata(dev);
spi_bitbang_stop(&sp->bitbang);
spi_master_put(sp->bitbang.master);
return 0;
}
示例5: s3c24xx_spi_remove
static int s3c24xx_spi_remove(struct platform_device *dev)
{
struct s3c24xx_spi *hw = platform_get_drvdata(dev);
spi_bitbang_stop(&hw->bitbang);
clk_disable(hw->clk);
spi_master_put(hw->master);
return 0;
}
示例6: dspi_remove
static int dspi_remove(struct platform_device *pdev)
{
struct fsl_dspi *dspi = platform_get_drvdata(pdev);
/* Disconnect from the SPI framework */
spi_bitbang_stop(&dspi->bitbang);
spi_master_put(dspi->bitbang.master);
return 0;
}
示例7: ath79_spi_remove
static int ath79_spi_remove(struct platform_device *pdev)
{
struct ath79_spi *sp = platform_get_drvdata(pdev);
spi_bitbang_stop(&sp->bitbang);
ath79_spi_disable(sp);
clk_disable(sp->clk);
spi_master_put(sp->bitbang.master);
return 0;
}
示例8: ar71xx_spi_remove
static int ar71xx_spi_remove(struct platform_device *pdev)
{
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);
return 0;
}
示例9: __ath79_spi_remove
static void __ath79_spi_remove(struct platform_device *pdev)
{
struct ath79_spi *sp = platform_get_drvdata(pdev);
spi_bitbang_stop(&sp->bitbang);
ath79_spi_disable(sp);
clk_disable(sp->clk);
clk_put(sp->clk);
iounmap(sp->base);
platform_set_drvdata(pdev, NULL);
spi_master_put(sp->bitbang.master);
}
示例10: tiny_spi_remove
static int tiny_spi_remove(struct platform_device *pdev)
{
struct tiny_spi *hw = platform_get_drvdata(pdev);
struct spi_master *master = hw->bitbang.master;
unsigned int i;
spi_bitbang_stop(&hw->bitbang);
for (i = 0; i < hw->gpio_cs_count; i++)
gpio_free(hw->gpio_cs[i]);
spi_master_put(master);
return 0;
}
示例11: dspi_remove
static int dspi_remove(struct platform_device *pdev)
{
struct spi_master *master = platform_get_drvdata(pdev);
struct fsl_dspi *dspi = spi_master_get_devdata(master);
/* Disconnect from the SPI framework */
spi_bitbang_stop(&dspi->bitbang);
clk_disable_unprepare(dspi->clk);
spi_master_put(dspi->bitbang.master);
return 0;
}
示例12: xilinx_spi_deinit
void xilinx_spi_deinit(struct spi_master *master)
{
struct xilinx_spi *xspi;
xspi = spi_master_get_devdata(master);
spi_bitbang_stop(&xspi->bitbang);
free_irq(xspi->irq, xspi);
iounmap(xspi->regs);
release_mem_region(xspi->mem.start, resource_size(&xspi->mem));
spi_master_put(xspi->bitbang.master);
}
示例13: spi_gpio_remove
static int spi_gpio_remove(struct platform_device *pdev)
{
struct spi_gpio *sp;
struct spi_gpio_platform_data *pdata;
pdata = pdev->dev.platform_data;
sp = platform_get_drvdata(pdev);
spi_bitbang_stop(&sp->bitbang);
spi_master_put(sp->bitbang.master);
return 0;
}
示例14: spi_imx_remove
static int spi_imx_remove(struct vmm_device *dev)
{
struct spi_master *master = vmm_devdrv_get_data(dev);
struct spi_imx_data *spi_imx = spi_master_get_devdata(master);
spi_bitbang_stop(&spi_imx->bitbang);
writel(0, spi_imx->base + MXC_CSPICTRL);
clk_disable_unprepare(spi_imx->clk_ipg);
clk_disable_unprepare(spi_imx->clk_per);
spi_master_put(master);
return 0;
}
示例15: spi_remove
static int spi_remove(struct platform_device *pdev)
{
struct ssc_pio_t *pio_info =
(struct ssc_pio_t *)pdev->dev.platform_data;
struct spi_stm_gpio *sp = platform_get_drvdata(pdev);
dgb_print("\n");
spi_bitbang_stop(&sp->bitbang);
spi_master_put(sp->bitbang.master);
stpio_free_pin(pio_info->clk);
stpio_free_pin(pio_info->sdout);
stpio_free_pin(pio_info->sdin);
return 0;
}