RICOH_REG(LDO8, ldo2, 0), \ RICOH_RTC_REG() static struct ricoh583_subdev_info ricoh_devs_e118x_dcdc[] = { RICOH583_DEV_COMMON_E118X, }; #define RICOH_GPIO_INIT(_init_apply, _pulldn, _output_mode, _output_val) \ { \ .pulldn_en = _pulldn, \ .output_mode_en = _output_mode, \ .output_val = _output_val, \ .init_apply = _init_apply, \ } struct ricoh583_gpio_init_data ricoh_gpio_data[] = { RICOH_GPIO_INIT(false, false, false, 0), RICOH_GPIO_INIT(false, false, false, 0), RICOH_GPIO_INIT(false, false, false, 0), RICOH_GPIO_INIT(true, false, true, 1), RICOH_GPIO_INIT(true, false, true, 1), RICOH_GPIO_INIT(false, false, false, 0), RICOH_GPIO_INIT(false, false, false, 0), RICOH_GPIO_INIT(false, false, false, 0), }; static struct ricoh583_platform_data ricoh_platform = { .irq_base = RICOH583_IRQ_BASE, .gpio_base = RICOH583_GPIO_BASE, .gpio_init_data = ricoh_gpio_data, .num_gpioinit_data = ARRAY_SIZE(ricoh_gpio_data), .enable_shutdown_pin = true,
#ifdef CONFIG_RICOH583_AC_DETECT RICOH583_AC_DETECT_REG, #endif }; #define RICOH_GPIO_INIT(_init_apply, _pulldn, _output_mode, _output_val, _ext_contol, _ds_slots) \ { \ .pulldn_en = _pulldn, \ .output_mode_en = _output_mode, \ .output_val = _output_val, \ .init_apply = _init_apply, \ .ext_pwr_req = _ext_contol, \ .deepsleep_slots = _ds_slots, \ } struct ricoh583_gpio_init_data ricoh_gpio_data[] = { RICOH_GPIO_INIT(false, false, false, 0, 0, 0), //GPIO0 RICOH_GPIO_INIT(false, false, false, 0, 1, 0), //GPIO1 RICOH_GPIO_INIT(false, false, false, 0, 1, 6), //GPIO2 RICOH_GPIO_INIT(false, false, false, 0, 1, 5), //GPIO3 RICOH_GPIO_INIT(false, true, false, 1, 0, 0), //GPIO4 RICOH_GPIO_INIT(true, true, true, 1, 0, 0), //GPIO5 RICOH_GPIO_INIT(false, false, false, 0, 1, 6), //GPIO6 RICOH_GPIO_INIT(false, false, false, 0, 0, 0), //GPIO7 }; static struct ricoh583_platform_data ricoh_platform = { .num_subdevs = ARRAY_SIZE(ricoh_devs_dcdc), .subdevs = ricoh_devs_dcdc, .irq_base = RICOH583_IRQ_BASE, .gpio_base = RICOH583_GPIO_BASE,
RICOH619_PWRKEY_REG, #ifdef CONFIG_RTC_DRV_R5T619 RICOH_RTC_REG, #endif }; #define RICOH_GPIO_INIT(_init_apply, _output_mode, _output_val, _led_mode, _led_func) \ { \ .output_mode_en = _output_mode, \ .output_val = _output_val, \ .init_apply = _init_apply, \ .led_mode = _led_mode, \ .led_func = _led_func, \ } struct ricoh619_gpio_init_data ricoh_gpio_data[] = { RICOH_GPIO_INIT(false, false, 0, 0, 0), RICOH_GPIO_INIT(false, false, 0, 0, 0), RICOH_GPIO_INIT(false, false, 0, 0, 0), RICOH_GPIO_INIT(false, false, 0, 0, 0), }; #define ECO_SLP_MODE (LDO1_ECO_SLEEP | LDO2_ECO_SLEEP << 1 | LDO3_ECO_SLEEP << 2 \ | LDO4_ECO_SLEEP << 3 | LDO5_ECO_SLEEP << 4 | LDO6_ECO_SLEEP << 5) static struct ricoh619_platform_data ricoh_platform = { .num_subdevs = ARRAY_SIZE(ricoh_devs_dcdc), .subdevs = ricoh_devs_dcdc, .irq_base = RICOH619_IRQ_BASE, .gpio_base = RICOH619_GPIO_BASE, .gpio_init_data = ricoh_gpio_data, .num_gpioinit_data = ARRAY_SIZE(ricoh_gpio_data),