acpi_toshiba.c (130534) | acpi_toshiba.c (131284) |
---|---|
1/*- 2 * Copyright (c) 2003 Hiroyuki Aizu <aizu@navi.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003 Hiroyuki Aizu <aizu@navi.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_toshiba.c 130534 2004-06-15 16:49:20Z njl $"); | 29__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_toshiba.c 131284 2004-06-29 19:05:20Z njl $"); |
30 31#include "opt_acpi.h" 32#include <sys/param.h> 33#include <sys/kernel.h> 34#include <sys/module.h> 35#include <sys/bus.h> 36 37#include "acpi.h" --- 169 unchanged lines hidden (view full) --- 207 * TOS6200 Libretto L Series 208 * Dynabook Satellite 2455 209 * Dynabook SS 3500 210 * TOS6207 Dynabook SS2110 Series 211 */ 212static int 213acpi_toshiba_probe(device_t dev) 214{ | 30 31#include "opt_acpi.h" 32#include <sys/param.h> 33#include <sys/kernel.h> 34#include <sys/module.h> 35#include <sys/bus.h> 36 37#include "acpi.h" --- 169 unchanged lines hidden (view full) --- 207 * TOS6200 Libretto L Series 208 * Dynabook Satellite 2455 209 * Dynabook SS 3500 210 * TOS6207 Dynabook SS2110 Series 211 */ 212static int 213acpi_toshiba_probe(device_t dev) 214{ |
215 ACPI_HANDLE h; 216 int ret = ENXIO; | 215 static char *tosh_ids[] = { "TOS6200", "TOS6207", NULL }; |
217 | 216 |
218 h = acpi_get_handle(dev); 219 if (!acpi_disabled("toshiba") && 220 acpi_get_type(dev) == ACPI_TYPE_DEVICE && 221 device_get_unit(dev) == 0 && 222 (acpi_MatchHid(h, "TOS6200") || 223 acpi_MatchHid(h, "TOS6207"))) { 224 device_set_desc(dev, "Toshiba HCI Extras"); 225 ret = 0; 226 } | 217 if (acpi_disabled("toshiba") || 218 ACPI_ID_PROBE(device_get_parent(dev), dev, tosh_ids) == NULL || 219 device_get_unit(dev) != 0) 220 return (ENXIO); |
227 | 221 |
228 return (ret); | 222 device_set_desc(dev, "Toshiba HCI Extras"); 223 return (0); |
229} 230 231static int 232acpi_toshiba_attach(device_t dev) 233{ 234 struct acpi_toshiba_softc *sc; 235 struct acpi_softc *acpi_sc; 236 ACPI_STATUS status; --- 282 unchanged lines hidden (view full) --- 519 * 520 * HID Model 521 * ------------------------------------- 522 * TOS6201 Libretto L Series 523 */ 524static int 525acpi_toshiba_video_probe(device_t dev) 526{ | 224} 225 226static int 227acpi_toshiba_attach(device_t dev) 228{ 229 struct acpi_toshiba_softc *sc; 230 struct acpi_softc *acpi_sc; 231 ACPI_STATUS status; --- 282 unchanged lines hidden (view full) --- 514 * 515 * HID Model 516 * ------------------------------------- 517 * TOS6201 Libretto L Series 518 */ 519static int 520acpi_toshiba_video_probe(device_t dev) 521{ |
527 int ret = ENXIO; | 522 static char *vid_ids[] = { "TOS6201", NULL }; |
528 | 523 |
529 if (!acpi_disabled("toshiba") && 530 acpi_get_type(dev) == ACPI_TYPE_DEVICE && 531 device_get_unit(dev) == 0 && 532 acpi_MatchHid(acpi_get_handle(dev), "TOS6201")) { 533 device_quiet(dev); 534 device_set_desc(dev, "Toshiba Video"); 535 ret = 0; 536 } | 524 if (acpi_disabled("toshiba") || 525 ACPI_ID_PROBE(device_get_parent(dev), dev, vid_ids) == NULL || 526 device_get_unit(dev) != 0) 527 return (ENXIO); |
537 | 528 |
538 return (ret); | 529 device_quiet(dev); 530 device_set_desc(dev, "Toshiba Video"); 531 return (0); |
539} 540 541static int 542acpi_toshiba_video_attach(device_t dev) 543{ 544 struct acpi_toshiba_softc *sc; 545 546 sc = devclass_get_softc(acpi_toshiba_devclass, 0); 547 if (sc == NULL) 548 return (ENXIO); 549 sc->video_handle = acpi_get_handle(dev); 550 return (0); 551} | 532} 533 534static int 535acpi_toshiba_video_attach(device_t dev) 536{ 537 struct acpi_toshiba_softc *sc; 538 539 sc = devclass_get_softc(acpi_toshiba_devclass, 0); 540 if (sc == NULL) 541 return (ENXIO); 542 sc->video_handle = acpi_get_handle(dev); 543 return (0); 544} |