Lines Matching +full:led +full:- +full:heartbeat

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Chassis LCD/LED driver for HP-PARISC workstations
8 * (c) Copyright 2000-2023 Helge Deller <deller@gmx.de>
32 #include <asm/led.h>
39 static unsigned char lastleds; /* LED state from most recent update */
43 static unsigned char lcd_no_led_support; /* KittyHawk doesn't support LED on its LCD */
47 unsigned char on; /* value for turning LED on */
48 unsigned char off; /* value for turning LED off */
53 lcd_cmd_reg_addr needs to be 64bit aligned on 64bit PA2.0-machines */
57 unsigned long lcd_cmd_reg_addr; /* ptr to LCD cmd-register & data ptr for LED */
58 unsigned long lcd_data_reg_addr; /* ptr to LCD data-register (LCD only) */
59 unsigned int min_cmd_delay; /* delay in uS after cmd-write (LCD only) */
63 struct lcd_block heartbeat; member
75 /* lcd_info is pre-initialized to the values needed to program KittyHawk LCD's
94 /* ptr to LCD/LED-specific function */
126 * Displays the given string on the LCD-Display of newer machines.
144 * led_ASP_driver() - LED driver for the ASP controller chip
146 * @leds: bitmap representing the LED status
163 * led_LASI_driver() - LED driver for the LASI controller chip
165 * @leds: bitmap representing the LED status
174 * led_LCD_driver() - LED & LCD driver for LCD chips
176 * @leds: bitmap representing the LED status
185 &lcd_info.heartbeat, in led_LCD_driver()
197 gsc_writeb( blockp[i]->command, LCD_CMD_REG ); in led_LCD_driver()
200 gsc_writeb( leds & mask[i] ? blockp[i]->on : in led_LCD_driver()
201 blockp[i]->off, LCD_DATA_REG ); in led_LCD_driver()
218 * LED/LCD activities.
266 unsigned char led_bit = p->led_bit; in set_led()
284 p = devm_kzalloc(&pdev->dev, sizeof(*p), GFP_KERNEL); in hppa_led_generic_probe()
286 return -ENOMEM; in hppa_led_generic_probe()
289 struct led_classdev *lp = &p->leds[i].led_cdev; in hppa_led_generic_probe()
291 p->leds[i].led_bit = BIT(i); in hppa_led_generic_probe()
292 lp->name = types[i].name; in hppa_led_generic_probe()
293 lp->brightness = LED_FULL; in hppa_led_generic_probe()
294 lp->brightness_set = types[i].handler; in hppa_led_generic_probe()
295 lp->default_trigger = types[i].default_trigger; in hppa_led_generic_probe()
296 err = led_classdev_register(&pdev->dev, lp); in hppa_led_generic_probe()
298 dev_err(&pdev->dev, "Could not register %s LED\n", in hppa_led_generic_probe()
299 lp->name); in hppa_led_generic_probe()
300 for (i--; i >= 0; i--) in hppa_led_generic_probe()
301 led_classdev_unregister(&p->leds[i].led_cdev); in hppa_led_generic_probe()
317 led_classdev_unregister(&p->leds[i].led_cdev); in platform_led_remove()
322 .name = "platform-lan-tx",
327 .name = "platform-lan-rx",
332 .name = "platform-disk",
334 .default_trigger = "disk-activity",
337 .name = "platform-heartbeat",
339 .default_trigger = "heartbeat",
342 .name = "platform-LED4",
347 .name = "platform-LED5",
352 .name = "platform-LED6",
357 .name = "platform-LED7",
368 MODULE_ALIAS("platform:platform-leds");
374 .name = "platform-leds",
383 .name = "platform-leds",
390 * @cmd_reg: physical address of cmd register for the LED/LCD
391 * @data_reg: physical address of data register for the LED/LCD
393 * Registers a chassis LED or LCD which should be driven by this driver.
394 * Only PDC-based, LASI- or ASP-style LEDs and LCDs are supported.
411 pr_info("led: LCD display at %#lx and %#lx\n", in register_led_driver()
423 pr_info("led: LED display at %#lx\n", LED_DATA_REG); in register_led_driver()
430 pr_info("led: LED (ASP-style) display at %#lx\n", in register_led_driver()
436 pr_err("led: Unknown LCD/LED model type %d\n", lcd_info.model); in register_led_driver()
448 * early_led_init() is called early in the bootup-process and asks the
449 * PDC for an usable chassis LCD or LED. If the PDC doesn't return any
450 * info, then a LED might be detected by the LASI or ASP drivers later.
460 "Linux %s", init_utsname()->release); in early_led_init()
464 /* Work around the buggy PDC of KittyHawk-machines */ in early_led_init()
466 case 0x580: /* KittyHawk DC2-100 (K100) */ in early_led_init()
467 case 0x581: /* KittyHawk DC3-120 (K210) */ in early_led_init()
471 pr_info("LCD on KittyHawk-Machine found.\n"); in early_led_init()
473 /* KittyHawk has no LED support on its LCD, so skip LED detection */ in early_led_init()
495 offsetof(struct pdc_chassis_lcd_info_ret_block, _pad)-1) in early_led_init()
503 case DISPLAY_MODEL_NONE: /* no LED or LCD available */ in early_led_init()
506 case DISPLAY_MODEL_LASI: /* Lasi style 8 bit LED display */ in early_led_init()
512 pr_warn("PDC reported unknown LCD/LED model %d\n", in early_led_init()
518 /* register the LCD/LED driver */ in early_led_init()
526 * Register_led_regions() registers the LCD/LED regions for /procfs.
527 * At bootup - where the initialisation of the LCD/LED often happens
529 * so that we delay the led-registration until after busdevices_init()
549 printk(KERN_INFO "LED: failed to register LEDs\n"); in startup_leds()