diff options
author | Mike Fiore <mfiore@multitech.com> | 2014-09-25 15:52:29 -0500 |
---|---|---|
committer | Mike Fiore <mfiore@multitech.com> | 2014-09-25 15:52:29 -0500 |
commit | 8f1a0efb9e68a955544bce4bbc9dec6e4cb57f61 (patch) | |
tree | 086040622992cff66e83ee7ff98eea8ef5c71ea2 /io-module/mtac_mfser.c | |
parent | c83b0cf41999478d31c86fb50740d1fdf0fbb003 (diff) | |
download | mts-io-8f1a0efb9e68a955544bce4bbc9dec6e4cb57f61.tar.gz mts-io-8f1a0efb9e68a955544bce4bbc9dec6e4cb57f61.tar.bz2 mts-io-8f1a0efb9e68a955544bce4bbc9dec6e4cb57f61.zip |
mts-io: add accessory card eeprom contents as read-only sysfs attribtues
Diffstat (limited to 'io-module/mtac_mfser.c')
-rw-r--r-- | io-module/mtac_mfser.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/io-module/mtac_mfser.c b/io-module/mtac_mfser.c index 207180f..ed97cc6 100644 --- a/io-module/mtac_mfser.c +++ b/io-module/mtac_mfser.c @@ -187,7 +187,11 @@ static ssize_t mts_attr_store_mfser_mode(struct kobject *kobj, // 1 serial mode // 1 rs4xx term resistor // 1 rts override -static int ap_mfser_attrs_size = 3; +// 1 vendor-id +// 1 product-id +// 1 device-id +// 1 hw-version +static int ap_mfser_attrs_size = 7; static bool mfser_setup(enum ap port) { int port_index = port - 1; @@ -235,6 +239,12 @@ static bool mfser_setup(enum ap port) { attr->store = mts_attr_store_ap_mfser_pin; device_attrs[device_attrs_size++] = &attr->attr; + // add attributes for eeprom contents + if (! ap_add_product_info_attributes(port, MTAC_MFSER_0_0)) { + log_error("failed to add product info attributes"); + return false; + } + return true; } |