本文整理汇总了C++中REGULATOR_SUPPLY函数的典型用法代码示例。如果您正苦于以下问题:C++ REGULATOR_SUPPLY函数的具体用法?C++ REGULATOR_SUPPLY怎么用?C++ REGULATOR_SUPPLY使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了REGULATOR_SUPPLY函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: REGULATOR_SUPPLY
#include "board-enterprise.h"
#include "pm.h"
#include "wakeups-t3.h"
#include "tegra3_tsensor.h"
#define PMC_CTRL 0x0
#define PMC_CTRL_INTR_LOW (1 << 17)
#define PMC_DPD_PADS_ORIDE 0x01c
#define PMC_DPD_PADS_ORIDE_BLINK (1 << 20)
static bool is_enterprise_machine = false;
/************************ TPS80031 based regulator ****************/
static struct regulator_consumer_supply tps80031_vio_supply_a02[] = {
REGULATOR_SUPPLY("vio_1v8", NULL),
REGULATOR_SUPPLY("avdd_osc", NULL),
REGULATOR_SUPPLY("vddio_sys", NULL),
REGULATOR_SUPPLY("vddio_uart", NULL),
REGULATOR_SUPPLY("pwrdet_uart", NULL),
REGULATOR_SUPPLY("vddio_lcd", NULL),
REGULATOR_SUPPLY("pwrdet_lcd", NULL),
REGULATOR_SUPPLY("vddio_audio", NULL),
REGULATOR_SUPPLY("pwrdet_audio", NULL),
REGULATOR_SUPPLY("vddio_bb", NULL),
REGULATOR_SUPPLY("pwrdet_bb", NULL),
REGULATOR_SUPPLY("vddio_gmi", NULL),
REGULATOR_SUPPLY("avdd_usb_pll", NULL),
REGULATOR_SUPPLY("vddio_cam", NULL),
REGULATOR_SUPPLY("pwrdet_cam", NULL),
REGULATOR_SUPPLY("vddio_sdmmc1", NULL),
示例2: defined
/* Fucking Power Key... */
#include <linux/interrupt.h>
#include <linux/input.h>
static struct input_dev *max77663_pwrkey; // Fucking Power Key
#endif
#define PMC_CTRL 0x0
#define PMC_CTRL_INTR_LOW (1 << 17)
/************************ TPS80031 based regulator ****************/
#if defined(CONFIG_REGULATOR_TPS80031)
static struct regulator_consumer_supply tps80031_vio_supply[] = {
REGULATOR_SUPPLY("avdd_osc", NULL),
REGULATOR_SUPPLY("avdd_usb_pll", NULL),
REGULATOR_SUPPLY("avdd_hdmi_pll", NULL),
REGULATOR_SUPPLY("vddio_audio", NULL),
REGULATOR_SUPPLY("vddio_lcd", NULL),
REGULATOR_SUPPLY("vddio_cam", NULL),
REGULATOR_SUPPLY("vddio_uart", NULL),
REGULATOR_SUPPLY("vddio_bb", NULL),
REGULATOR_SUPPLY("vddio_sdmmc1", NULL),
REGULATOR_SUPPLY("vddio_sdmmc4", NULL),
REGULATOR_SUPPLY("vddio_sys", NULL),
REGULATOR_SUPPLY("vddio_gmi", NULL),
REGULATOR_SUPPLY("vddio_sd_slot", NULL),
};
示例3: omap_ethernet_init
static int __init omap_ethernet_init(void)
{
int status;
/* Request of GPIO lines */
status = gpio_request_array(sdp4430_eth_gpios,
ARRAY_SIZE(sdp4430_eth_gpios));
if (status)
pr_err("Cannot request ETH GPIOs\n");
return status;
}
static struct regulator_consumer_supply sdp4430_vbat_supply[] = {
REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"),
REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"),
};
static struct regulator_init_data sdp4430_vbat_data = {
.constraints = {
.always_on = 1,
},
.num_consumer_supplies = ARRAY_SIZE(sdp4430_vbat_supply),
.consumer_supplies = sdp4430_vbat_supply,
};
static struct fixed_voltage_config sdp4430_vbat_pdata = {
.supply_name = "VBAT",
.microvolts = 3750000,
.init_data = &sdp4430_vbat_data,
示例4: PCOM_VREG_NCP
#define PCOM_VREG_LDO PCOM_VREG_SMP
#define PCOM_VREG_NCP(_name, _id, _supply, _min_uV, _max_uV, _rise_time, \
_always_on, _boot_on, _apply_uV, _supply_uV) \
{ \
.init_data = PCOM_VREG_INIT_DATA(_name, _supply, -(_min_uV), \
-(_max_uV), _always_on, _boot_on, _apply_uV, _supply_uV), \
.id = _id, \
.rise_time = _rise_time, \
.pulldown = -1, \
.negative = 1, \
}
PCOM_VREG_CONSUMERS(smps1) = {
REGULATOR_SUPPLY("smps1", NULL),
REGULATOR_SUPPLY("msmc1", NULL),
};
PCOM_VREG_CONSUMERS(smps2) = {
REGULATOR_SUPPLY("smps2", NULL),
REGULATOR_SUPPLY("msmc2", NULL),
};
PCOM_VREG_CONSUMERS(smps3) = {
REGULATOR_SUPPLY("smps3", NULL),
REGULATOR_SUPPLY("msme1", NULL),
REGULATOR_SUPPLY("vcc_i2c", "1-004a"),
REGULATOR_SUPPLY("vcc_i2c", "1-0038"),
};
示例5: gpio_export
gpio_export(gpio, 0);
gpio = S5PV210_GPJ0(5); /* XMSMADDR_5 */
gpio_request(gpio, "TSP_INT");
s5p_register_gpio_interrupt(gpio);
s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
i2c2_devs[0].irq = gpio_to_irq(gpio);
}
/* MAX8998 regulators */
#if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE)
static struct regulator_consumer_supply goni_ldo3_consumers[] = {
REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"),
};
static struct regulator_consumer_supply goni_ldo5_consumers[] = {
REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
};
static struct regulator_consumer_supply goni_ldo8_consumers[] = {
REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"),
};
static struct regulator_consumer_supply goni_ldo11_consumers[] = {
REGULATOR_SUPPLY("vddio", "0-0030"), /* "CAM_IO_2.8V" */
};
static struct regulator_consumer_supply goni_ldo13_consumers[] = {
示例6: defined
#define OVERO_GPIO_PENDOWN 114
#define OVERO_GPIO_BT_NRESET 164
#define OVERO_GPIO_USBH_CPEN 168
#define OVERO_GPIO_USBH_NRESET 183
#define OVERO_SMSC911X_CS 5
#define OVERO_SMSC911X_GPIO 176
#define OVERO_SMSC911X2_CS 4
#define OVERO_SMSC911X2_GPIO 65
#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
/* fixed regulator for ads7846 */
static struct regulator_consumer_supply ads7846_supply[] = {
REGULATOR_SUPPLY("vcc", "spi1.0"),
};
static struct regulator_init_data vads7846_regulator = {
.constraints = {
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(ads7846_supply),
.consumer_supplies = ads7846_supply,
};
static struct fixed_voltage_config vads7846 = {
.supply_name = "vads7846",
.microvolts = 3300000, /* 3.3V */
.gpio = -EINVAL,
.startup_delay = 0,
示例7: pcf8575_cir_enable
//.........这里部分代码省略.........
case FVID2_STD_VGA_72:
case FVID2_STD_VGA_75:
case FVID2_STD_VGA_85:
filter_sel = 0x02u; /* Filter2: 1, Filter1: 0 */
break;
case FVID2_STD_NTSC:
case FVID2_STD_PAL:
case FVID2_STD_480I:
case FVID2_STD_576I:
case FVID2_STD_D1:
filter_sel = 0x00u; /* Filter2: 0, Filter1: 0 */
break;
default:
filter_sel = 0x01u; /* Filter2: 0, Filter1: 1 */
break;
}
pcf8575_port[0] |=
(filter_sel << VPS_VC_IO_EXP_THS7368_FILTER_SHIFT);
msg.buf = pcf8575_port;
ret = (i2c_transfer(pcf8575_client->adapter, &msg, 1));
if (ret < 0) {
printk(KERN_ERR "I2C: Transfer failed at %s %d with error code: %d\n",
__func__, __LINE__, ret);
return ret;
}
return 0;
}
EXPORT_SYMBOL(vps_ti814x_set_tvp7002_filter);
/* Touchscreen platform data */
static struct qt602240_platform_data ts_platform_data = {
.x_line = 18,
.y_line = 12,
.x_size = 800,
.y_size = 480,
.blen = 0x01,
.threshold = 30,
.voltage = 2800000,
.orient = QT602240_HORIZONTAL_FLIP,
};
static struct at24_platform_data eeprom_info = {
.byte_len = (256*1024) / 8,
.page_size = 64,
.flags = AT24_FLAG_ADDR16,
};
static struct regulator_consumer_supply ti8148evm_mpu_supply =
REGULATOR_SUPPLY("mpu", NULL);
/*
* DM814x/AM387x (TI814x) devices have restriction that none of the supply to
* the device should be turned of.
*
* NOTE: To prevent turning off regulators not explicitly consumed by drivers
* depending on it, ensure following:
* 1) Set always_on = 1 for them OR
* 2) Avoid calling regulator_has_full_constraints()
*
* With just (2), there will be a warning about incomplete constraints.
* E.g., "regulator_init_complete: incomplete constraints, leaving LDO8 on"
*
* In either cases, the supply won't be disabled.
*
* We are taking approach (1).
*/
static struct regulator_init_data tps65911_reg_data[] = {
/* VRTC */
{
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
REGULATOR_CHANGE_STATUS,
.always_on = 1,
},
},
/* VIO -VDDA 1.8V */
{
.constraints = {
.min_uV = 1500000,
.max_uV = 1500000,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
REGULATOR_CHANGE_STATUS,
.always_on = 1,
},
},
/* VDD1 - MPU */
{
.constraints = {
.min_uV = 600000,
.max_uV = 1500000,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
.always_on = 1,
},
.num_consumer_supplies = 1,
.consumer_supplies = &ti8148evm_mpu_supply,
},
示例8: GPIO_KEY
static struct gpio_keys_button gpio_buttons[] = {
GPIO_KEY(KEY_4, RCAR_GP_PIN(1, 28), "SW2-pin4"),
GPIO_KEY(KEY_3, RCAR_GP_PIN(1, 26), "SW2-pin3"),
GPIO_KEY(KEY_2, RCAR_GP_PIN(1, 24), "SW2-pin2"),
GPIO_KEY(KEY_1, RCAR_GP_PIN(1, 14), "SW2-pin1"),
};
static const struct gpio_keys_platform_data lager_keys_pdata __initconst = {
.buttons = gpio_buttons,
.nbuttons = ARRAY_SIZE(gpio_buttons),
};
/* Fixed 3.3V regulator to be used by MMCIF */
static struct regulator_consumer_supply fixed3v3_power_consumers[] =
{
REGULATOR_SUPPLY("vmmc", "sh_mmcif.1"),
};
/*
* SDHI regulator macro
*
** FIXME**
* Lager board vqmmc is provided via DA9063 PMIC chip,
* and we should use ${LINK}/drivers/mfd/da9063-* driver for it.
* but, it doesn't have regulator support at this point.
* It uses gpio-regulator for vqmmc as quick-hack.
*/
#define SDHI_REGULATOR(idx, vdd_pin, vccq_pin) \
static struct regulator_consumer_supply vcc_sdhi##idx##_consumer = \
REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi." #idx); \
\
示例9: ARRAY_SIZE
.buttons = gpio_buttons,
.nbuttons = ARRAY_SIZE(gpio_buttons),
};
static struct platform_device gpio_keys_device = {
.name = "gpio-keys",
.id = -1,
.dev = {
.platform_data = &gpio_key_info,
},
};
/* Fixed 3.3V regulator to be used by SDHI0, SDHI1, MMCIF */
static struct regulator_consumer_supply fixed3v3_power_consumers[] =
{
REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
REGULATOR_SUPPLY("vmmc", "sh_mmcif"),
REGULATOR_SUPPLY("vqmmc", "sh_mmcif"),
};
/* SDHI0 */
/*
* FIXME
*
* It use polling mode here, since
* CD (= Card Detect) pin is not connected to SDHI0_CD.
* We can use IRQ31 as card detect irq,
* but it needs chattering removal operation
示例10: ek_add_device_buttons
static void __init ek_add_device_buttons(void) {}
#endif
/*
* ADCs
*/
static struct at91_adc_data ek_adc_data = {
.channels_used = BIT(0) | BIT(1) | BIT(2) | BIT(3),
.use_external_triggers = true,
.vref = 3300,
};
#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
static struct regulator_consumer_supply ek_audio_consumer_supplies[] = {
REGULATOR_SUPPLY("AVDD", "0-001b"),
REGULATOR_SUPPLY("HPVDD", "0-001b"),
REGULATOR_SUPPLY("DBVDD", "0-001b"),
REGULATOR_SUPPLY("DCVDD", "0-001b"),
};
static struct regulator_init_data ek_avdd_reg_init_data = {
.constraints = {
.name = "3V3",
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
.consumer_supplies = ek_audio_consumer_supplies,
.num_consumer_supplies = ARRAY_SIZE(ek_audio_consumer_supplies),
};
static struct fixed_voltage_config ek_vdd_pdata = {
示例11: VREG_CONSUMERS
*/
#include <linux/regulator/pm8xxx-regulator.h>
#include "board-awifi.h"
#define VREG_CONSUMERS(_id) \
static struct regulator_consumer_supply vreg_consumers_##_id[]
/* Regulators that are present when using either PM8921 or PM8917 */
/*
* Consumer specific regulator names:
* regulator name consumer dev_name
*/
VREG_CONSUMERS(L1) = {
REGULATOR_SUPPLY("8921_l1", NULL),
};
VREG_CONSUMERS(L2) = {
REGULATOR_SUPPLY("8921_l2", NULL),
REGULATOR_SUPPLY("dsi_vdda", "mipi_dsi.1"),
REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.0"),
REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.1"),
REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.2"),
REGULATOR_SUPPLY("lvds_pll_vdda", "lvds.0"),
REGULATOR_SUPPLY("dsi1_pll_vdda", "mipi_dsi.1"),
REGULATOR_SUPPLY("HRD_VDDD_CDC_D", "tabla2x-slim"),
REGULATOR_SUPPLY("HRD_CDC_VDDA_A_1P2V", "tabla2x-slim"),
REGULATOR_SUPPLY("dsi_pll_vdda", "mdp.0"),
};
VREG_CONSUMERS(L3) = {
REGULATOR_SUPPLY("8921_l3", NULL),
示例12: defined
#include <plat/gpio-cfg.h>
#include <mach/irqs.h>
#include <mach/hs-iic.h>
#if defined(CONFIG_MFD_MAX77802)
#include <linux/mfd/max77802.h>
#endif
#include "board-universal5410.h"
#if defined(CONFIG_REGULATOR_MAX77802)
/* max77802 */
static struct regulator_consumer_supply max77802_buck1 =
REGULATOR_SUPPLY("vdd_mif", NULL);
static struct regulator_consumer_supply max77802_buck2 =
REGULATOR_SUPPLY("vdd_arm", NULL);
static struct regulator_consumer_supply max77802_buck3 =
REGULATOR_SUPPLY("vdd_int", NULL);
static struct regulator_consumer_supply max77802_buck4 =
REGULATOR_SUPPLY("vdd_g3d", NULL);
static struct regulator_consumer_supply max77802_buck6 =
REGULATOR_SUPPLY("vdd_kfc", NULL);
static struct regulator_consumer_supply ldo2_supply[] = {
REGULATOR_SUPPLY("vmem2_1.2v_ap", NULL),
示例13: VREG_CONSUMERS
#include "board-8064.h"
#ifdef CONFIG_REGULATOR_MAX77693
#include <linux/mfd/max77693.h>
#endif
#define VREG_CONSUMERS(_id) \
static struct regulator_consumer_supply vreg_consumers_##_id[]
/* Regulators that are present when using either PM8921 or PM8917 */
/*
* Consumer specific regulator names:
* regulator name consumer dev_name
*/
VREG_CONSUMERS(L1) = {
REGULATOR_SUPPLY("8921_l1", NULL),
};
VREG_CONSUMERS(L2) = {
REGULATOR_SUPPLY("8921_l2", NULL),
REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.0"),
REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.1"),
REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.2"),
REGULATOR_SUPPLY("lvds_pll_vdda", "lvds.0"),
REGULATOR_SUPPLY("dsi1_pll_vdda", "mipi_dsi.1"),
REGULATOR_SUPPLY("HRD_VDDD_CDC_D", "tabla2x-slim"),
REGULATOR_SUPPLY("HRD_CDC_VDDA_A_1P2V", "tabla2x-slim"),
};
VREG_CONSUMERS(L3) = {
REGULATOR_SUPPLY("8921_l3", NULL),
REGULATOR_SUPPLY("HSUSB_3p3", "msm_otg"),
REGULATOR_SUPPLY("HSUSB_3p3", "msm_ehci_host.0"),
示例14: REGULATOR_SUPPLY
static struct sht15_platform_data platform_data_sht15 = {
.gpio_data = 100,
.gpio_sck = 98,
};
static struct platform_device sht15 = {
.name = "sht15",
.id = -1,
.dev = {
.platform_data = &platform_data_sht15,
},
};
static struct regulator_consumer_supply stargate2_sensor_3_con[] = {
REGULATOR_SUPPLY("vcc", "sht15"),
};
enum stargate2_ldos{
vcc_vref,
vcc_cc2420,
/* a mote connector? */
vcc_mica,
/* the CSR bluecore chip */
vcc_bt,
/* The two voltages available to sensor boards */
vcc_sensor_1_8,
vcc_sensor_3,
/* directly connected to the pxa27x */
vcc_sram_ext,
vcc_pxa_pll,
示例15: ARRAY_SIZE
}, \
.num_consumer_supplies = \
ARRAY_SIZE(vreg_consumers_##_id), \
.consumer_supplies = vreg_consumers_##_id, \
}, \
.regulator_name = _reg_name, \
.active_low = _active_low, \
.gpio_label = _gpio_label, \
.gpio = _gpio, \
}
#define GPIO_VREG_ID_EXT_2P85V 0
#define GPIO_VREG_ID_EXT_1P8V 1
static struct regulator_consumer_supply vreg_consumers_EXT_2P85V[] = {
REGULATOR_SUPPLY("cam_ov5647_avdd", "0-006c"),
REGULATOR_SUPPLY("cam_ov5647_truly_cm6868_avdd", "0-006c"),
REGULATOR_SUPPLY("cam_ov7692_avdd", "0-0078"),
REGULATOR_SUPPLY("cam_ov8825_avdd", "0-000d"),
REGULATOR_SUPPLY("lcd_vdd", "mipi_dsi.1"),
#ifdef CONFIG_AR0543
REGULATOR_SUPPLY("cam_ar0543_avdd", "0-0064"),
#endif
};
static struct regulator_consumer_supply vreg_consumers_EXT_1P8V[] = {
REGULATOR_SUPPLY("cam_ov5647_vdd", "0-006c"),
REGULATOR_SUPPLY("cam_ov5647_truly_cm6868_vdd", "0-006c"),
REGULATOR_SUPPLY("cam_ov7692_vdd", "0-0078"),
REGULATOR_SUPPLY("cam_ov8825_vdd", "0-000d"),
REGULATOR_SUPPLY("lcd_vddi", "mipi_dsi.1"),