Debian Codegraph @

src/superio/nsc/pc87392/superio.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 #include <device/device.h>
4 #include <device/pnp.h>
5
6 #include "pc87392.h"
7
8 static void init(struct device *dev)
9 {
10 if (!dev->enabled)
11 return;
12 }
13
14 static struct device_operations ops = {
15 .read_resources = pnp_read_resources,
16 .set_resources = pnp_set_resources,
17 .enable_resources = pnp_enable_resources,
18 .enable = pnp_enable,
19 .init = init,
20 };
21
22 static struct pnp_info pnp_dev_info[] = {
23 { NULL, PC87392_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8 },
24 { NULL, PC87392_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8 },
25 { NULL, PC87392_SP2, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0 | PNP_DRQ1,
26 0x07f8 },
27 { NULL, PC87392_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8 },
28 { NULL, PC87392_GPIO, PNP_IO0 | PNP_IRQ0, 0xfff8 },
29 { NULL, PC87392_WDT, PNP_IO0 | PNP_IRQ0, 0xfffc },
30 };
31
32 static void enable_dev(struct device *dev)
33 {
34 pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
35 }
36
37 struct chip_operations superio_nsc_pc87392_ops = {
38 .name = "NSC PC87392 Super I/O",
39 .enable_dev = enable_dev,
40 };