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_gpiob.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_gpiob.c')
-rw-r--r-- | io-module/mtac_gpiob.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/io-module/mtac_gpiob.c b/io-module/mtac_gpiob.c index f2cd9b2..ebbe0c6 100644 --- a/io-module/mtac_gpiob.c +++ b/io-module/mtac_gpiob.c @@ -380,7 +380,11 @@ static bool gpiob_spi_driver_setup(struct spi_driver *driver, const char *driver // 2 LEDs // 1 digital out enable // 1 reset -static int ap_gpiob_attrs_size = 15; +// 1 vendor-id +// 1 product-id +// 1 device-id +// 1 hw-version +static int ap_gpiob_attrs_size = 19; static bool gpiob_setup(enum ap port) { int i; @@ -449,7 +453,13 @@ static bool gpiob_setup(enum ap port) { device_attrs[device_attrs_size++] = &attr->attr; } - // misc attributes + // add attributes for eeprom contents + if (! ap_add_product_info_attributes(port, MTAC_GPIOB_0_0)) { + log_error("failed to add product info attributes"); + return false; + } + + // add misc attributes sprintf(buf, "ap-dout-enable:%d", port); attr = create_attribute(buf, MTS_ATTR_MODE_RW); if (! attr) { |