当前位置: 首页>>代码示例>>C++>>正文


C++ spi_bitbang_stop函数代码示例

本文整理汇总了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);
}
开发者ID:303750856,项目名称:linux-3.1,代码行数:26,代码来源:spi-butterfly.c

示例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;
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:27,代码来源:spi-imx.c

示例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;
}
开发者ID:mrtos,项目名称:Logitech-Revue,代码行数:34,代码来源:davinci_spi_master.c

示例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;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:9,代码来源:spi_s3c24xx_gpio.c

示例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;
}
开发者ID:IDM350,项目名称:linux,代码行数:9,代码来源:spi-s3c24xx.c

示例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;
}
开发者ID:AeroGirl,项目名称:VAR-SOM-AM33-SDK7-Kernel,代码行数:10,代码来源:spi-fsl-dspi.c

示例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;
}
开发者ID:mikuhatsune001,项目名称:linux2.6.32,代码行数:11,代码来源:spi-ath79.c

示例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;
}
开发者ID:Cribstone,项目名称:linino,代码行数:11,代码来源:ar71xx_spi.c

示例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);
}
开发者ID:robacklin,项目名称:uclinux-linux,代码行数:12,代码来源:spi-ath79.c

示例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;
}
开发者ID:Cool-Joe,项目名称:imx23-audio,代码行数:12,代码来源:spi-oc-tiny.c

示例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;
}
开发者ID:Felixneu,项目名称:Power-Management,代码行数:12,代码来源:spi-fsl-dspi.c

示例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);
}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:13,代码来源:spi-xilinx.c

示例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;
}
开发者ID:janfj,项目名称:dd-wrt,代码行数:13,代码来源:spi-ixp4xx-gw2355.c

示例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;
}
开发者ID:IRT-SystemX,项目名称:xvisor-next,代码行数:14,代码来源:spi-imx.c

示例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;
}
开发者ID:amalrajt,项目名称:linux-sh4-2.6.23.17_stm23_A18B,代码行数:14,代码来源:spi_stm_gpio.c


注:本文中的spi_bitbang_stop函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。