1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <device/device.h>
4 #include <device/pnp.h>
5 #include <pc80/keyboard.h>
6 #include <superio/conf_mode.h>
10 static void init(struct device
*dev
)
15 switch (dev
->path
.pnp
.device
) {
16 case IT8721F_FDC
: /* TODO. */
18 case IT8721F_PP
: /* TODO. */
20 case IT8721F_EC
: /* TODO. */
23 pc_keyboard_init(NO_AUX_DEVICE
);
25 case IT8721F_KBCM
: /* TODO. */
27 case IT8721F_IR
: /* TODO. */
32 static struct device_operations ops
= {
33 .read_resources
= pnp_read_resources
,
34 .set_resources
= pnp_set_resources
,
35 .enable_resources
= pnp_enable_resources
,
38 .ops_pnp_mode
= &pnp_conf_mode_870155_aa
,
42 static struct pnp_info pnp_dev_info
[] = {
43 { NULL
, IT8721F_FDC
, PNP_IO0
| PNP_IRQ0
| PNP_DRQ0
44 | PNP_MSC0
| PNP_MSC1
, 0x0ff8, },
45 { NULL
, IT8721F_SP1
, PNP_IO0
| PNP_IRQ0
, 0x07f8, },
46 { NULL
, IT8721F_SP2
, PNP_IO0
| PNP_IRQ0
| PNP_DRQ0
| PNP_DRQ1
,
48 { NULL
, IT8721F_PP
, PNP_IO0
| PNP_IO1
| PNP_IRQ0
| PNP_DRQ0
| PNP_MSC0
,
50 { NULL
, IT8721F_EC
, PNP_IO0
| PNP_IO1
| PNP_IRQ0
51 | PNP_MSC0
| PNP_MSC1
| PNP_MSC2
| PNP_MSC3
52 | PNP_MSC4
| PNP_MSC5
| PNP_MSC6
,
54 { NULL
, IT8721F_KBCK
, PNP_IO0
| PNP_IO1
| PNP_IRQ0
, 0x07f8, 0x07f8, },
55 { NULL
, IT8721F_KBCM
, PNP_IRQ0
| PNP_MSC0
, },
56 { NULL
, IT8721F_IR
, },
59 static void enable_dev(struct device
*dev
)
61 pnp_enable_devices(dev
, &ops
, ARRAY_SIZE(pnp_dev_info
), pnp_dev_info
);
64 struct chip_operations superio_ite_it8721f_ops
= {
65 .name
= "ITE IT8721F Super I/O",
66 .enable_dev
= enable_dev
,