// SPDX-License-Identifier: GPL-2.0+ /* * Intel OakTrail Platform support * * Copyright (C) 2010-2011 Intel Corporation * Author: Yin Kangkai (kangkai.yin@intel.com) * * based on Compal driver, Copyright (C) 2008 Cezary Jackiewicz * <cezary.jackiewicz (at) gmail.com>, based on MSI driver * Copyright (C) 2006 Lennart Poettering <mzxreary (at) 0pointer (dot) de> * * This driver does below things: * 1. registers itself in the Linux backlight control in * /sys/class/backlight/intel_oaktrail/ * * 2. registers in the rfkill subsystem here: /sys/class/rfkill/rfkillX/ * for these components: wifi, bluetooth, wwan (3g), gps * * This driver might work on other products based on Oaktrail. If you * want to try it you can pass force=1 as argument to the module which * will force it to load even when the DMI data doesn't identify the * product as compatible.
*/
/* * This is the address in EC space and commands used to control LCD backlight: * * Two steps needed to change the LCD backlight: * 1. write the backlight percentage into OT_EC_BL_BRIGHTNESS_ADDRESS; * 2. write OT_EC_BL_CONTROL_ON_DATA into OT_EC_BL_CONTROL_ADDRESS. * * To read the LCD back light, just read out the value from * OT_EC_BL_BRIGHTNESS_ADDRESS. * * LCD backlight brightness range: 0 - 100 (OT_EC_BL_BRIGHTNESS_MAX)
*/ #define OT_EC_BL_BRIGHTNESS_ADDRESS 0x44 #define OT_EC_BL_BRIGHTNESS_MAX 100 #define OT_EC_BL_CONTROL_ADDRESS 0x3A #define OT_EC_BL_CONTROL_ON_DATA 0x1A
if (acpi_disabled) {
pr_err("ACPI needs to be enabled for this driver to work!\n"); return -ENODEV;
}
if (!force && !dmi_check_system(oaktrail_dmi_table)) {
pr_err("Platform not recognized (You could try the module's force-parameter)"); return -ENODEV;
}
ret = platform_driver_register(&oaktrail_driver); if (ret) {
pr_warn("Unable to register platform driver\n"); goto err_driver_reg;
}
oaktrail_device = platform_device_alloc(DRIVER_NAME, PLATFORM_DEVID_NONE); if (!oaktrail_device) {
pr_warn("Unable to allocate platform device\n");
ret = -ENOMEM; goto err_device_alloc;
}
ret = platform_device_add(oaktrail_device); if (ret) {
pr_warn("Unable to add platform device\n"); goto err_device_add;
}
if (acpi_video_get_backlight_type() == acpi_backlight_vendor) {
ret = oaktrail_backlight_init(); if (ret) goto err_backlight;
}
ret = oaktrail_rfkill_init(); if (ret) {
pr_warn("Setup rfkill failed\n"); goto err_rfkill;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.