blob: 60e0994281f4d8be2ccf404698e01bee35b00642 [file] [log] [blame]
Felix Held3f3eca92020-01-23 17:12:32 +01001/* SPDX-License-Identifier: GPL-2.0-or-later */
Sven Schnelle071d8352011-03-03 08:29:03 +00002
Sven Schnelle071d8352011-03-03 08:29:03 +00003#include <device/device.h>
4#include <device/pnp.h>
Elyes HAOUAS2329a252019-05-15 22:11:18 +02005
Sven Schnelle071d8352011-03-03 08:29:03 +00006#include "pc87384.h"
7
Sven Schnelle071d8352011-03-03 08:29:03 +00008static struct device_operations ops = {
9 .read_resources = pnp_read_resources,
10 .set_resources = pnp_set_resources,
11 .enable_resources = pnp_enable_resources,
12 .enable = pnp_enable,
Sven Schnelle071d8352011-03-03 08:29:03 +000013};
14
15static struct pnp_info pnp_dev_info[] = {
Felix Heldd5292bf2019-01-16 13:23:35 +010016 { NULL, PC87384_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8 },
Felix Heldfaca0bc2017-12-27 22:51:29 +010017 { NULL, PC87384_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8 },
18 { NULL, PC87384_SP2, PNP_IO0 | PNP_IRQ0, 0x07f8 },
19 { NULL, PC87384_GPIO, PNP_IO0 | PNP_IRQ0, 0xfff0 },
Sven Schnelle071d8352011-03-03 08:29:03 +000020};
21
22static void enable_dev(struct device *dev)
23{
Felix Heldfaca0bc2017-12-27 22:51:29 +010024 pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
Sven Schnelle071d8352011-03-03 08:29:03 +000025}
26
27struct chip_operations superio_nsc_pc87384_ops = {
Nicholas Sudsgaardbfb11be2024-01-30 09:53:46 +090028 .name = "NSC PC87384 Super I/O",
Sven Schnelle071d8352011-03-03 08:29:03 +000029 .enable_dev = enable_dev,
30};