static struct regulator_init_data rx51_vintdig = { .constraints = { .name = "VINTDIG", .min_uV = 1500000, .max_uV = 1500000, .always_on = true, .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, .valid_ops_mask = REGULATOR_CHANGE_MODE, }, }; static struct gpiod_lookup_table rx51_fmtx_gpios_table = { .dev_id = "2-0063", .table = { GPIO_LOOKUP("gpio.6", 3, "reset", GPIO_ACTIVE_HIGH), /* 163 */ { }, }, }; static __init void rx51_gpio_init(void) { gpiod_add_lookup_table(&rx51_fmtx_gpios_table); } static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) { /* FIXME this gpio setup is just a placeholder for now */ gpio_request_one(gpio + 6, GPIOF_OUT_INIT_LOW, "backlight_pwm"); gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "speaker_en");
static struct platform_device pandora_vwlan_device = { .name = "reg-fixed-voltage", .id = 1, .dev = { .platform_data = &pandora_vwlan, }, }; static struct gpiod_lookup_table pandora_vwlan_gpiod_table = { .dev_id = "reg-fixed-voltage.1", .table = { /* * As this is a low GPIO number it should be at the first * GPIO bank. */ GPIO_LOOKUP("gpio-0-31", PANDORA_WIFI_NRESET_GPIO, NULL, GPIO_ACTIVE_HIGH), { }, }, }; static void pandora_wl1251_init_card(struct mmc_card *card) { /* * We have TI wl1251 attached to MMC3. Pass this information to * SDIO core because it can't be probed by normal methods. */ if (card->type == MMC_TYPE_SDIO || card->type == MMC_TYPE_SD_COMBO) { card->quirks |= MMC_QUIRK_NONSTD_SDIO; card->cccr.wide_bus = 1; card->cis.vendor = 0x104c; card->cis.device = 0x9066;
} else { chip->ecc.layout = &qi_lb60_ecclayout_1gb; *partitions = qi_lb60_partitions_1gb; *num_partitions = ARRAY_SIZE(qi_lb60_partitions_1gb); } } static struct jz_nand_platform_data qi_lb60_nand_pdata = { .ident_callback = qi_lb60_nand_ident, .banks = { 1 }, }; static struct gpiod_lookup_table qi_lb60_nand_gpio_table = { .dev_id = "jz4740-nand.0", .table = { GPIO_LOOKUP("Bank C", 30, "busy", 0), { }, }, }; /* Keyboard*/ #define KEY_QI_QI KEY_F13 #define KEY_QI_UPRED KEY_RIGHTALT #define KEY_QI_VOLUP KEY_VOLUMEUP #define KEY_QI_VOLDOWN KEY_VOLUMEDOWN #define KEY_QI_FN KEY_LEFTCTRL static const uint32_t qi_lb60_keymap[] = { KEY(0, 0, KEY_F1), /* S2 */
static struct platform_device migor_ceu_device = { .name = "renesas-ceu", .id = 0, /* ceu.0 */ .num_resources = ARRAY_SIZE(migor_ceu_resources), .resource = migor_ceu_resources, .dev = { .platform_data = &ceu_pdata, }, }; /* Powerdown/reset gpios for CEU image sensors */ static struct gpiod_lookup_table ov7725_gpios = { .dev_id = "0-0021", .table = { GPIO_LOOKUP("sh7722_pfc", GPIO_PTT0, "powerdown", GPIO_ACTIVE_HIGH), GPIO_LOOKUP("sh7722_pfc", GPIO_PTT3, "reset", GPIO_ACTIVE_LOW), }, }; static struct gpiod_lookup_table tw9910_gpios = { .dev_id = "0-0045", .table = { GPIO_LOOKUP("sh7722_pfc", GPIO_PTT2, "pdn", GPIO_ACTIVE_LOW), GPIO_LOOKUP("sh7722_pfc", GPIO_PTT3, "rstb", GPIO_ACTIVE_LOW), }, }; /* Fixed 3.3V regulator to be used by SDHI0 */ static struct regulator_consumer_supply fixed3v3_power_consumers[] = {
struct work_struct wakeup_work; }; static const struct acpi_gpio_params reset_gpios = { 0, 0, false }; static const struct acpi_gpio_params cs_gpios = { 1, 0, false }; static const struct acpi_gpio_mapping acpi_dwc3_byt_gpios[] = { { "reset-gpios", &reset_gpios, 1 }, { "cs-gpios", &cs_gpios, 1 }, { }, }; static struct gpiod_lookup_table platform_bytcr_gpios = { .dev_id = "0000:00:16.0", .table = { GPIO_LOOKUP("INT33FC:00", 54, "reset", GPIO_ACTIVE_HIGH), GPIO_LOOKUP("INT33FC:02", 14, "cs", GPIO_ACTIVE_HIGH), {} }, }; static int dwc3_byt_enable_ulpi_refclock(struct pci_dev *pci) { void __iomem *reg; u32 value; reg = pcim_iomap(pci, GP_RWBAR, 0); if (!reg) return -ENOMEM; value = readl(reg + GP_RWREG1);
[0] = { .start = PCA9564_ADDR, .end = PCA9564_ADDR + PCA9564_SIZE - 1, .flags = IORESOURCE_MEM | IORESOURCE_MEM_8BIT, }, [1] = { .start = evt2irq(0x380), .end = evt2irq(0x380), .flags = IORESOURCE_IRQ, }, }; static struct gpiod_lookup_table i2c_gpio_table = { .dev_id = "i2c.0", .table = { GPIO_LOOKUP("pfc-sh7757", 0, "reset-gpios", GPIO_ACTIVE_LOW), { }, }, }; static struct i2c_pca9564_pf_platform_data i2c_platform_data = { .i2c_clock_speed = I2C_PCA_CON_330kHz, .timeout = HZ, }; static struct platform_device i2c_device = { .name = "i2c-pca-platform", .id = -1, .dev = { .platform_data = &i2c_platform_data, },
.enabled_at_boot = 0, /* disabled at boot */ .init_data = &bcm43xx_vmmc_data, }; static struct platform_device bcm43xx_vmmc_regulator = { .name = "reg-fixed-voltage", .id = PLATFORM_DEVID_AUTO, .dev = { .platform_data = &bcm43xx_vmmc, }, }; static struct gpiod_lookup_table bcm43xx_vmmc_gpio_table = { .dev_id = "reg-fixed-voltage.0", .table = { GPIO_LOOKUP("0000:00:0c.0", -1, NULL, GPIO_ACTIVE_LOW), {} }, }; static int __init bcm43xx_regulator_register(void) { struct gpiod_lookup_table *table = &bcm43xx_vmmc_gpio_table; struct gpiod_lookup *lookup = table->table; int ret; lookup[0].chip_hwnum = get_gpio_by_name(WLAN_SFI_GPIO_ENABLE_NAME); gpiod_add_lookup_table(table); ret = platform_device_register(&bcm43xx_vmmc_regulator); if (ret) {
#include <linux/mfd/intel_soc_pmic.h> #include <linux/gpio/machine.h> #include <linux/pwm.h> #include "intel_soc_pmic_core.h" /* Crystal Cove PMIC shares same ACPI ID between different platforms */ #define BYT_CRC_HRV 2 #define CHT_CRC_HRV 3 /* Lookup table for the Panel Enable/Disable line as GPIO signals */ static struct gpiod_lookup_table panel_gpio_table = { /* Intel GFX is consumer */ .dev_id = "0000:00:02.0", .table = { /* Panel EN/DISABLE */ GPIO_LOOKUP("gpio_crystalcove", 94, "panel", GPIO_ACTIVE_HIGH), { }, }, }; /* PWM consumed by the Intel GFX */ static struct pwm_lookup crc_pwm_lookup[] = { PWM_LOOKUP("crystal_cove_pwm", 0, "0000:00:02.0", "pwm_backlight", 0, PWM_POLARITY_NORMAL), }; static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *i2c_id) { struct device *dev = &i2c->dev; struct intel_soc_pmic_config *config; struct intel_soc_pmic *pmic;
pxa_set_ohci_info(&cmx270_ohci_platform_data); } #else static inline void cmx270_init_ohci(void) {} #endif #if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE) static struct pxamci_platform_data cmx270_mci_platform_data = { .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, }; static struct gpiod_lookup_table cmx270_mci_gpio_table = { .dev_id = "pxa2xx-mci.0", .table = { /* Card detect on GPIO 83 */ GPIO_LOOKUP("gpio-pxa", GPIO83_MMC_IRQ, "cd", GPIO_ACTIVE_LOW), /* Power on GPIO 105 */ GPIO_LOOKUP("gpio-pxa", GPIO105_MMC_POWER, "power", GPIO_ACTIVE_LOW), { }, }, }; static void __init cmx270_init_mmc(void) { gpiod_add_lookup_table(&cmx270_mci_gpio_table); pxa_set_mci_info(&cmx270_mci_platform_data); } #else static inline void cmx270_init_mmc(void) {} #endif
static struct platform_device ceu1_device = { .name = "renesas-ceu", .id = 1, /* ceu.1 */ .num_resources = ARRAY_SIZE(ceu1_resources), .resource = ceu1_resources, .dev = { .platform_data = &ceu1_pdata, }, }; /* Power up/down GPIOs for camera devices and video decoder */ static struct gpiod_lookup_table tw9910_gpios = { .dev_id = "0-0045", .table = { GPIO_LOOKUP("sh7724_pfc", GPIO_PTU2, "pdn", GPIO_ACTIVE_HIGH), }, }; static struct gpiod_lookup_table mt9t112_0_gpios = { .dev_id = "0-003c", .table = { GPIO_LOOKUP("sh7724_pfc", GPIO_PTA3, "standby", GPIO_ACTIVE_HIGH), }, }; static struct gpiod_lookup_table mt9t112_1_gpios = { .dev_id = "1-003c", .table = { GPIO_LOOKUP("sh7724_pfc", GPIO_PTA4, "standby",
.modalias = "wm5102", .max_speed_hz = 10 * 1000 * 1000, .bus_num = 0, .chip_select = 1, .mode = SPI_MODE_0, .irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2, .controller_data = &codec_spi_csinfo, .platform_data = &wm5102_reva_pdata, }, }; static struct gpiod_lookup_table wm5102_reva_gpiod_table = { .dev_id = "spi0.1", /* SPI device name */ .table = { GPIO_LOOKUP("GPION", 7, "wlf,ldoena", GPIO_ACTIVE_HIGH), { }, }, }; static struct arizona_pdata wm5102_pdata = { .gpio_base = CODEC_GPIO_BASE, .irq_flags = IRQF_TRIGGER_HIGH, .micd_pol_gpio = CODEC_GPIO_BASE + 2, .gpio_defaults = { [2] = 0x10000, /* AIF3TXLRCLK */ [3] = 0x4, /* OPCLK */ }, }; static struct spi_board_info wm5102_spi_devs[] = {
static struct map_desc smartq_iodesc[] __initdata = {}; void __init smartq_map_io(void) { s3c64xx_init_io(smartq_iodesc, ARRAY_SIZE(smartq_iodesc)); s3c64xx_set_xtal_freq(12000000); s3c64xx_set_xusbxti_freq(12000000); s3c24xx_init_uarts(smartq_uartcfgs, ARRAY_SIZE(smartq_uartcfgs)); samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); smartq_lcd_mode_set(); } static struct gpiod_lookup_table smartq_audio_gpios = { .dev_id = "smartq-audio", .table = { GPIO_LOOKUP("GPL", 12, "headphone detect", 0), GPIO_LOOKUP("GPK", 12, "amplifiers shutdown", 0), { }, }, }; void __init smartq_machine_init(void) { s3c_i2c0_set_platdata(NULL); dwc2_hsotg_set_platdata(&smartq_hsotg_pdata); s3c_hwmon_set_platdata(&smartq_hwmon_pdata); s3c_sdhci1_set_platdata(&smartq_internal_hsmmc_pdata); s3c_sdhci2_set_platdata(&smartq_internal_hsmmc_pdata); s3c64xx_ts_set_platdata(&smartq_touchscreen_pdata); i2c_register_board_info(0, smartq_i2c_devs,