• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/platform/x86/

Lines Matching refs:ibm

212 #define TPACPI_URL "http://ibm-acpi.sf.net/"
213 #define TPACPI_MAIL "ibm-acpi-devel@lists.sourceforge.net"
215 #define TPACPI_PROC_DIR "ibm"
216 #define TPACPI_ACPI_EVENT_PREFIX "ibm"
742 struct ibm_struct *ibm = data;
747 if (!ibm || !ibm->acpi || !ibm->acpi->notify)
750 ibm->acpi->notify(ibm, event);
753 static int __init setup_acpi_notify(struct ibm_struct *ibm)
758 BUG_ON(!ibm->acpi);
760 if (!*ibm->acpi->handle)
764 "setting up ACPI notify for %s\n", ibm->name);
766 rc = acpi_bus_get_device(*ibm->acpi->handle, &ibm->acpi->device);
769 ibm->name, rc);
773 ibm->acpi->device->driver_data = ibm;
774 sprintf(acpi_device_class(ibm->acpi->device), "%s/%s",
776 ibm->name);
778 status = acpi_install_notify_handler(*ibm->acpi->handle,
779 ibm->acpi->type, dispatch_acpi_notify, ibm);
784 "handling %s events\n", ibm->name);
788 ibm->name, acpi_format_exception(status));
792 ibm->flags.acpi_notify_installed = 1;
801 static int __init register_tpacpi_subdriver(struct ibm_struct *ibm)
806 "registering %s as an ACPI driver\n", ibm->name);
808 BUG_ON(!ibm->acpi);
810 ibm->acpi->driver = kzalloc(sizeof(struct acpi_driver), GFP_KERNEL);
811 if (!ibm->acpi->driver) {
813 "failed to allocate memory for ibm->acpi->driver\n");
817 sprintf(ibm->acpi->driver->name, "%s_%s", TPACPI_NAME, ibm->name);
818 ibm->acpi->driver->ids = ibm->acpi->hid;
820 ibm->acpi->driver->ops.add = &tpacpi_device_add;
822 rc = acpi_bus_register_driver(ibm->acpi->driver);
825 ibm->name, rc);
826 kfree(ibm->acpi->driver);
827 ibm->acpi->driver = NULL;
829 ibm->flags.acpi_driver_registered = 1;
845 struct ibm_struct *ibm = m->private;
847 if (!ibm || !ibm->read)
849 return ibm->read(m);
861 struct ibm_struct *ibm = PDE(file->f_path.dentry->d_inode)->data;
865 if (!ibm || !ibm->write)
881 ret = ibm->write(kernbuf);
934 struct ibm_struct *ibm, *itmp;
936 list_for_each_entry_safe(ibm, itmp,
939 if (ibm->suspend)
940 (ibm->suspend)(state);
948 struct ibm_struct *ibm, *itmp;
950 list_for_each_entry_safe(ibm, itmp,
953 if (ibm->resume)
954 (ibm->resume)();
962 struct ibm_struct *ibm, *itmp;
964 list_for_each_entry_safe(ibm, itmp,
967 if (ibm->shutdown)
968 (ibm->shutdown)();
3115 * ibm-acpi-devel mailing lists, and you should read the
3480 "legacy ibm/hotkey event reporting over procfs %s\n",
3649 static void hotkey_notify(struct ibm_struct *ibm, u32 event)
3661 ibm->acpi->device->pnp.device_class,
3662 dev_name(&ibm->acpi->device->dev),
3755 acpi_bus_generate_proc_event(ibm->acpi->device,
3762 ibm->acpi->device->pnp.device_class,
3763 dev_name(&ibm->acpi->device->dev),
8484 static void ibm_exit(struct ibm_struct *ibm)
8486 dbg_printk(TPACPI_DBG_EXIT, "removing %s\n", ibm->name);
8488 list_del_init(&ibm->all_drivers);
8490 if (ibm->flags.acpi_notify_installed) {
8492 "%s: acpi_remove_notify_handler\n", ibm->name);
8493 BUG_ON(!ibm->acpi);
8494 acpi_remove_notify_handler(*ibm->acpi->handle,
8495 ibm->acpi->type,
8497 ibm->flags.acpi_notify_installed = 0;
8498 ibm->flags.acpi_notify_installed = 0;
8501 if (ibm->flags.proc_created) {
8503 "%s: remove_proc_entry\n", ibm->name);
8504 remove_proc_entry(ibm->name, proc_dir);
8505 ibm->flags.proc_created = 0;
8508 if (ibm->flags.acpi_driver_registered) {
8510 "%s: acpi_bus_unregister_driver\n", ibm->name);
8511 BUG_ON(!ibm->acpi);
8512 acpi_bus_unregister_driver(ibm->acpi->driver);
8513 kfree(ibm->acpi->driver);
8514 ibm->acpi->driver = NULL;
8515 ibm->flags.acpi_driver_registered = 0;
8518 if (ibm->flags.init_called && ibm->exit) {
8519 ibm->exit();
8520 ibm->flags.init_called = 0;
8523 dbg_printk(TPACPI_DBG_INIT, "finished removing %s\n", ibm->name);
8529 struct ibm_struct *ibm = iibm->data;
8532 BUG_ON(ibm == NULL);
8534 INIT_LIST_HEAD(&ibm->all_drivers);
8536 if (ibm->flags.experimental && !experimental)
8540 "probing for %s\n", ibm->name);
8549 ibm->flags.init_called = 1;
8552 if (ibm->acpi) {
8553 if (ibm->acpi->hid) {
8554 ret = register_tpacpi_subdriver(ibm);
8559 if (ibm->acpi->notify) {
8560 ret = setup_acpi_notify(ibm);
8563 ibm->name);
8573 "%s installed\n", ibm->name);
8575 if (ibm->read) {
8580 if (ibm->write)
8582 entry = proc_create_data(ibm->name, mode, proc_dir,
8583 &dispatch_proc_fops, ibm);
8586 ibm->name);
8590 ibm->flags.proc_created = 1;
8593 list_add_tail(&ibm->all_drivers, &tpacpi_all_drivers);
8600 ibm->name, ret);
8602 ibm_exit(ibm);
8837 struct ibm_struct *ibm;
8843 ibm = ibms_init[i].data;
8844 WARN_ON(ibm == NULL);
8846 if (!ibm || !ibm->name)
8849 if (strcmp(ibm->name, kp->name) == 0 && ibm->write) {
8960 struct ibm_struct *ibm, *itmp;
8964 list_for_each_entry_safe_reverse(ibm, itmp,
8967 ibm_exit(ibm);