|
@@ -216,3 +216,93 @@ static struct gpio_led pcf_gpio_leds2[] = {
|
|
|
.gpio = PCF_GPIO_ALARM1,
|
|
|
.active_low = 1,
|
|
|
.default_trigger = "none",
|
|
|
+ .default_state = LEDS_GPIO_DEFSTATE_OFF,
|
|
|
+ },
|
|
|
+ { /* bit 1 */
|
|
|
+ .name = "gpo:alarm_2",
|
|
|
+ .gpio = PCF_GPIO_ALARM2,
|
|
|
+ .active_low = 1,
|
|
|
+ .default_trigger = "none",
|
|
|
+ .default_state = LEDS_GPIO_DEFSTATE_OFF,
|
|
|
+ },
|
|
|
+ { /* bit 2 */
|
|
|
+ .name = "gpo:alarm_3",
|
|
|
+ .gpio = PCF_GPIO_ALARM3,
|
|
|
+ .active_low = 1,
|
|
|
+ .default_trigger = "none",
|
|
|
+ .default_state = LEDS_GPIO_DEFSTATE_OFF,
|
|
|
+ },
|
|
|
+ { /* bit 3 */
|
|
|
+ .name = "gpo:alarm_4",
|
|
|
+ .gpio = PCF_GPIO_ALARM4,
|
|
|
+ .active_low = 1,
|
|
|
+ .default_trigger = "none",
|
|
|
+ .default_state = LEDS_GPIO_DEFSTATE_OFF,
|
|
|
+ },
|
|
|
+ /* bits 4, 5, 6 not used */
|
|
|
+ { /* bit 7 */
|
|
|
+ .name = "gpo:alarm_v_relay_on",
|
|
|
+ .gpio = PCF_GPIO_ALARM_V_RELAY_ON,
|
|
|
+ .active_low = 0,
|
|
|
+ .default_trigger = "none",
|
|
|
+ .default_state = LEDS_GPIO_DEFSTATE_OFF,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct gpio_led_platform_data pcf_gpio_led_info2 = {
|
|
|
+ .leds = pcf_gpio_leds2,
|
|
|
+ .num_leds = ARRAY_SIZE(pcf_gpio_leds2),
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device pcf_leds2 = {
|
|
|
+ .name = "leds-gpio",
|
|
|
+ .id = 2,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &pcf_gpio_led_info2,
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+/* PCF8574 0x24 GPIO U1 on the GS_2G-OPT23-A_V0 board (Modem) */
|
|
|
+static struct gpio_led pcf_gpio_leds3[] = {
|
|
|
+ { /* bit 0 */
|
|
|
+ .name = "gpo:modem_power",
|
|
|
+ .gpio = PCF_GPIO_MODEM_POWER,
|
|
|
+ .active_low = 1,
|
|
|
+ .default_trigger = "none",
|
|
|
+ .default_state = LEDS_GPIO_DEFSTATE_OFF,
|
|
|
+ },
|
|
|
+ /* bits 1 and 2 not used */
|
|
|
+ { /* bit 3 */
|
|
|
+ .name = "gpo:modem_reset",
|
|
|
+ .gpio = PCF_GPIO_MODEM_RESET,
|
|
|
+ .active_low = 1,
|
|
|
+ .default_trigger = "none",
|
|
|
+ .default_state = LEDS_GPIO_DEFSTATE_ON,
|
|
|
+ },
|
|
|
+ /* bits 4, 5 and 6 not used */
|
|
|
+ { /* bit 7 */
|
|
|
+ .name = "gpo:trx_reset",
|
|
|
+ .gpio = PCF_GPIO_TRX_RESET,
|
|
|
+ .active_low = 1,
|
|
|
+ .default_trigger = "none",
|
|
|
+ .default_state = LEDS_GPIO_DEFSTATE_ON,
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+static struct gpio_led_platform_data pcf_gpio_led_info3 = {
|
|
|
+ .leds = pcf_gpio_leds3,
|
|
|
+ .num_leds = ARRAY_SIZE(pcf_gpio_leds3),
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device pcf_leds3 = {
|
|
|
+ .name = "leds-gpio",
|
|
|
+ .id = 3,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &pcf_gpio_led_info3,
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+static void __init gsia18s_pcf_leds_init(void)
|
|
|
+{
|
|
|
+ platform_device_register(&pcf_leds1);
|
|
|
+ platform_device_register(&pcf_leds2);
|