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


C++ regulator_has_full_constraints函数代码示例

本文整理汇总了C++中regulator_has_full_constraints函数的典型用法代码示例。如果您正苦于以下问题:C++ regulator_has_full_constraints函数的具体用法?C++ regulator_has_full_constraints怎么用?C++ regulator_has_full_constraints使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了regulator_has_full_constraints函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: msm8974_init

void __init msm8974_init(void)
{
    struct of_dev_auxdata *adata = msm8974_auxdata_lookup;

    if (socinfo_init() < 0)
        pr_err("%s: socinfo_init() failed\n", __func__);

    msm_8974_init_gpiomux();
    regulator_has_full_constraints();
    board_dt_populate(adata);
    msm8974_add_drivers();

#ifndef CONFIG_PANTECH_SNS_PIXART_VLED_PWR_CONTROLED_BY_DDF
    {
#define PWR_IRMOTION_3P3 102
        static unsigned irmotion_i2c_gpio_table[] = {
            GPIO_CFG(PWR_IRMOTION_3P3,0, GPIO_CFG_OUTPUT, GPIO_CFG_PULL_UP, GPIO_CFG_2MA),
        };
        int ret=0, i=0;

        printk("%s (%d) : gpio and pwr setting.\n", __func__, __LINE__);
        for(i=0; i<ARRAY_SIZE(irmotion_i2c_gpio_table); i++) {
            ret = gpio_tlmm_config(irmotion_i2c_gpio_table[i], GPIO_CFG_ENABLE);
            if(ret) {
                pr_err("%s:Failed irmotion_i2c_gpio_table gpio_tlmm_config(%d) = %d\n", __func__, i, ret);
                return;
            }
        }
        gpio_set_value(PWR_IRMOTION_3P3, 1);
    }
#endif
}
开发者ID:CertainlyT,项目名称:Time_Kernel-stock-VEGA-LTE-A-,代码行数:32,代码来源:board-8974.c

示例2: shuttle_power_register_devices

/* Init power management unit of Tegra2 */
int __init shuttle_power_register_devices(void)
{
	int err;
	void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE);
	u32 pmc_ctrl;

	/* configure the power management controller to trigger PMU
	 * interrupts when low
	 */
	pmc_ctrl = readl(pmc + PMC_CTRL);
	writel(pmc_ctrl | PMC_CTRL_INTR_LOW, pmc + PMC_CTRL);

	err = i2c_register_board_info(4, shuttle_regulators, 1);
	if (err < 0) 
		pr_warning("Unable to initialize regulator\n");

	/* register the poweroff callback */
	pm_power_off = shuttle_power_off;		
	
	/* And the restart callback */
	tegra_setup_reboot();

	/* signal that power regulators have fully specified constraints */
	regulator_has_full_constraints();
	
	/* register all pm devices - This must come AFTER the registration of the TPS i2c interfase,
	   as we need the GPIO definitions exported by that driver */
	return platform_add_devices(shuttle_power_devices, ARRAY_SIZE(shuttle_power_devices));
}
开发者ID:Borkata,项目名称:adam-nv-3.1,代码行数:30,代码来源:board-shuttle-power.c

示例3: spitz_init

static void __init spitz_init(void)
{
	init_gpio_reset(SPITZ_GPIO_ON_RESET, 1, 0);
	pm_power_off = spitz_poweroff;

	PMCR = 0x00;

	/* Stop 3.6MHz and drive HIGH to PCMCIA and CS */
	PCFR |= PCFR_OPDE;

	pxa2xx_mfp_config(ARRAY_AND_SIZE(spitz_pin_config));

	pxa_set_ffuart_info(NULL);
	pxa_set_btuart_info(NULL);
	pxa_set_stuart_info(NULL);

	spitz_spi_init();
	spitz_scoop_init();
	spitz_mkp_init();
	spitz_keys_init();
	spitz_leds_init();
	spitz_mmc_init();
	spitz_pcmcia_init();
	spitz_irda_init();
	spitz_uhc_init();
	spitz_lcd_init();
	spitz_nor_init();
	spitz_nand_init();
	spitz_i2c_init();
	spitz_audio_init();

	regulator_has_full_constraints();
}
开发者ID:Artox,项目名称:linux,代码行数:33,代码来源:spitz.c

示例4: mop500_init_machine

static void __init mop500_init_machine(void)
{
	struct device *parent = NULL;
	int i2c0_devs;
	int i;

	mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;

	mop500_pinmaps_init();
	parent = u8500_init_devices(&ab8500_platdata);

	for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
		mop500_platform_devs[i]->dev.parent = parent;

	platform_add_devices(mop500_platform_devs,
			ARRAY_SIZE(mop500_platform_devs));

	mop500_i2c_init(parent);
	mop500_sdi_init(parent);
	mop500_spi_init(parent);
	mop500_audio_init(parent);
	mop500_uart_init(parent);

	u8500_cryp1_hash1_init(parent);

	i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);

	i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
	i2c_register_board_info(2, mop500_i2c2_devices,
				ARRAY_SIZE(mop500_i2c2_devices));

	/* This board has full regulator constraints */
	regulator_has_full_constraints();
}
开发者ID:DJHartley,项目名称:linux,代码行数:34,代码来源:board-mop500.c

示例5: cm_x300_init

static void __init cm_x300_init(void)
{
	cm_x300_init_mfp();

	pxa_set_btuart_info(NULL);
	pxa_set_stuart_info(NULL);
	if (cpu_is_pxa300())
		pxa_set_ffuart_info(NULL);

	cm_x300_init_da9030();
	cm_x300_init_dm9000();
	cm_x300_init_lcd();
	cm_x300_init_u2d();
	cm_x300_init_ohci();
	cm_x300_init_mmc();
	cm_x300_init_nand();
	cm_x300_init_leds();
	cm_x300_init_i2c();
	cm_x300_init_spi();
	cm_x300_init_rtc();
	cm_x300_init_ac97();
	cm_x300_init_wi2wi();
	cm_x300_init_bl();

	regulator_has_full_constraints();
}
开发者ID:0-T-0,项目名称:ps4-linux,代码行数:26,代码来源:cm-x300.c

示例6: snowball_init_machine

static void __init snowball_init_machine(void)
{
	struct device *parent = NULL;
	int i;

	platform_device_register(&db8500_prcmu_device);

	sdi0_reg_info.enable_gpio = SNOWBALL_SDMMC_EN_GPIO;
	sdi0_reg_info.gpios[0].gpio = SNOWBALL_SDMMC_1V8_3V_GPIO;

	snowball_pinmaps_init();
	parent = u8500_init_devices();

	for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
		snowball_platform_devs[i]->dev.parent = parent;

	platform_add_devices(snowball_platform_devs,
			ARRAY_SIZE(snowball_platform_devs));

	mop500_i2c_init(parent);
	snowball_sdi_init(parent);
	mop500_spi_init(parent);
	mop500_audio_init(parent);
	mop500_uart_init(parent);

	u8500_cryp1_hash1_init(parent);

	/* This board has full regulator constraints */
	regulator_has_full_constraints();
}
开发者ID:03199618,项目名称:linux,代码行数:30,代码来源:board-mop500.c

示例7: d2083_regulator_probe

static int d2083_regulator_probe(struct platform_device *pdev)
{
	struct regulator_dev *rdev;
	//struct d2083 *d2083 = dev_get_drvdata(&pdev->dev); // platform_get_drvdata(pdev);

	if (pdev->id < D2083_BUCK_1 || pdev->id >= D2083_NUMBER_OF_REGULATORS)
		return -ENODEV;

	/* register regulator */
	rdev = regulator_register(&d2083_reg[pdev->id], &pdev->dev,
				pdev->dev.platform_data,
				dev_get_drvdata(&pdev->dev));

	if (IS_ERR(rdev)) {
		dev_err(&pdev->dev, "failed to register %s\n",
			d2083_reg[pdev->id].name);
		return PTR_ERR(rdev);
	}

	d2083_rdev[pdev->id] = rdev;		/* rdev required for IOCTL support */

	regulator_has_full_constraints();

	return 0;
}
开发者ID:faizauthar12,项目名称:Hyper_kernel,代码行数:25,代码来源:d2083-regulator.c

示例8: hrefv60_init_machine

static void __init hrefv60_init_machine(void)
{
	struct device *parent = NULL;
	int i;

	platform_device_register(&db8500_prcmu_device);
	/*
	 * The HREFv60 board removed a GPIO expander and routed
	 * all these GPIO pins to the internal GPIO controller
	 * instead.
	 */
	mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;

	sdi0_reg_info.enable_gpio = HREFV60_SDMMC_EN_GPIO;
	sdi0_reg_info.gpios[0].gpio = HREFV60_SDMMC_1V8_3V_GPIO;

	hrefv60_pinmaps_init();
	parent = u8500_init_devices();

	for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
		mop500_platform_devs[i]->dev.parent = parent;

	platform_add_devices(mop500_platform_devs,
			ARRAY_SIZE(mop500_platform_devs));

	mop500_i2c_init(parent);
	hrefv60_sdi_init(parent);
	mop500_spi_init(parent);
	mop500_audio_init(parent);
	mop500_uart_init(parent);

	/* This board has full regulator constraints */
	regulator_has_full_constraints();
}
开发者ID:03199618,项目名称:linux,代码行数:34,代码来源:board-mop500.c

示例9: n1_regulator_init

int __init n1_regulator_init(void)
{
	void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE);
	u32 pmc_ctrl;

	/* configure the power management controller to trigger PMU
	 * interrupts when low */
	pmc_ctrl = readl(pmc + PMC_CTRL);
	writel(pmc_ctrl | PMC_CTRL_INTR_LOW, pmc + PMC_CTRL);

	i2c_register_board_info(4, n1_regulators, ARRAY_SIZE(n1_regulators));

#ifdef CONFIG_SAMSUNG_LPM_MODE
	extern int charging_mode_from_boot;

	if (!charging_mode_from_boot) {
		n1_suspend_data.wake_enb |= (TEGRA_WAKE_GPIO_PW2 | TEGRA_WAKE_GPIO_PV2 | TEGRA_WAKE_GPIO_PW3 | TEGRA_WAKE_GPIO_PV3);
		n1_suspend_data.wake_low |= TEGRA_WAKE_GPIO_PW2;
		n1_suspend_data.wake_any |= (TEGRA_WAKE_GPIO_PV2 | TEGRA_WAKE_GPIO_PW3 | TEGRA_WAKE_GPIO_PV3);
	}
#else
	n1_suspend_data.wake_enb |= (TEGRA_WAKE_GPIO_PW2 | TEGRA_WAKE_GPIO_PV2 | TEGRA_WAKE_GPIO_PW3 | TEGRA_WAKE_GPIO_PV3);
	n1_suspend_data.wake_low |= TEGRA_WAKE_GPIO_PW2;
	n1_suspend_data.wake_any |= (TEGRA_WAKE_GPIO_PV2 | TEGRA_WAKE_GPIO_PW3 | TEGRA_WAKE_GPIO_PV3);
#endif

	regulator_has_full_constraints();
	tegra_init_suspend(&n1_suspend_data);
	return 0;
}
开发者ID:UnknownzD,项目名称:I9103_XW_Kernel,代码行数:30,代码来源:board-n1-power.c

示例10: hx4700_init

static void __init hx4700_init(void)
{
	int ret;

	PCFR = PCFR_GPR_EN | PCFR_OPDE;

	pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config));
	gpio_set_wake(GPIO12_HX4700_ASIC3_IRQ, 1);
	ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios));
	if (ret)
		pr_err ("hx4700: Failed to request GPIOs.\n");

	pxa_set_ffuart_info(NULL);
	pxa_set_btuart_info(NULL);
	pxa_set_stuart_info(NULL);

	platform_add_devices(devices, ARRAY_SIZE(devices));
	pwm_add_table(hx4700_pwm_lookup, ARRAY_SIZE(hx4700_pwm_lookup));

	pxa_set_ficp_info(&ficp_info);
	pxa27x_set_i2c_power_info(NULL);
	pxa_set_i2c_info(NULL);
	i2c_register_board_info(0, ARRAY_AND_SIZE(i2c_board_info));
	i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info));
	pxa2xx_set_spi_info(2, &pxa_ssp2_master_info);
	spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info));

	gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 0);
	mdelay(10);
	gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 1);
	mdelay(10);

	regulator_has_full_constraints();
}
开发者ID:0x000000FF,项目名称:Linux4Edison,代码行数:34,代码来源:hx4700.c

示例11: snowball_init_machine

static void __init snowball_init_machine(void)
{
	struct device *parent = NULL;
	int i2c0_devs;
	int i;

	parent = u8500_init_devices();

	snowball_pins_init();

	for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
		snowball_platform_devs[i]->dev.parent = parent;

	platform_add_devices(snowball_platform_devs,
			ARRAY_SIZE(snowball_platform_devs));

	mop500_i2c_init(parent);
	snowball_sdi_init(parent);
	mop500_spi_init(parent);
	mop500_uart_init(parent);

	i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
	i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
	i2c_register_board_info(2, mop500_i2c2_devices,
				ARRAY_SIZE(mop500_i2c2_devices));

	/* This board has full regulator constraints */
	regulator_has_full_constraints();
}
开发者ID:davidmueller13,项目名称:valexKernel-lt03wifi,代码行数:29,代码来源:board-mop500.c

示例12: htc_8974_init

void __init htc_8974_init(void)
{
	struct of_dev_auxdata *adata = htc_8974_auxdata_lookup;

	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);

	pr_info("%s: pid=%d, pcbid=%d, socver=0x%x\n", __func__
		, of_machine_pid(), of_machine_pcbid(), of_machine_socver());

	msm_htc_8974_init_gpiomux();
	regulator_has_full_constraints();
	board_dt_populate(adata);
	htc_8974_add_drivers();
#ifdef CONFIG_HTC_BUILD_EDIAG
	platform_device_register(&android_pmem_ediag_device);
	platform_device_register(&android_pmem_ediag1_device);
	platform_device_register(&android_pmem_ediag2_device);
	platform_device_register(&android_pmem_ediag3_device);
#endif
#ifdef CONFIG_BT
	bt_export_bd_address();
#endif
#ifdef CONFIG_PERFLOCK
	platform_device_register(&msm8974_device_perf_lock);
#endif
#ifdef CONFIG_HTC_POWER_DEBUG
	htc_monitor_init();
#endif
}
开发者ID:MiniBlu,项目名称:cm11_kernel_htc_msm8974a3ul,代码行数:30,代码来源:board-htc-8974.c

示例13: poodle_init

static void __init poodle_init(void)
{
	int ret = 0;

	pm_power_off = poodle_poweroff;

	PCFR |= PCFR_OPDE;

	pxa2xx_mfp_config(ARRAY_AND_SIZE(poodle_pin_config));

	pxa_set_ffuart_info(NULL);
	pxa_set_btuart_info(NULL);
	pxa_set_stuart_info(NULL);

	platform_scoop_config = &poodle_pcmcia_config;

	ret = platform_add_devices(devices, ARRAY_SIZE(devices));
	if (ret)
		pr_warning("poodle: Unable to register LoCoMo device\n");

	pxa_set_fb_info(&poodle_locomo_device.dev, &poodle_fb_info);
	pxa_set_udc_info(&udc_info);
	pxa_set_mci_info(&poodle_mci_platform_data);
	pxa_set_ficp_info(&poodle_ficp_platform_data);
	pxa_set_i2c_info(NULL);
	i2c_register_board_info(0, ARRAY_AND_SIZE(poodle_i2c_devices));
	poodle_init_spi();
	regulator_has_full_constraints();
}
开发者ID:AdaLovelance,项目名称:lxcGrsecKernels,代码行数:29,代码来源:poodle.c

示例14: hrefv60_init_machine

static void __init hrefv60_init_machine(void)
{
	int i2c0_devs;

	/*
	 * The HREFv60 board removed a GPIO expander and routed
	 * all these GPIO pins to the internal GPIO controller
	 * instead.
	 */
	mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;

	u8500_init_devices();

	hrefv60_pins_init();

	platform_add_devices(mop500_platform_devs,
			ARRAY_SIZE(mop500_platform_devs));

	mop500_i2c_init();
	hrefv60_sdi_init();
	mop500_spi_init();
	mop500_uart_init();

	i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);

	i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;

	i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
	i2c_register_board_info(2, mop500_i2c2_devices,
				ARRAY_SIZE(mop500_i2c2_devices));

	/* This board has full regulator constraints */
	regulator_has_full_constraints();
}
开发者ID:chrisglass,项目名称:linux,代码行数:34,代码来源:board-mop500.c

示例15: mop500_init_machine

static void __init mop500_init_machine(void)
{
	int i2c0_devs;

	mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;

	u8500_init_devices();

	mop500_pins_init();

	platform_add_devices(mop500_platform_devs,
			ARRAY_SIZE(mop500_platform_devs));

	mop500_i2c_init();
	mop500_sdi_init();
	mop500_spi_init();
	mop500_uart_init();

	i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);

	i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
	i2c_register_board_info(2, mop500_i2c2_devices,
				ARRAY_SIZE(mop500_i2c2_devices));

	/* This board has full regulator constraints */
	regulator_has_full_constraints();
}
开发者ID:chrisglass,项目名称:linux,代码行数:27,代码来源:board-mop500.c


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