equal
deleted
inserted
replaced
31 EC_SYSFS_READ_ATTR(ring_position); |
31 EC_SYSFS_READ_ATTR(ring_position); |
32 EC_SYSFS_READ_ATTR(station_address); |
32 EC_SYSFS_READ_ATTR(station_address); |
33 EC_SYSFS_READ_ATTR(vendor_name); |
33 EC_SYSFS_READ_ATTR(vendor_name); |
34 EC_SYSFS_READ_ATTR(product_name); |
34 EC_SYSFS_READ_ATTR(product_name); |
35 EC_SYSFS_READ_ATTR(product_desc); |
35 EC_SYSFS_READ_ATTR(product_desc); |
|
36 EC_SYSFS_READ_ATTR(type); |
36 |
37 |
37 static struct attribute *def_attrs[] = { |
38 static struct attribute *def_attrs[] = { |
38 &attr_ring_position, |
39 &attr_ring_position, |
39 &attr_station_address, |
40 &attr_station_address, |
40 &attr_vendor_name, |
41 &attr_vendor_name, |
41 &attr_product_name, |
42 &attr_product_name, |
42 &attr_product_desc, |
43 &attr_product_desc, |
|
44 &attr_type, |
43 NULL, |
45 NULL, |
44 }; |
46 }; |
45 |
47 |
46 static struct sysfs_ops sysfs_ops = { |
48 static struct sysfs_ops sysfs_ops = { |
47 .show = &ec_show_slave_attribute, |
49 .show = &ec_show_slave_attribute, |
1222 } |
1224 } |
1223 else if (attr == &attr_product_desc) { |
1225 else if (attr == &attr_product_desc) { |
1224 if (slave->type) |
1226 if (slave->type) |
1225 return sprintf(buffer, "%s\n", slave->type->description); |
1227 return sprintf(buffer, "%s\n", slave->type->description); |
1226 } |
1228 } |
|
1229 else if (attr == &attr_type) { |
|
1230 if (slave->type) { |
|
1231 if (slave->type->special == EC_TYPE_BUS_COUPLER) |
|
1232 return sprintf(buffer, "coupler\n"); |
|
1233 else |
|
1234 return sprintf(buffer, "normal\n"); |
|
1235 } |
|
1236 } |
1227 |
1237 |
1228 return 0; |
1238 return 0; |
1229 } |
1239 } |
1230 |
1240 |
1231 /*****************************************************************************/ |
1241 /*****************************************************************************/ |