Searched refs:ecomp (Results 1 - 2 of 2) sorted by relevance

/linux-4.4.14/drivers/scsi/
H A Dses.c71 struct enclosure_component *ecomp, init_device_slot_control()
77 if (ecomp->type == ENCLOSURE_COMPONENT_DEVICE) init_device_slot_control()
141 struct enclosure_component *ecomp, ses_set_page2_descriptor()
144 int i, j, count = 0, descriptor = ecomp->number; ses_set_page2_descriptor()
172 struct enclosure_component *ecomp) ses_get_page2_descriptor()
174 int i, j, count = 0, descriptor = ecomp->number; ses_get_page2_descriptor()
200 struct enclosure_component *ecomp) ses_get_fault()
204 desc = ses_get_page2_descriptor(edev, ecomp); ses_get_fault()
206 ecomp->fault = (desc[3] & 0x60) >> 4; ses_get_fault()
210 struct enclosure_component *ecomp, ses_set_fault()
216 desc_ptr = ses_get_page2_descriptor(edev, ecomp); ses_set_fault()
221 init_device_slot_control(desc, ecomp, desc_ptr); ses_set_fault()
235 return ses_set_page2_descriptor(edev, ecomp, desc); ses_set_fault()
239 struct enclosure_component *ecomp) ses_get_status()
243 desc = ses_get_page2_descriptor(edev, ecomp); ses_get_status()
245 ecomp->status = (desc[0] & 0x0f); ses_get_status()
249 struct enclosure_component *ecomp) ses_get_locate()
253 desc = ses_get_page2_descriptor(edev, ecomp); ses_get_locate()
255 ecomp->locate = (desc[2] & 0x02) ? 1 : 0; ses_get_locate()
259 struct enclosure_component *ecomp, ses_set_locate()
265 desc_ptr = ses_get_page2_descriptor(edev, ecomp); ses_set_locate()
270 init_device_slot_control(desc, ecomp, desc_ptr); ses_set_locate()
283 return ses_set_page2_descriptor(edev, ecomp, desc); ses_set_locate()
287 struct enclosure_component *ecomp, ses_set_active()
293 desc_ptr = ses_get_page2_descriptor(edev, ecomp); ses_set_active()
298 init_device_slot_control(desc, ecomp, desc_ptr); ses_set_active()
303 ecomp->active = 0; ses_set_active()
307 ecomp->active = 1; ses_set_active()
313 return ses_set_page2_descriptor(edev, ecomp, desc); ses_set_active()
325 struct enclosure_component *ecomp) ses_get_power_status()
329 desc = ses_get_page2_descriptor(edev, ecomp); ses_get_power_status()
331 ecomp->power_status = (desc[3] & 0x10) ? 0 : 1; ses_get_power_status()
335 struct enclosure_component *ecomp, ses_set_power_status()
341 desc_ptr = ses_get_page2_descriptor(edev, ecomp); ses_set_power_status()
346 init_device_slot_control(desc, ecomp, desc_ptr); ses_set_power_status()
359 ecomp->power_status = val; ses_set_power_status()
360 return ses_set_page2_descriptor(edev, ecomp, desc); ses_set_power_status()
399 static void ses_process_descriptor(struct enclosure_component *ecomp, ses_process_descriptor() argument
407 struct ses_component *scomp = ecomp->scratch; ses_process_descriptor()
441 ecomp->slot = slot; ses_process_descriptor()
522 struct enclosure_component *ecomp; ses_enclosure_data_process() local
540 ecomp = enclosure_component_alloc( ses_enclosure_data_process()
546 ecomp = &edev->component[components++]; ses_enclosure_data_process()
548 if (!IS_ERR(ecomp)) { ses_enclosure_data_process()
549 ses_get_power_status(edev, ecomp); ses_enclosure_data_process()
552 ecomp, ses_enclosure_data_process()
556 ecomp); ses_enclosure_data_process()
70 init_device_slot_control(unsigned char *dest_desc, struct enclosure_component *ecomp, unsigned char *status) init_device_slot_control() argument
140 ses_set_page2_descriptor(struct enclosure_device *edev, struct enclosure_component *ecomp, unsigned char *desc) ses_set_page2_descriptor() argument
171 ses_get_page2_descriptor(struct enclosure_device *edev, struct enclosure_component *ecomp) ses_get_page2_descriptor() argument
199 ses_get_fault(struct enclosure_device *edev, struct enclosure_component *ecomp) ses_get_fault() argument
209 ses_set_fault(struct enclosure_device *edev, struct enclosure_component *ecomp, enum enclosure_component_setting val) ses_set_fault() argument
238 ses_get_status(struct enclosure_device *edev, struct enclosure_component *ecomp) ses_get_status() argument
248 ses_get_locate(struct enclosure_device *edev, struct enclosure_component *ecomp) ses_get_locate() argument
258 ses_set_locate(struct enclosure_device *edev, struct enclosure_component *ecomp, enum enclosure_component_setting val) ses_set_locate() argument
286 ses_set_active(struct enclosure_device *edev, struct enclosure_component *ecomp, enum enclosure_component_setting val) ses_set_active() argument
324 ses_get_power_status(struct enclosure_device *edev, struct enclosure_component *ecomp) ses_get_power_status() argument
334 ses_set_power_status(struct enclosure_device *edev, struct enclosure_component *ecomp, int val) ses_set_power_status() argument
/linux-4.4.14/drivers/misc/
H A Denclosure.c260 struct enclosure_component *ecomp; enclosure_component_find_by_name() local
266 ecomp = &edev->component[i]; enclosure_component_find_by_name()
267 cname = dev_name(&ecomp->cdev); enclosure_component_find_by_name()
268 if (ecomp->number != -1 && enclosure_component_find_by_name()
271 return ecomp; enclosure_component_find_by_name()
297 struct enclosure_component *ecomp; enclosure_component_alloc() local
305 ecomp = &edev->component[number]; enclosure_component_alloc()
307 if (ecomp->number != -1) enclosure_component_alloc()
310 ecomp->type = type; enclosure_component_alloc()
311 ecomp->number = number; enclosure_component_alloc()
312 cdev = &ecomp->cdev; enclosure_component_alloc()
333 return ecomp; enclosure_component_alloc()
339 * @ecomp: component to add
343 int enclosure_component_register(struct enclosure_component *ecomp) enclosure_component_register() argument
348 cdev = &ecomp->cdev; enclosure_component_register()
351 ecomp->number = -1; enclosure_component_register()
486 struct enclosure_component *ecomp = to_enclosure_component(cdev); get_component_fault() local
489 edev->cb->get_fault(edev, ecomp); get_component_fault()
490 return snprintf(buf, 40, "%d\n", ecomp->fault); get_component_fault()
498 struct enclosure_component *ecomp = to_enclosure_component(cdev); set_component_fault() local
502 edev->cb->set_fault(edev, ecomp, val); set_component_fault()
510 struct enclosure_component *ecomp = to_enclosure_component(cdev); get_component_status() local
513 edev->cb->get_status(edev, ecomp); get_component_status()
514 return snprintf(buf, 40, "%s\n", enclosure_status[ecomp->status]); get_component_status()
522 struct enclosure_component *ecomp = to_enclosure_component(cdev); set_component_status() local
534 edev->cb->set_status(edev, ecomp, i); set_component_status()
544 struct enclosure_component *ecomp = to_enclosure_component(cdev); get_component_active() local
547 edev->cb->get_active(edev, ecomp); get_component_active()
548 return snprintf(buf, 40, "%d\n", ecomp->active); get_component_active()
556 struct enclosure_component *ecomp = to_enclosure_component(cdev); set_component_active() local
560 edev->cb->set_active(edev, ecomp, val); set_component_active()
568 struct enclosure_component *ecomp = to_enclosure_component(cdev); get_component_locate() local
571 edev->cb->get_locate(edev, ecomp); get_component_locate()
572 return snprintf(buf, 40, "%d\n", ecomp->locate); get_component_locate()
580 struct enclosure_component *ecomp = to_enclosure_component(cdev); set_component_locate() local
584 edev->cb->set_locate(edev, ecomp, val); set_component_locate()
593 struct enclosure_component *ecomp = to_enclosure_component(cdev); get_component_power_status() local
596 edev->cb->get_power_status(edev, ecomp); get_component_power_status()
597 return snprintf(buf, 40, "%s\n", ecomp->power_status ? "on" : "off"); get_component_power_status()
605 struct enclosure_component *ecomp = to_enclosure_component(cdev); set_component_power_status() local
618 edev->cb->set_power_status(edev, ecomp, val); set_component_power_status()
625 struct enclosure_component *ecomp = to_enclosure_component(cdev); get_component_type() local
627 return snprintf(buf, 40, "%s\n", enclosure_type[ecomp->type]); get_component_type()
633 struct enclosure_component *ecomp = to_enclosure_component(cdev); get_component_slot() local
637 if (ecomp->slot >= 0) get_component_slot()
638 slot = ecomp->slot; get_component_slot()
640 slot = ecomp->number; get_component_slot()

Completed in 89 milliseconds