diff options
author | Volodymyr Vorobiov <volodymyr.vorobiov@globallogic.com> | 2019-10-29 18:17:27 +0200 |
---|---|---|
committer | Volodymyr Vorobiov <volodymyr.vorobiov@globallogic.com> | 2019-10-29 18:17:27 +0200 |
commit | 0f09f38ceaed0ce4f676facb02046095724fb4bf (patch) | |
tree | f7e42aee817d64d884a706048d18a3cfbf329b50 /io-module/mts-io.c | |
parent | 88c747744d74a808ab5de0e6232327918c70ecbd (diff) | |
download | mts-io-0f09f38ceaed0ce4f676facb02046095724fb4bf.tar.gz mts-io-0f09f38ceaed0ce4f676facb02046095724fb4bf.tar.bz2 mts-io-0f09f38ceaed0ce4f676facb02046095724fb4bf.zip |
Add mt100eocg spi io
Diffstat (limited to 'io-module/mts-io.c')
-rw-r--r-- | io-module/mts-io.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/io-module/mts-io.c b/io-module/mts-io.c index 6899aac..489f0d5 100644 --- a/io-module/mts-io.c +++ b/io-module/mts-io.c @@ -969,6 +969,23 @@ static int __init mts_io_init(void) return ret; } + if (DEVICE_CAPA(id_eeprom.capa, CAPA_DOUT)) { + ret = spi_register_driver(&mts_spi_dout_driver); + if (ret) { + printk(KERN_ERR "mts-io:mts-io-dout: probe failed: %d\n", ret); + } + } + if (DEVICE_CAPA(id_eeprom.capa, CAPA_DIN)) { + ret = spi_register_driver(&mts_spi_din_driver); + if (ret) { + printk(KERN_ERR "mts-io:mts-io-din: probe failed: %d\n", ret); + } + } + ret = spi_register_driver(&mts_spi_board_temp_driver); + if (ret) { + printk(KERN_ERR "mts-io:mts-io-board-temp: probe failed: %d\n", ret); + } + if (DEVICE_CAPA(id_eeprom.capa, CAPA_LORA) && attr_group_lora) { mts_load_lora_port(); } @@ -1004,6 +1021,14 @@ static int __init mts_io_init(void) static void __exit mts_io_exit(void) { + if (DEVICE_CAPA(id_eeprom.capa, CAPA_DOUT)) { + spi_unregister_driver(&mts_spi_dout_driver); + } + if (DEVICE_CAPA(id_eeprom.capa, CAPA_DIN)) { + spi_unregister_driver(&mts_spi_din_driver); + } + spi_unregister_driver(&mts_spi_board_temp_driver); + struct gpio_pin *pin; /* delete radio_reset_timer */ del_timer(&radio_reset_timer); |