1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <device/device.h>
4 #include <device/pnp.h>
5 #include <superio/conf_mode.h>
6 #include <pc80/keyboard.h>
10 static void w83977tf_init(struct device
*dev
)
16 switch (dev
->path
.pnp
.device
) {
18 pc_keyboard_init(NO_AUX_DEVICE
);
23 static struct device_operations ops
= {
24 .read_resources
= pnp_read_resources
,
25 .set_resources
= pnp_set_resources
,
26 .enable_resources
= pnp_enable_resources
,
28 .init
= w83977tf_init
,
29 .ops_pnp_mode
= &pnp_conf_mode_8787_aa
,
32 static struct pnp_info pnp_dev_info
[] = {
33 { NULL
, W83977TF_FDC
, PNP_IO0
| PNP_IRQ0
| PNP_DRQ0
, 0x07f8, },
34 { NULL
, W83977TF_PP
, PNP_IO0
| PNP_IRQ0
| PNP_DRQ0
, 0x07f8, },
35 { NULL
, W83977TF_SP1
, PNP_IO0
| PNP_IRQ0
, 0x07f8, },
36 { NULL
, W83977TF_SP2
, PNP_IO0
| PNP_IRQ0
, 0x07f8, },
37 { NULL
, W83977TF_KBC
, PNP_IO0
| PNP_IO1
| PNP_IRQ0
| PNP_IRQ1
,
39 #if CONFIG(W83977TF_HAVE_SEPARATE_IR_DEVICE)
40 { NULL
, W83977TF_CIR
, PNP_IO0
| PNP_IRQ0
, 0x07f8, },
42 { NULL
, W83977TF_GAME_MIDI_GPIO1
, PNP_IO0
| PNP_IO1
| PNP_IRQ0
,
44 { NULL
, W83977TF_ACPI
, PNP_IRQ0
, },
47 static void enable_dev(struct device
*dev
)
49 pnp_enable_devices(dev
, &ops
, ARRAY_SIZE(pnp_dev_info
), pnp_dev_info
);
52 struct chip_operations superio_winbond_w83977tf_ops
= {
53 CHIP_NAME("Winbond W83977TF Super I/O")
54 .enable_dev
= enable_dev
,