Автор работы: Пользователь скрыл имя, 17 Января 2012 в 14:29, курсовая работа
В настоящее время только Philips производит более 150 наименований I2C-совместимых устройств, функционально предназначенных работы в электронном оборудовании различного назначения. В их числе ИС памяти, видеопроцессоров и модулей обработки аудио- и видео-сигналов, АЦП и ЦАП, драйверы ЖК-индикаторов, процессоры со встоенным аппаратным контроллером I2C шины и многое другое.
Введение 5
1 Шина управления I2C 10
2 Исследование драйвера 14
Заключение 15
Список использованных источников 16
527 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
528 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
529 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
530 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END}
531
532 /* I2C_CLIENT_MODULE_PARM creates a module parameter, and puts it in the
533 module header */
534
535 #define I2C_CLIENT_MODULE_PARM(var,
536 static unsigned short var[I2C_CLIENT_MAX_OPTS] = I2C_CLIENT_DEFAULTS; \
537 static unsigned int var##_num; \
538 module_param_array(var, short, &var##_num, 0); \
539 MODULE_PARM_DESC(var,desc)
540
541 #define I2C_CLIENT_MODULE_PARM_FORCE(
542 I2C_CLIENT_MODULE_PARM(force_#
543 "List of adapter,address pairs which are " \
544 "unquestionably assumed to contain a `" \
545 # name "' chip")
546
547
548 #define I2C_CLIENT_INSMOD_COMMON
549 I2C_CLIENT_MODULE_PARM(probe, "List of adapter,address pairs to scan " \
550
"additionally");
551 I2C_CLIENT_MODULE_PARM(ignore, "List of adapter,address pairs not to " \
552 "scan"); \
553 static struct i2c_client_address_data addr_data = { \
554 .normal_i2c = normal_i2c, \
555 .probe = probe, \
556 .ignore = ignore, \
557 .forces = forces, \
558 }
559
560 /* These are the ones you want to use in your own drivers. Pick the one
561 which matches the number of devices the driver differenciates between.
562 */
563 #define I2C_CLIENT_INSMOD \
564 I2C_CLIENT_MODULE_PARM(force, \
565 "List of adapter,address pairs to boldly assume " \
566 "to be present"); \
567 static unsigned short *forces[] = { \
568 force, \
569 NULL \
570 }; \
571 I2C_CLIENT_INSMOD_COMMON
572
573 #define I2C_CLIENT_INSMOD_1(chip1)
574 enum chips { any_chip, chip1 }; \
575 I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \
576 "boldly assume to be present"); \
577 I2C_CLIENT_MODULE_PARM_FORCE(
578 static unsigned short *forces[] = { force, force_##chip1, NULL }; \
579 I2C_CLIENT_INSMOD_COMMON
580
581 #define I2C_CLIENT_INSMOD_2(chip1, chip2) \
582 enum chips { any_chip, chip1, chip2 }; \
583 I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \
584 "boldly assume to be present"); \
585 I2C_CLIENT_MODULE_PARM_FORCE(
586 I2C_CLIENT_MODULE_PARM_FORCE(
587 static unsigned short *forces[] = { force, force_##chip1, \
588 force_##chip2, NULL }; \
589 I2C_CLIENT_INSMOD_COMMON
590
591 #define I2C_CLIENT_INSMOD_3(chip1, chip2, chip3) \
592 enum chips { any_chip, chip1, chip2, chip3 }; \
593 I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \
594 "boldly assume to be present"); \
595 I2C_CLIENT_MODULE_PARM_FORCE(
596 I2C_CLIENT_MODULE_PARM_FORCE(
597 I2C_CLIENT_MODULE_PARM_FORCE(
598 static unsigned short *forces[] = { force, force_##chip1, \
599 force_##chip2, force_##chip3, \
600 NULL }; \
601 I2C_CLIENT_INSMOD_COMMON
602
603 #define I2C_CLIENT_INSMOD_4(chip1, chip2, chip3, chip4) \
604 enum chips { any_chip, chip1, chip2, chip3, chip4 }; \
605 I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \
606 "boldly assume to be present"); \
607 I2C_CLIENT_MODULE_PARM_FORCE(
608 I2C_CLIENT_MODULE_PARM_FORCE(
609 I2C_CLIENT_MODULE_PARM_FORCE(
610 I2C_CLIENT_MODULE_PARM_FORCE(
611 static unsigned short *forces[] = { force, force_##chip1, \
612 force_##chip2, force_##chip3, \
613 force_##chip4, NULL}; \
614 I2C_CLIENT_INSMOD_COMMON
615
616 #define I2C_CLIENT_INSMOD_5(chip1, chip2, chip3, chip4, chip5) \
617 enum chips { any_chip, chip1, chip2, chip3, chip4, chip5 }; \
618 I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \
619 "boldly assume to be present"); \
620 I2C_CLIENT_MODULE_PARM_FORCE(
621 I2C_CLIENT_MODULE_PARM_FORCE(
622 I2C_CLIENT_MODULE_PARM_FORCE(
623 I2C_CLIENT_MODULE_PARM_FORCE(
624 I2C_CLIENT_MODULE_PARM_FORCE(
625 static unsigned short *forces[] = { force, force_##chip1, \
626 force_##chip2, force_##chip3, \
627 force_##chip4, force_##chip5, \
628 NULL }; \
629 I2C_CLIENT_INSMOD_COMMON
630
631 #define I2C_CLIENT_INSMOD_6(chip1, chip2, chip3, chip4, chip5, chip6) \
632 enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6 }; \
633 I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \
634 "boldly assume to be present"); \
635 I2C_CLIENT_MODULE_PARM_FORCE(
636 I2C_CLIENT_MODULE_PARM_FORCE(
637 I2C_CLIENT_MODULE_PARM_FORCE(
638 I2C_CLIENT_MODULE_PARM_FORCE(
639 I2C_CLIENT_MODULE_PARM_FORCE(
640 I2C_CLIENT_MODULE_PARM_FORCE(
641 static unsigned short *forces[] = { force, force_##chip1, \
642 force_##chip2, force_##chip3, \
643 force_##chip4, force_##chip5, \
644 force_##chip6, NULL }; \
645 I2C_CLIENT_INSMOD_COMMON
646
647 #define I2C_CLIENT_INSMOD_7(chip1, chip2, chip3, chip4, chip5, chip6, chip7)
648 \
649 enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, \
650 chip7 }; \
651 I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \
652 "boldly assume to be present"); \
653 I2C_CLIENT_MODULE_PARM_FORCE(c
654 I2C_CLIENT_MODULE_PARM_FORCE(c
655 I2C_CLIENT_MODULE_PARM_FORCE(c
656 I2C_CLIENT_MODULE_PARM_FORCE(c
657 I2C_CLIENT_MODULE_PARM_FORCE(c
658 I2C_CLIENT_MODULE_PARM_FORCE(c
659 I2C_CLIENT_MODULE_PARM_FORCE(c
660 static unsigned short *forces[] = { force, force_##chip1, \
661 force_##chip2, force_##chip3, \
662 force_##chip4, force_##chip5, \
Информация о работе Исследование драйвера ядра Linux для шины I2C