Lines Matching +full:display +full:- +full:width +full:- +full:chars
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Chassis LCD/LED driver for HP-PARISC workstations
7 * (c) Copyright 2001-2009 Helge Deller <deller@gmx.de>
11 * - speed-up calculations with inlined assembler
12 * - interface to write to second row of LCD from /proc (if technically possible)
15 * - Audit copy_from_user in led_proc_write.
17 * - Switch from using a tasklet to a work queue, so the led_LCD_driver
50 /* The control of the LEDs and LCDs on PARISC-machines have to be done
56 static int led_type __read_mostly = -1;
84 lcd_cmd_reg_addr needs to be 64bit aligned on 64bit PA2.0-machines */
87 unsigned long lcd_width:16; /* width of the LCD in chars (DISPLAY_MODEL_LCD only) */
88 unsigned long lcd_cmd_reg_addr; /* ptr to LCD cmd-register & data ptr for LED */
89 unsigned long lcd_data_reg_addr; /* ptr to LCD data-register (LCD only) */
90 unsigned int min_cmd_delay; /* delay in uS after cmd-write (LCD only) */
103 #define KITTYHAWK_LCD_CMD F_EXTEND(0xf0190000UL) /* 64bit-ready */
106 /* lcd_info is pre-initialized to the values needed to program KittyHawk LCD's
129 /* The workqueue must be created at init-time */
132 /* Display the default text now */ in start_task()
141 return -ENOMEM; in start_task()
150 /* ptr to LCD/LED-specific function */
156 switch ((long)m->private) in led_proc_show()
186 return -EACCES; in led_proc_write()
189 count = sizeof(lbuf)-1; in led_proc_write()
192 return -EFAULT; in led_proc_write()
200 d = *cur++ - '0'; in led_proc_write()
206 d = *cur++ - '0'; in led_proc_write()
212 d = *cur++ - '0'; in led_proc_write()
218 if (*cur && cur[strlen(cur)-1] == '\n') in led_proc_write()
219 cur[strlen(cur)-1] = 0; in led_proc_write()
233 return -EINVAL; in led_proc_write()
249 if (led_type == -1) return -1; in led_create_procfs()
252 if (!proc_pdc_root) return -1; in led_create_procfs()
258 if (!ent) return -1; in led_create_procfs()
265 if (!ent) return -1; in led_create_procfs()
331 gsc_writeb( blockp[i]->command, LCD_CMD_REG ); in led_LCD_driver()
334 gsc_writeb( leds & mask[i] ? blockp[i]->on : in led_LCD_driver()
335 blockp[i]->off, LCD_DATA_REG ); in led_LCD_driver()
346 ** calculate if there was TX- or RX-throughput on the network interfaces
368 if (!in_dev || !in_dev->ifa_list) in led_get_net_activity()
370 if (ipv4_is_loopback(in_dev->ifa_list->ifa_local)) in led_get_net_activity()
373 rx_total += stats->rx_packets; in led_get_net_activity()
374 tx_total += stats->tx_packets; in led_get_net_activity()
399 ** calculate if there was disk-io in the system
428 - display load average (older machines like 715/64 have 4 "free" LED's for that)
429 - optimizations
449 count_HZ += jiffies - last_jiffies; in led_work_func()
456 /* flash heartbeat-LED like a real heart in led_work_func()
545 ** currently only LCD-, LASI- and ASP-style LCD/LED's are supported.
562 printk(KERN_INFO "LCD display at %lx,%lx registered\n", in register_led_driver()
574 printk(KERN_INFO "LED display at %lx registered\n", LED_DATA_REG); in register_led_driver()
581 printk(KERN_INFO "LED (ASP-style) display at %lx registered\n", in register_led_driver()
609 ** At bootup - where the initialisation of the LCD/LED normally happens -
611 ** so that we delay the led-registration until after busdevices_init()
635 ** Displays the given string on the LCD-Display of newer machines.
636 ** lcd_print() disables/enables the timer-based led work queue to
651 /* copy display string to buffer for procfs */ in lcd_print()
667 /* re-queue the work */ in lcd_print()
678 ** led_init() is called very early in the bootup-process from setup.c
693 "Linux %s", init_utsname()->release); in led_init()
695 /* Work around the buggy PDC of KittyHawk-machines */ in led_init()
697 case 0x580: /* KittyHawk DC2-100 (K100) */ in led_init()
698 case 0x581: /* KittyHawk DC3-120 (K210) */ in led_init()
702 printk(KERN_INFO "%s: KittyHawk-Machine (hversion 0x%x) found, " in led_init()
733 case DISPLAY_MODEL_LCD: /* LCD display */ in led_init()
735 offsetof(struct pdc_chassis_lcd_info_ret_block, _pad)-1) in led_init()
747 case DISPLAY_MODEL_LASI: /* Lasi style 8 bit LED display */ in led_init()