spi_acpi.c (1f40866feb2135a4cf764a07b1b90a8a3398ff0a) spi_acpi.c (2a04c3a47b74aa1114787fe24bbddf180ac57a5a)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2021 Val Packett <val@packett.cool>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 79 unchanged lines hidden (view full) ---

88static device_method_t intelspi_acpi_methods[] = {
89 /* Device interface */
90 DEVMETHOD(device_probe, intelspi_acpi_probe),
91 DEVMETHOD(device_attach, intelspi_acpi_attach),
92 DEVMETHOD(device_detach, intelspi_detach),
93 DEVMETHOD(device_suspend, intelspi_suspend),
94 DEVMETHOD(device_resume, intelspi_resume),
95
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2021 Val Packett <val@packett.cool>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 79 unchanged lines hidden (view full) ---

88static device_method_t intelspi_acpi_methods[] = {
89 /* Device interface */
90 DEVMETHOD(device_probe, intelspi_acpi_probe),
91 DEVMETHOD(device_attach, intelspi_acpi_attach),
92 DEVMETHOD(device_detach, intelspi_detach),
93 DEVMETHOD(device_suspend, intelspi_suspend),
94 DEVMETHOD(device_resume, intelspi_resume),
95
96 /* Bus interface */
97 DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
98 DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
99 DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource),
100 DEVMETHOD(bus_release_resource, bus_generic_release_resource),
101 DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
102 DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
103 DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource),
104
96 /* SPI interface */
97 DEVMETHOD(spibus_transfer, intelspi_transfer),
98
99 DEVMETHOD_END
100};
101
102static driver_t intelspi_acpi_driver = {
103 "spi",
104 intelspi_acpi_methods,
105 sizeof(struct intelspi_softc),
106};
107
108DRIVER_MODULE(intelspi, acpi, intelspi_acpi_driver, 0, 0);
109MODULE_DEPEND(intelspi, acpi, 1, 1, 1);
110MODULE_DEPEND(intelspi, spibus, 1, 1, 1);
111ACPI_PNP_INFO(intelspi_ids);
105 /* SPI interface */
106 DEVMETHOD(spibus_transfer, intelspi_transfer),
107
108 DEVMETHOD_END
109};
110
111static driver_t intelspi_acpi_driver = {
112 "spi",
113 intelspi_acpi_methods,
114 sizeof(struct intelspi_softc),
115};
116
117DRIVER_MODULE(intelspi, acpi, intelspi_acpi_driver, 0, 0);
118MODULE_DEPEND(intelspi, acpi, 1, 1, 1);
119MODULE_DEPEND(intelspi, spibus, 1, 1, 1);
120ACPI_PNP_INFO(intelspi_ids);