46 #include "command.h" |
46 #include "command.h" |
47 #include "master.h" |
47 #include "master.h" |
48 |
48 |
49 /*****************************************************************************/ |
49 /*****************************************************************************/ |
50 |
50 |
|
51 extern const ec_code_msg_t al_status_messages[]; |
|
52 |
|
53 /*****************************************************************************/ |
|
54 |
51 int ec_slave_fetch_categories(ec_slave_t *); |
55 int ec_slave_fetch_categories(ec_slave_t *); |
52 ssize_t ec_show_slave_attribute(struct kobject *, struct attribute *, char *); |
56 ssize_t ec_show_slave_attribute(struct kobject *, struct attribute *, char *); |
53 |
57 |
54 /*****************************************************************************/ |
58 /*****************************************************************************/ |
55 |
59 |
84 .sysfs_ops = &sysfs_ops, |
88 .sysfs_ops = &sysfs_ops, |
85 .default_attrs = def_attrs |
89 .default_attrs = def_attrs |
86 }; |
90 }; |
87 |
91 |
88 /** \endcond */ |
92 /** \endcond */ |
89 |
|
90 /*****************************************************************************/ |
|
91 |
|
92 const ec_code_msg_t al_status_messages[]; |
|
93 |
93 |
94 /*****************************************************************************/ |
94 /*****************************************************************************/ |
95 |
95 |
96 /** |
96 /** |
97 Slave constructor. |
97 Slave constructor. |
142 slave->registered = 0; |
142 slave->registered = 0; |
143 slave->fmmu_count = 0; |
143 slave->fmmu_count = 0; |
144 slave->eeprom_name = NULL; |
144 slave->eeprom_name = NULL; |
145 slave->eeprom_group = NULL; |
145 slave->eeprom_group = NULL; |
146 slave->eeprom_desc = NULL; |
146 slave->eeprom_desc = NULL; |
|
147 slave->requested_state = EC_SLAVE_STATE_UNKNOWN; |
|
148 slave->current_state = EC_SLAVE_STATE_UNKNOWN; |
|
149 slave->state_error = 0; |
147 |
150 |
148 ec_command_init(&slave->mbox_command); |
151 ec_command_init(&slave->mbox_command); |
149 |
152 |
150 INIT_LIST_HEAD(&slave->eeprom_strings); |
153 INIT_LIST_HEAD(&slave->eeprom_strings); |
151 INIT_LIST_HEAD(&slave->eeprom_syncs); |
154 INIT_LIST_HEAD(&slave->eeprom_syncs); |
1259 } |
1262 } |
1260 |
1263 |
1261 return 0; |
1264 return 0; |
1262 } |
1265 } |
1263 |
1266 |
1264 /*****************************************************************************/ |
|
1265 |
|
1266 /** |
|
1267 Application layer status messages. |
|
1268 */ |
|
1269 |
|
1270 const ec_code_msg_t al_status_messages[] = { |
|
1271 {0x0001, "Unspecified error"}, |
|
1272 {0x0011, "Invalud requested state change"}, |
|
1273 {0x0012, "Unknown requested state"}, |
|
1274 {0x0013, "Bootstrap not supported"}, |
|
1275 {0x0014, "No valid firmware"}, |
|
1276 {0x0015, "Invalid mailbox configuration"}, |
|
1277 {0x0016, "Invalid mailbox configuration"}, |
|
1278 {0x0017, "Invalid sync manager configuration"}, |
|
1279 {0x0018, "No valid inputs available"}, |
|
1280 {0x0019, "No valid outputs"}, |
|
1281 {0x001A, "Synchronisation error"}, |
|
1282 {0x001B, "Sync manager watchdog"}, |
|
1283 {0x0020, "Slave needs cold start"}, |
|
1284 {0x0021, "Slave needs INIT"}, |
|
1285 {0x0022, "Slave needs PREOP"}, |
|
1286 {0x0023, "Slave needs SAVEOP"}, |
|
1287 {} |
|
1288 }; |
|
1289 |
|
1290 /****************************************************************************** |
1267 /****************************************************************************** |
1291 * Realtime interface |
1268 * Realtime interface |
1292 *****************************************************************************/ |
1269 *****************************************************************************/ |
1293 |
1270 |
1294 /** |
1271 /** |