Debian Codegraph @

src/superio/smsc/sio10n268/superio.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <device/device.h>
4 #include <device/pnp.h>
5 #include <pc80/keyboard.h>
6
7 #include "sio10n268.h"
8
9 static void init(struct device *dev)
10 {
11 if (!dev->enabled)
12 return;
13
14 switch (dev->path.pnp.device) {
15 case SIO10N268_FDC: /* TODO. */
16 break;
17 case SIO10N268_PP: /* TODO. */
18 break;
19 case SIO10N268_KBDC:
20 /* TODO: This is still hardcoded. */
21 pc_keyboard_init(NO_AUX_DEVICE);
22 break;
23 // [..] The rest: TODO
24 }
25 }
26
27 static struct device_operations ops = {
28 .read_resources = pnp_read_resources,
29 .set_resources = pnp_set_resources,
30 .enable_resources = pnp_enable_resources,
31 .enable = pnp_enable,
32 .init = init,
33 };
34
35 /* TODO: FDC, PP, AUX. */
36 static struct pnp_info pnp_dev_info[] = {
37 { NULL, SIO10N268_KBDC, PNP_IO0 | PNP_IO1, 0x07f8, 0x07f8, },
38 };
39
40 static void enable_dev(struct device *dev)
41 {
42 pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
43 }
44
45 struct chip_operations superio_smsc_sio10n268_ops = {
46 .name = "SMSC SIO10N268 Super I/O",
47 .enable_dev = enable_dev,
48 };