1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Registration of Cobalt LED platform device.
5 * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org>
7 #include <linux/errno.h>
8 #include <linux/init.h>
9 #include <linux/ioport.h>
10 #include <linux/platform_device.h>
14 static struct resource cobalt_led_resource __initdata
= {
17 .flags
= IORESOURCE_MEM
,
20 static __init
int cobalt_led_add(void)
22 struct platform_device
*pdev
;
25 if (cobalt_board_id
== COBALT_BRD_ID_QUBE1
||
26 cobalt_board_id
== COBALT_BRD_ID_QUBE2
)
27 pdev
= platform_device_alloc("cobalt-qube-leds", -1);
29 pdev
= platform_device_alloc("cobalt-raq-leds", -1);
34 retval
= platform_device_add_resources(pdev
, &cobalt_led_resource
, 1);
38 retval
= platform_device_add(pdev
);
45 platform_device_put(pdev
);
49 device_initcall(cobalt_led_add
);