Source
/*
* Bachmann ot200 leds driver.
*
* Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* Christian Gmeiner <christian.gmeiner@gmail.com>
*
* License: GPL as published by the FSF.
*/
struct ot200_led {
struct led_classdev cdev;
const char *name;
unsigned long port;
u8 mask;
};
/*
* The device has three leds on the back panel (led_err, led_init and led_run)
* and can handle up to seven leds on the front panel.
*/
static struct ot200_led leds[] = {
{
.name = "led_run",
.port = 0x5a,
.mask = BIT(0),
},
{
.name = "led_init",
.port = 0x5a,
.mask = BIT(1),
},
{
.name = "led_err",
.port = 0x5a,
.mask = BIT(2),
},
{
.name = "led_1",
.port = 0x49,
.mask = BIT(6),
},
{
.name = "led_2",
.port = 0x49,
.mask = BIT(5),
},
{
.name = "led_3",
.port = 0x49,
.mask = BIT(4),
},
{
.name = "led_4",
.port = 0x49,