18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * LCD Lowlevel Control Abstraction 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2003,2004 Hewlett-Packard Company 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#include <linux/module.h> 128c2ecf20Sopenharmony_ci#include <linux/init.h> 138c2ecf20Sopenharmony_ci#include <linux/device.h> 148c2ecf20Sopenharmony_ci#include <linux/lcd.h> 158c2ecf20Sopenharmony_ci#include <linux/notifier.h> 168c2ecf20Sopenharmony_ci#include <linux/ctype.h> 178c2ecf20Sopenharmony_ci#include <linux/err.h> 188c2ecf20Sopenharmony_ci#include <linux/fb.h> 198c2ecf20Sopenharmony_ci#include <linux/slab.h> 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#if defined(CONFIG_FB) || (defined(CONFIG_FB_MODULE) && \ 228c2ecf20Sopenharmony_ci defined(CONFIG_LCD_CLASS_DEVICE_MODULE)) 238c2ecf20Sopenharmony_ci/* This callback gets called when something important happens inside a 248c2ecf20Sopenharmony_ci * framebuffer driver. We're looking if that important event is blanking, 258c2ecf20Sopenharmony_ci * and if it is, we're switching lcd power as well ... 268c2ecf20Sopenharmony_ci */ 278c2ecf20Sopenharmony_cistatic int fb_notifier_callback(struct notifier_block *self, 288c2ecf20Sopenharmony_ci unsigned long event, void *data) 298c2ecf20Sopenharmony_ci{ 308c2ecf20Sopenharmony_ci struct lcd_device *ld; 318c2ecf20Sopenharmony_ci struct fb_event *evdata = data; 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci ld = container_of(self, struct lcd_device, fb_notif); 348c2ecf20Sopenharmony_ci if (!ld->ops) 358c2ecf20Sopenharmony_ci return 0; 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci mutex_lock(&ld->ops_lock); 388c2ecf20Sopenharmony_ci if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) { 398c2ecf20Sopenharmony_ci if (event == FB_EVENT_BLANK) { 408c2ecf20Sopenharmony_ci if (ld->ops->set_power) 418c2ecf20Sopenharmony_ci ld->ops->set_power(ld, *(int *)evdata->data); 428c2ecf20Sopenharmony_ci } else { 438c2ecf20Sopenharmony_ci if (ld->ops->set_mode) 448c2ecf20Sopenharmony_ci ld->ops->set_mode(ld, evdata->data); 458c2ecf20Sopenharmony_ci } 468c2ecf20Sopenharmony_ci } 478c2ecf20Sopenharmony_ci mutex_unlock(&ld->ops_lock); 488c2ecf20Sopenharmony_ci return 0; 498c2ecf20Sopenharmony_ci} 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_cistatic int lcd_register_fb(struct lcd_device *ld) 528c2ecf20Sopenharmony_ci{ 538c2ecf20Sopenharmony_ci memset(&ld->fb_notif, 0, sizeof(ld->fb_notif)); 548c2ecf20Sopenharmony_ci ld->fb_notif.notifier_call = fb_notifier_callback; 558c2ecf20Sopenharmony_ci return fb_register_client(&ld->fb_notif); 568c2ecf20Sopenharmony_ci} 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_cistatic void lcd_unregister_fb(struct lcd_device *ld) 598c2ecf20Sopenharmony_ci{ 608c2ecf20Sopenharmony_ci fb_unregister_client(&ld->fb_notif); 618c2ecf20Sopenharmony_ci} 628c2ecf20Sopenharmony_ci#else 638c2ecf20Sopenharmony_cistatic int lcd_register_fb(struct lcd_device *ld) 648c2ecf20Sopenharmony_ci{ 658c2ecf20Sopenharmony_ci return 0; 668c2ecf20Sopenharmony_ci} 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_cistatic inline void lcd_unregister_fb(struct lcd_device *ld) 698c2ecf20Sopenharmony_ci{ 708c2ecf20Sopenharmony_ci} 718c2ecf20Sopenharmony_ci#endif /* CONFIG_FB */ 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_cistatic ssize_t lcd_power_show(struct device *dev, struct device_attribute *attr, 748c2ecf20Sopenharmony_ci char *buf) 758c2ecf20Sopenharmony_ci{ 768c2ecf20Sopenharmony_ci int rc; 778c2ecf20Sopenharmony_ci struct lcd_device *ld = to_lcd_device(dev); 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci mutex_lock(&ld->ops_lock); 808c2ecf20Sopenharmony_ci if (ld->ops && ld->ops->get_power) 818c2ecf20Sopenharmony_ci rc = sprintf(buf, "%d\n", ld->ops->get_power(ld)); 828c2ecf20Sopenharmony_ci else 838c2ecf20Sopenharmony_ci rc = -ENXIO; 848c2ecf20Sopenharmony_ci mutex_unlock(&ld->ops_lock); 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ci return rc; 878c2ecf20Sopenharmony_ci} 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_cistatic ssize_t lcd_power_store(struct device *dev, 908c2ecf20Sopenharmony_ci struct device_attribute *attr, const char *buf, size_t count) 918c2ecf20Sopenharmony_ci{ 928c2ecf20Sopenharmony_ci int rc; 938c2ecf20Sopenharmony_ci struct lcd_device *ld = to_lcd_device(dev); 948c2ecf20Sopenharmony_ci unsigned long power; 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci rc = kstrtoul(buf, 0, &power); 978c2ecf20Sopenharmony_ci if (rc) 988c2ecf20Sopenharmony_ci return rc; 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci rc = -ENXIO; 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_ci mutex_lock(&ld->ops_lock); 1038c2ecf20Sopenharmony_ci if (ld->ops && ld->ops->set_power) { 1048c2ecf20Sopenharmony_ci pr_debug("set power to %lu\n", power); 1058c2ecf20Sopenharmony_ci ld->ops->set_power(ld, power); 1068c2ecf20Sopenharmony_ci rc = count; 1078c2ecf20Sopenharmony_ci } 1088c2ecf20Sopenharmony_ci mutex_unlock(&ld->ops_lock); 1098c2ecf20Sopenharmony_ci 1108c2ecf20Sopenharmony_ci return rc; 1118c2ecf20Sopenharmony_ci} 1128c2ecf20Sopenharmony_cistatic DEVICE_ATTR_RW(lcd_power); 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_cistatic ssize_t contrast_show(struct device *dev, 1158c2ecf20Sopenharmony_ci struct device_attribute *attr, char *buf) 1168c2ecf20Sopenharmony_ci{ 1178c2ecf20Sopenharmony_ci int rc = -ENXIO; 1188c2ecf20Sopenharmony_ci struct lcd_device *ld = to_lcd_device(dev); 1198c2ecf20Sopenharmony_ci 1208c2ecf20Sopenharmony_ci mutex_lock(&ld->ops_lock); 1218c2ecf20Sopenharmony_ci if (ld->ops && ld->ops->get_contrast) 1228c2ecf20Sopenharmony_ci rc = sprintf(buf, "%d\n", ld->ops->get_contrast(ld)); 1238c2ecf20Sopenharmony_ci mutex_unlock(&ld->ops_lock); 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_ci return rc; 1268c2ecf20Sopenharmony_ci} 1278c2ecf20Sopenharmony_ci 1288c2ecf20Sopenharmony_cistatic ssize_t contrast_store(struct device *dev, 1298c2ecf20Sopenharmony_ci struct device_attribute *attr, const char *buf, size_t count) 1308c2ecf20Sopenharmony_ci{ 1318c2ecf20Sopenharmony_ci int rc; 1328c2ecf20Sopenharmony_ci struct lcd_device *ld = to_lcd_device(dev); 1338c2ecf20Sopenharmony_ci unsigned long contrast; 1348c2ecf20Sopenharmony_ci 1358c2ecf20Sopenharmony_ci rc = kstrtoul(buf, 0, &contrast); 1368c2ecf20Sopenharmony_ci if (rc) 1378c2ecf20Sopenharmony_ci return rc; 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ci rc = -ENXIO; 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ci mutex_lock(&ld->ops_lock); 1428c2ecf20Sopenharmony_ci if (ld->ops && ld->ops->set_contrast) { 1438c2ecf20Sopenharmony_ci pr_debug("set contrast to %lu\n", contrast); 1448c2ecf20Sopenharmony_ci ld->ops->set_contrast(ld, contrast); 1458c2ecf20Sopenharmony_ci rc = count; 1468c2ecf20Sopenharmony_ci } 1478c2ecf20Sopenharmony_ci mutex_unlock(&ld->ops_lock); 1488c2ecf20Sopenharmony_ci 1498c2ecf20Sopenharmony_ci return rc; 1508c2ecf20Sopenharmony_ci} 1518c2ecf20Sopenharmony_cistatic DEVICE_ATTR_RW(contrast); 1528c2ecf20Sopenharmony_ci 1538c2ecf20Sopenharmony_cistatic ssize_t max_contrast_show(struct device *dev, 1548c2ecf20Sopenharmony_ci struct device_attribute *attr, char *buf) 1558c2ecf20Sopenharmony_ci{ 1568c2ecf20Sopenharmony_ci struct lcd_device *ld = to_lcd_device(dev); 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ci return sprintf(buf, "%d\n", ld->props.max_contrast); 1598c2ecf20Sopenharmony_ci} 1608c2ecf20Sopenharmony_cistatic DEVICE_ATTR_RO(max_contrast); 1618c2ecf20Sopenharmony_ci 1628c2ecf20Sopenharmony_cistatic struct class *lcd_class; 1638c2ecf20Sopenharmony_ci 1648c2ecf20Sopenharmony_cistatic void lcd_device_release(struct device *dev) 1658c2ecf20Sopenharmony_ci{ 1668c2ecf20Sopenharmony_ci struct lcd_device *ld = to_lcd_device(dev); 1678c2ecf20Sopenharmony_ci kfree(ld); 1688c2ecf20Sopenharmony_ci} 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_cistatic struct attribute *lcd_device_attrs[] = { 1718c2ecf20Sopenharmony_ci &dev_attr_lcd_power.attr, 1728c2ecf20Sopenharmony_ci &dev_attr_contrast.attr, 1738c2ecf20Sopenharmony_ci &dev_attr_max_contrast.attr, 1748c2ecf20Sopenharmony_ci NULL, 1758c2ecf20Sopenharmony_ci}; 1768c2ecf20Sopenharmony_ciATTRIBUTE_GROUPS(lcd_device); 1778c2ecf20Sopenharmony_ci 1788c2ecf20Sopenharmony_ci/** 1798c2ecf20Sopenharmony_ci * lcd_device_register - register a new object of lcd_device class. 1808c2ecf20Sopenharmony_ci * @name: the name of the new object(must be the same as the name of the 1818c2ecf20Sopenharmony_ci * respective framebuffer device). 1828c2ecf20Sopenharmony_ci * @parent: pointer to the parent's struct device . 1838c2ecf20Sopenharmony_ci * @devdata: an optional pointer to be stored in the device. The 1848c2ecf20Sopenharmony_ci * methods may retrieve it by using lcd_get_data(ld). 1858c2ecf20Sopenharmony_ci * @ops: the lcd operations structure. 1868c2ecf20Sopenharmony_ci * 1878c2ecf20Sopenharmony_ci * Creates and registers a new lcd device. Returns either an ERR_PTR() 1888c2ecf20Sopenharmony_ci * or a pointer to the newly allocated device. 1898c2ecf20Sopenharmony_ci */ 1908c2ecf20Sopenharmony_cistruct lcd_device *lcd_device_register(const char *name, struct device *parent, 1918c2ecf20Sopenharmony_ci void *devdata, struct lcd_ops *ops) 1928c2ecf20Sopenharmony_ci{ 1938c2ecf20Sopenharmony_ci struct lcd_device *new_ld; 1948c2ecf20Sopenharmony_ci int rc; 1958c2ecf20Sopenharmony_ci 1968c2ecf20Sopenharmony_ci pr_debug("lcd_device_register: name=%s\n", name); 1978c2ecf20Sopenharmony_ci 1988c2ecf20Sopenharmony_ci new_ld = kzalloc(sizeof(struct lcd_device), GFP_KERNEL); 1998c2ecf20Sopenharmony_ci if (!new_ld) 2008c2ecf20Sopenharmony_ci return ERR_PTR(-ENOMEM); 2018c2ecf20Sopenharmony_ci 2028c2ecf20Sopenharmony_ci mutex_init(&new_ld->ops_lock); 2038c2ecf20Sopenharmony_ci mutex_init(&new_ld->update_lock); 2048c2ecf20Sopenharmony_ci 2058c2ecf20Sopenharmony_ci new_ld->dev.class = lcd_class; 2068c2ecf20Sopenharmony_ci new_ld->dev.parent = parent; 2078c2ecf20Sopenharmony_ci new_ld->dev.release = lcd_device_release; 2088c2ecf20Sopenharmony_ci dev_set_name(&new_ld->dev, "%s", name); 2098c2ecf20Sopenharmony_ci dev_set_drvdata(&new_ld->dev, devdata); 2108c2ecf20Sopenharmony_ci 2118c2ecf20Sopenharmony_ci new_ld->ops = ops; 2128c2ecf20Sopenharmony_ci 2138c2ecf20Sopenharmony_ci rc = device_register(&new_ld->dev); 2148c2ecf20Sopenharmony_ci if (rc) { 2158c2ecf20Sopenharmony_ci put_device(&new_ld->dev); 2168c2ecf20Sopenharmony_ci return ERR_PTR(rc); 2178c2ecf20Sopenharmony_ci } 2188c2ecf20Sopenharmony_ci 2198c2ecf20Sopenharmony_ci rc = lcd_register_fb(new_ld); 2208c2ecf20Sopenharmony_ci if (rc) { 2218c2ecf20Sopenharmony_ci device_unregister(&new_ld->dev); 2228c2ecf20Sopenharmony_ci return ERR_PTR(rc); 2238c2ecf20Sopenharmony_ci } 2248c2ecf20Sopenharmony_ci 2258c2ecf20Sopenharmony_ci return new_ld; 2268c2ecf20Sopenharmony_ci} 2278c2ecf20Sopenharmony_ciEXPORT_SYMBOL(lcd_device_register); 2288c2ecf20Sopenharmony_ci 2298c2ecf20Sopenharmony_ci/** 2308c2ecf20Sopenharmony_ci * lcd_device_unregister - unregisters a object of lcd_device class. 2318c2ecf20Sopenharmony_ci * @ld: the lcd device object to be unregistered and freed. 2328c2ecf20Sopenharmony_ci * 2338c2ecf20Sopenharmony_ci * Unregisters a previously registered via lcd_device_register object. 2348c2ecf20Sopenharmony_ci */ 2358c2ecf20Sopenharmony_civoid lcd_device_unregister(struct lcd_device *ld) 2368c2ecf20Sopenharmony_ci{ 2378c2ecf20Sopenharmony_ci if (!ld) 2388c2ecf20Sopenharmony_ci return; 2398c2ecf20Sopenharmony_ci 2408c2ecf20Sopenharmony_ci mutex_lock(&ld->ops_lock); 2418c2ecf20Sopenharmony_ci ld->ops = NULL; 2428c2ecf20Sopenharmony_ci mutex_unlock(&ld->ops_lock); 2438c2ecf20Sopenharmony_ci lcd_unregister_fb(ld); 2448c2ecf20Sopenharmony_ci 2458c2ecf20Sopenharmony_ci device_unregister(&ld->dev); 2468c2ecf20Sopenharmony_ci} 2478c2ecf20Sopenharmony_ciEXPORT_SYMBOL(lcd_device_unregister); 2488c2ecf20Sopenharmony_ci 2498c2ecf20Sopenharmony_cistatic void devm_lcd_device_release(struct device *dev, void *res) 2508c2ecf20Sopenharmony_ci{ 2518c2ecf20Sopenharmony_ci struct lcd_device *lcd = *(struct lcd_device **)res; 2528c2ecf20Sopenharmony_ci 2538c2ecf20Sopenharmony_ci lcd_device_unregister(lcd); 2548c2ecf20Sopenharmony_ci} 2558c2ecf20Sopenharmony_ci 2568c2ecf20Sopenharmony_cistatic int devm_lcd_device_match(struct device *dev, void *res, void *data) 2578c2ecf20Sopenharmony_ci{ 2588c2ecf20Sopenharmony_ci struct lcd_device **r = res; 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_ci return *r == data; 2618c2ecf20Sopenharmony_ci} 2628c2ecf20Sopenharmony_ci 2638c2ecf20Sopenharmony_ci/** 2648c2ecf20Sopenharmony_ci * devm_lcd_device_register - resource managed lcd_device_register() 2658c2ecf20Sopenharmony_ci * @dev: the device to register 2668c2ecf20Sopenharmony_ci * @name: the name of the device 2678c2ecf20Sopenharmony_ci * @parent: a pointer to the parent device 2688c2ecf20Sopenharmony_ci * @devdata: an optional pointer to be stored for private driver use 2698c2ecf20Sopenharmony_ci * @ops: the lcd operations structure 2708c2ecf20Sopenharmony_ci * 2718c2ecf20Sopenharmony_ci * @return a struct lcd on success, or an ERR_PTR on error 2728c2ecf20Sopenharmony_ci * 2738c2ecf20Sopenharmony_ci * Managed lcd_device_register(). The lcd_device returned from this function 2748c2ecf20Sopenharmony_ci * are automatically freed on driver detach. See lcd_device_register() 2758c2ecf20Sopenharmony_ci * for more information. 2768c2ecf20Sopenharmony_ci */ 2778c2ecf20Sopenharmony_cistruct lcd_device *devm_lcd_device_register(struct device *dev, 2788c2ecf20Sopenharmony_ci const char *name, struct device *parent, 2798c2ecf20Sopenharmony_ci void *devdata, struct lcd_ops *ops) 2808c2ecf20Sopenharmony_ci{ 2818c2ecf20Sopenharmony_ci struct lcd_device **ptr, *lcd; 2828c2ecf20Sopenharmony_ci 2838c2ecf20Sopenharmony_ci ptr = devres_alloc(devm_lcd_device_release, sizeof(*ptr), GFP_KERNEL); 2848c2ecf20Sopenharmony_ci if (!ptr) 2858c2ecf20Sopenharmony_ci return ERR_PTR(-ENOMEM); 2868c2ecf20Sopenharmony_ci 2878c2ecf20Sopenharmony_ci lcd = lcd_device_register(name, parent, devdata, ops); 2888c2ecf20Sopenharmony_ci if (!IS_ERR(lcd)) { 2898c2ecf20Sopenharmony_ci *ptr = lcd; 2908c2ecf20Sopenharmony_ci devres_add(dev, ptr); 2918c2ecf20Sopenharmony_ci } else { 2928c2ecf20Sopenharmony_ci devres_free(ptr); 2938c2ecf20Sopenharmony_ci } 2948c2ecf20Sopenharmony_ci 2958c2ecf20Sopenharmony_ci return lcd; 2968c2ecf20Sopenharmony_ci} 2978c2ecf20Sopenharmony_ciEXPORT_SYMBOL(devm_lcd_device_register); 2988c2ecf20Sopenharmony_ci 2998c2ecf20Sopenharmony_ci/** 3008c2ecf20Sopenharmony_ci * devm_lcd_device_unregister - resource managed lcd_device_unregister() 3018c2ecf20Sopenharmony_ci * @dev: the device to unregister 3028c2ecf20Sopenharmony_ci * @ld: the lcd device to unregister 3038c2ecf20Sopenharmony_ci * 3048c2ecf20Sopenharmony_ci * Deallocated a lcd allocated with devm_lcd_device_register(). Normally 3058c2ecf20Sopenharmony_ci * this function will not need to be called and the resource management 3068c2ecf20Sopenharmony_ci * code will ensure that the resource is freed. 3078c2ecf20Sopenharmony_ci */ 3088c2ecf20Sopenharmony_civoid devm_lcd_device_unregister(struct device *dev, struct lcd_device *ld) 3098c2ecf20Sopenharmony_ci{ 3108c2ecf20Sopenharmony_ci int rc; 3118c2ecf20Sopenharmony_ci 3128c2ecf20Sopenharmony_ci rc = devres_release(dev, devm_lcd_device_release, 3138c2ecf20Sopenharmony_ci devm_lcd_device_match, ld); 3148c2ecf20Sopenharmony_ci WARN_ON(rc); 3158c2ecf20Sopenharmony_ci} 3168c2ecf20Sopenharmony_ciEXPORT_SYMBOL(devm_lcd_device_unregister); 3178c2ecf20Sopenharmony_ci 3188c2ecf20Sopenharmony_ci 3198c2ecf20Sopenharmony_cistatic void __exit lcd_class_exit(void) 3208c2ecf20Sopenharmony_ci{ 3218c2ecf20Sopenharmony_ci class_destroy(lcd_class); 3228c2ecf20Sopenharmony_ci} 3238c2ecf20Sopenharmony_ci 3248c2ecf20Sopenharmony_cistatic int __init lcd_class_init(void) 3258c2ecf20Sopenharmony_ci{ 3268c2ecf20Sopenharmony_ci lcd_class = class_create(THIS_MODULE, "lcd"); 3278c2ecf20Sopenharmony_ci if (IS_ERR(lcd_class)) { 3288c2ecf20Sopenharmony_ci pr_warn("Unable to create backlight class; errno = %ld\n", 3298c2ecf20Sopenharmony_ci PTR_ERR(lcd_class)); 3308c2ecf20Sopenharmony_ci return PTR_ERR(lcd_class); 3318c2ecf20Sopenharmony_ci } 3328c2ecf20Sopenharmony_ci 3338c2ecf20Sopenharmony_ci lcd_class->dev_groups = lcd_device_groups; 3348c2ecf20Sopenharmony_ci return 0; 3358c2ecf20Sopenharmony_ci} 3368c2ecf20Sopenharmony_ci 3378c2ecf20Sopenharmony_ci/* 3388c2ecf20Sopenharmony_ci * if this is compiled into the kernel, we need to ensure that the 3398c2ecf20Sopenharmony_ci * class is registered before users of the class try to register lcd's 3408c2ecf20Sopenharmony_ci */ 3418c2ecf20Sopenharmony_cipostcore_initcall(lcd_class_init); 3428c2ecf20Sopenharmony_cimodule_exit(lcd_class_exit); 3438c2ecf20Sopenharmony_ci 3448c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL"); 3458c2ecf20Sopenharmony_ciMODULE_AUTHOR("Jamey Hicks <jamey.hicks@hp.com>, Andrew Zabolotny <zap@homelink.ru>"); 3468c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("LCD Lowlevel Control Abstraction"); 347