1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <device/device.h>
4 #include <device/pnp.h>
5 #include <pc80/keyboard.h>
8 static void init(struct device
*dev
)
13 switch (dev
->path
.pnp
.device
) {
15 pc_keyboard_init(NO_AUX_DEVICE
);
20 static struct device_operations ops
= {
21 .read_resources
= pnp_read_resources
,
22 .set_resources
= pnp_set_resources
,
23 .enable_resources
= pnp_enable_resources
,
28 static struct pnp_info pnp_dev_info
[] = {
30 PNP_IO0
| PNP_IRQ0
| PNP_DRQ0
| PNP_MSC0
| PNP_MSC1
| PNP_MSC8
,
33 PNP_IO0
| PNP_IRQ0
| PNP_DRQ0
| PNP_MSC0
| PNP_MSC8
,
36 PNP_IO0
| PNP_IRQ0
| PNP_MSC0
,
39 PNP_IO0
| PNP_IO1
| PNP_IRQ0
,
41 { NULL
, WPCD376I_KBCM
,
43 { NULL
, WPCD376I_KBCK
,
44 PNP_IO0
| PNP_IO1
| PNP_IRQ0
| PNP_MSC0
,
46 { NULL
, WPCD376I_GPIO
,
47 PNP_IO0
| PNP_IRQ0
| PNP_MSC0
| PNP_MSC1
| PNP_MSC2
| PNP_MSC3
|
50 { NULL
, WPCD376I_ECIR
,
51 PNP_IO0
| PNP_IO1
| PNP_IRQ0
,
54 PNP_IO0
| PNP_IRQ0
| PNP_DRQ0
| PNP_DRQ1
| PNP_MSC0
,
58 static void enable_dev(struct device
*dev
)
60 pnp_enable_devices(dev
, &ops
, ARRAY_SIZE(pnp_dev_info
), pnp_dev_info
);
63 struct chip_operations superio_winbond_wpcd376i_ops
= {
64 CHIP_NAME("Winbond WPCD376I Super I/O")
65 .enable_dev
= enable_dev
,