11 #include <linux/kernel.h>
15 #include <asm/processor.h>
18 #include <unit/leds.h>
20 static const u8 asb2305_led_hex_tbl[16] = {
21 0x80, 0xf2, 0x48, 0x60, 0x32, 0x24, 0x04, 0xf0,
22 0x00, 0x20, 0x10, 0x06, 0x8c, 0x42, 0x0c, 0x1c
25 static const u32 asb2305_led_chase_tbl[6] = {
34 static unsigned asb2305_led_chase;
40 leds = asb2305_led_hex_tbl[(val/1000) % 10];
42 leds |= asb2305_led_hex_tbl[(val/100) % 10];
44 leds |= asb2305_led_hex_tbl[(val/10) % 10];
46 leds |= asb2305_led_hex_tbl[val % 10];
47 leds |= points^0x01010101;
56 leds = asb2305_led_hex_tbl[(val/1000) % 10];
58 leds |= asb2305_led_hex_tbl[(val/100) % 10];
60 leds |= asb2305_led_hex_tbl[(val/10) % 10];
62 leds |= asb2305_led_hex_tbl[val % 10];
63 leds |= points^0x01010101;
72 leds = asb2305_led_hex_tbl[(code/0x100) % 0x10];
74 leds |= asb2305_led_hex_tbl[(code/0x10) % 0x10];
76 leds |= asb2305_led_hex_tbl[code % 0x10];
86 leds = asb2305_led_hex_tbl[(time/600) % 6];
88 leds |= asb2305_led_hex_tbl[(time/60) % 10];
90 leds |= asb2305_led_hex_tbl[(time/10) % 6];
92 leds |= asb2305_led_hex_tbl[time % 10];
93 leds |= points^0x01010101;
106 clock = ((mins & 0xf0) >> 4);
108 clock += (mins & 0x0f);
111 clock += ((secs & 0xf0) >> 4);
113 clock += (secs & 0x0f);
122 if (asb2305_led_chase >= 6)
123 asb2305_led_chase = 0;