diff options
Diffstat (limited to 'io-module')
-rw-r--r-- | io-module/mts_io.c | 44 | ||||
-rw-r--r-- | io-module/mts_io.h | 4 |
2 files changed, 24 insertions, 24 deletions
diff --git a/io-module/mts_io.c b/io-module/mts_io.c index 438e98c..a6add6c 100644 --- a/io-module/mts_io.c +++ b/io-module/mts_io.c @@ -260,7 +260,7 @@ static struct gpio_pin gpio_pins_mtcdp_1_0[] = { { }, }; -static struct gpio_pin gpio_pins_mt100ecdp_0_0[] = { +static struct gpio_pin gpio_pins_mt100eocg_0_0[] = { { .name = "ENIO", .pin = AT91_PIN_PC15, @@ -386,8 +386,8 @@ static int mts_id_eeprom_load(void) DEVICE_CAPA_SET(id_eeprom.capa, CAPA_GPS); gpio_pins = gpio_pins_mtcdp_0_0; - } else if (!strcmp(id_eeprom.product_id, PRODUCT_ID_MT100ECDP)) { - gpio_pins = gpio_pins_mt100ecdp_0_0; + } else if (!strcmp(id_eeprom.product_id, PRODUCT_ID_MT100EOCG)) { + gpio_pins = gpio_pins_mt100eocg_0_0; } else { gpio_pins = gpio_pins_mtcdp_1_0; } @@ -1005,7 +1005,7 @@ static ssize_t mts_attr_store_dout(struct device *dev, mutex_lock(&spi_dout_mutex); - if (!strcmp(id_eeprom.product_id, PRODUCT_ID_MT100ECDP)) { + if (!strcmp(id_eeprom.product_id, PRODUCT_ID_MT100EOCG)) { if (!value) { spi_dout_value &= ~bit; } else { @@ -1061,7 +1061,7 @@ static ssize_t mts_attr_show_dout(struct device *dev, mutex_lock(&spi_dout_mutex); - if (!strcmp(id_eeprom.product_id, PRODUCT_ID_MT100ECDP)) { + if (!strcmp(id_eeprom.product_id, PRODUCT_ID_MT100EOCG)) { value = spi_dout_value & bit ? 1 : 0; } else { @@ -1366,7 +1366,7 @@ static ssize_t mts_attr_show_led_ls(struct device *dev, int value; struct gpio_pin *pin; - if (!strcmp(id_eeprom.product_id, PRODUCT_ID_MT100ECDP)) { + if (!strcmp(id_eeprom.product_id, PRODUCT_ID_MT100EOCG)) { pin = gpio_pin_by_name("LED3"); } else { @@ -1397,7 +1397,7 @@ static ssize_t mts_attr_store_led_ls(struct device *dev, int err; struct gpio_pin *pin; - if (!strcmp(id_eeprom.product_id, PRODUCT_ID_MT100ECDP)) { + if (!strcmp(id_eeprom.product_id, PRODUCT_ID_MT100EOCG)) { pin = gpio_pin_by_name("LED3"); } else { @@ -2143,7 +2143,7 @@ static struct device_attribute dev_attr_extserial_cd = { }; -static struct attribute *mt100ecdp_platform_attributes[] = { +static struct attribute *mt100eocg_platform_attributes[] = { &dev_attr_extserial_dtr.attr, &dev_attr_extserial_cd.attr, &dev_attr_rsersrc.attr, @@ -2180,8 +2180,8 @@ static struct attribute *mt100ecdp_platform_attributes[] = { NULL, }; -static struct attribute_group mt100ecdp_platform_attribute_group = { - .attrs = mt100ecdp_platform_attributes +static struct attribute_group mt100eocg_platform_attribute_group = { + .attrs = mt100eocg_platform_attributes }; @@ -2440,9 +2440,9 @@ static int __init mts_io_init(void) goto error2; } - if (!strcmp(id_eeprom.product_id, PRODUCT_ID_MT100ECDP)) { + if (!strcmp(id_eeprom.product_id, PRODUCT_ID_MT100EOCG)) { ret = sysfs_create_group(&mts_io_platform_device->dev.kobj, - &mt100ecdp_platform_attribute_group); + &mt100eocg_platform_attribute_group); if (ret) { goto error3; } @@ -2455,8 +2455,8 @@ static int __init mts_io_init(void) } } - // No sout driver for MT100ECDP - if (strcmp(id_eeprom.product_id, PRODUCT_ID_MT100ECDP)) { + // No sout driver for MT100EOCG + if (strcmp(id_eeprom.product_id, PRODUCT_ID_MT100EOCG)) { ret = spi_register_driver(&mts_spi_sout_driver); if (ret) { goto error4; @@ -2513,8 +2513,8 @@ static int __init mts_io_init(void) at91_set_gpio_value(pin->pin, 0); } - // No blinking for MT100ECDP - if (strcmp(id_eeprom.product_id, PRODUCT_ID_MT100ECDP)) { + // No blinking for MT100EOCG + if (strcmp(id_eeprom.product_id, PRODUCT_ID_MT100EOCG)) { blink_callback(NULL); } @@ -2529,13 +2529,13 @@ error7: error6: spi_unregister_driver(&mts_spi_dout_driver); error5: - if (strcmp(id_eeprom.product_id, PRODUCT_ID_MT100ECDP)) { + if (strcmp(id_eeprom.product_id, PRODUCT_ID_MT100EOCG)) { spi_unregister_driver(&mts_spi_sout_driver); } error4: - if (!strcmp(id_eeprom.product_id, PRODUCT_ID_MT100ECDP)) { + if (!strcmp(id_eeprom.product_id, PRODUCT_ID_MT100EOCG)) { sysfs_remove_group(&mts_io_platform_device->dev.kobj, - &mt100ecdp_platform_attribute_group); + &mt100eocg_platform_attribute_group); } else { sysfs_remove_group(&mts_io_platform_device->dev.kobj, @@ -2553,7 +2553,7 @@ error1: static void __exit mts_io_exit(void) { - if (strcmp(id_eeprom.product_id, PRODUCT_ID_MT100ECDP)) { + if (strcmp(id_eeprom.product_id, PRODUCT_ID_MT100EOCG)) { cancel_delayed_work_sync(&blink_work); } @@ -2565,9 +2565,9 @@ static void __exit mts_io_exit(void) spi_unregister_driver(&mts_spi_dout_driver); spi_unregister_driver(&mts_spi_board_temp_driver); - if (!strcmp(id_eeprom.product_id, PRODUCT_ID_MT100ECDP)) { + if (!strcmp(id_eeprom.product_id, PRODUCT_ID_MT100EOCG)) { sysfs_remove_group(&mts_io_platform_device->dev.kobj, - &mt100ecdp_platform_attribute_group); + &mt100eocg_platform_attribute_group); } else { spi_unregister_driver(&mts_spi_sout_driver); diff --git a/io-module/mts_io.h b/io-module/mts_io.h index 2ae88bc..38551ad 100644 --- a/io-module/mts_io.h +++ b/io-module/mts_io.h @@ -12,12 +12,12 @@ #define VENDOR_ID_MULTITECH "Multi-Tech Systems" #define PRODUCT_ID_MTCDP_E1_DK "MTCDP-E1-DK" -#define PRODUCT_ID_MT100ECDP "MT100ECDP" +#define PRODUCT_ID_MT100EOCG "MT100EOCG" #define HW_VERSION_MTCBA2_2_0 "MTCBA2-2.0" #define HW_VERSION_MTCDP_0_0 "MTCDP-0.0" #define HW_VERSION_MTCDP_1_0 "MTCDP-1.0" -#define HW_VERSION_MT100ECDP_0_0 "MT100ECDP-0.0" +#define HW_VERSION_MT100EOCG_0_0 "MT100EOCG-0.0" #define DEVICE_CAPA_INDEX(c) (((c) & 0xFF) >> 3) #define DEVICE_CAPA_MASK(c) BIT((c) & 0x07) |