Commit be966660 authored by Corentin Chary's avatar Corentin Chary Committed by Len Brown

asus-laptop: Fix coding style for comments

Signed-off-by: default avatarCorentin Chary <corentincj@iksaif.net>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent aeb41b85
...@@ -77,16 +77,16 @@ ...@@ -77,16 +77,16 @@
* Flags for hotk status * Flags for hotk status
* WL_ON and BT_ON are also used for wireless_status() * WL_ON and BT_ON are also used for wireless_status()
*/ */
#define WL_ON 0x01 //internal Wifi #define WL_ON 0x01 /* internal Wifi */
#define BT_ON 0x02 //internal Bluetooth #define BT_ON 0x02 /* internal Bluetooth */
#define MLED_ON 0x04 //mail LED #define MLED_ON 0x04 /* mail LED */
#define TLED_ON 0x08 //touchpad LED #define TLED_ON 0x08 /* touchpad LED */
#define RLED_ON 0x10 //Record LED #define RLED_ON 0x10 /* Record LED */
#define PLED_ON 0x20 //Phone LED #define PLED_ON 0x20 /* Phone LED */
#define GLED_ON 0x40 //Gaming LED #define GLED_ON 0x40 /* Gaming LED */
#define LCD_ON 0x80 //LCD backlight #define LCD_ON 0x80 /* LCD backlight */
#define GPS_ON 0x100 //GPS #define GPS_ON 0x100 /* GPS */
#define KEY_ON 0x200 //Keyboard backlight #define KEY_ON 0x200 /* Keyboard backlight */
#define ASUS_LOG ASUS_HOTK_FILE ": " #define ASUS_LOG ASUS_HOTK_FILE ": "
#define ASUS_ERR KERN_ERR ASUS_LOG #define ASUS_ERR KERN_ERR ASUS_LOG
...@@ -99,7 +99,8 @@ MODULE_AUTHOR("Julien Lerouge, Karol Kozimor, Corentin Chary"); ...@@ -99,7 +99,8 @@ MODULE_AUTHOR("Julien Lerouge, Karol Kozimor, Corentin Chary");
MODULE_DESCRIPTION(ASUS_HOTK_NAME); MODULE_DESCRIPTION(ASUS_HOTK_NAME);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
/* WAPF defines the behavior of the Fn+Fx wlan key /*
* WAPF defines the behavior of the Fn+Fx wlan key
* The significance of values is yet to be found, but * The significance of values is yet to be found, but
* most of the time: * most of the time:
* 0x0 will do nothing * 0x0 will do nothing
...@@ -126,7 +127,8 @@ ASUS_HANDLE(gled_set, ASUS_HOTK_PREFIX "GLED"); /* G1, G2 (probably) */ ...@@ -126,7 +127,8 @@ ASUS_HANDLE(gled_set, ASUS_HOTK_PREFIX "GLED"); /* G1, G2 (probably) */
/* LEDD */ /* LEDD */
ASUS_HANDLE(ledd_set, ASUS_HOTK_PREFIX "SLCM"); ASUS_HANDLE(ledd_set, ASUS_HOTK_PREFIX "SLCM");
/* Bluetooth and WLAN /*
* Bluetooth and WLAN
* WLED and BLED are not handled like other XLED, because in some dsdt * WLED and BLED are not handled like other XLED, because in some dsdt
* they also control the WLAN/Bluetooth device. * they also control the WLAN/Bluetooth device.
*/ */
...@@ -150,19 +152,29 @@ ASUS_HANDLE(lcd_switch, "\\_SB.PCI0.SBRG.EC0._Q10", /* All new models */ ...@@ -150,19 +152,29 @@ ASUS_HANDLE(lcd_switch, "\\_SB.PCI0.SBRG.EC0._Q10", /* All new models */
/* Display */ /* Display */
ASUS_HANDLE(display_set, ASUS_HOTK_PREFIX "SDSP"); ASUS_HANDLE(display_set, ASUS_HOTK_PREFIX "SDSP");
ASUS_HANDLE(display_get, "\\_SB.PCI0.P0P1.VGA.GETD", /* A6B, A6K A6R A7D F3JM L4R M6R A3G ASUS_HANDLE(display_get,
M6A M6V VX-1 V6J V6V W3Z */ /* A6B, A6K A6R A7D F3JM L4R M6R A3G M6A M6V VX-1 V6J V6V W3Z */
"\\_SB.PCI0.P0P2.VGA.GETD", /* A3E A4K, A4D A4L A6J A7J A8J Z71V M9V "\\_SB.PCI0.P0P1.VGA.GETD",
S5A M5A z33A W1Jc W2V G1 */ /* A3E A4K, A4D A4L A6J A7J A8J Z71V M9V S5A M5A z33A W1Jc W2V G1 */
"\\_SB.PCI0.P0P3.VGA.GETD", /* A6V A6Q */ "\\_SB.PCI0.P0P2.VGA.GETD",
"\\_SB.PCI0.P0PA.VGA.GETD", /* A6T, A6M */ /* A6V A6Q */
"\\_SB.PCI0.PCI1.VGAC.NMAP", /* L3C */ "\\_SB.PCI0.P0P3.VGA.GETD",
"\\_SB.PCI0.VGA.GETD", /* Z96F */ /* A6T, A6M */
"\\ACTD", /* A2D */ "\\_SB.PCI0.P0PA.VGA.GETD",
"\\ADVG", /* A4G Z71A W1N W5A W5F M2N M3N M5N M6N S1N S5N */ /* L3C */
"\\DNXT", /* P30 */ "\\_SB.PCI0.PCI1.VGAC.NMAP",
"\\INFB", /* A2H D1 L2D L3D L3H L2E L5D L5C M1A M2E L4L W3V */ /* Z96F */
"\\SSTE"); /* A3F A6F A3N A3L M6N W3N W6A */ "\\_SB.PCI0.VGA.GETD",
/* A2D */
"\\ACTD",
/* A4G Z71A W1N W5A W5F M2N M3N M5N M6N S1N S5N */
"\\ADVG",
/* P30 */
"\\DNXT",
/* A2H D1 L2D L3D L3H L2E L5D L5C M1A M2E L4L W3V */
"\\INFB",
/* A3F A6F A3N A3L M6N W3N W6A */
"\\SSTE");
ASUS_HANDLE(ls_switch, ASUS_HOTK_PREFIX "ALSC"); /* Z71A Z71V */ ASUS_HANDLE(ls_switch, ASUS_HOTK_PREFIX "ALSC"); /* Z71A Z71V */
ASUS_HANDLE(ls_level, ASUS_HOTK_PREFIX "ALSL"); /* Z71A Z71V */ ASUS_HANDLE(ls_level, ASUS_HOTK_PREFIX "ALSL"); /* Z71A Z71V */
...@@ -182,14 +194,14 @@ ASUS_HANDLE(kled_get, ASUS_HOTK_PREFIX "GLKB"); ...@@ -182,14 +194,14 @@ ASUS_HANDLE(kled_get, ASUS_HOTK_PREFIX "GLKB");
* about the hotk device * about the hotk device
*/ */
struct asus_hotk { struct asus_hotk {
char *name; //laptop name char *name; /* laptop name */
struct acpi_device *device; //the device we are in struct acpi_device *device; /* the device we are in */
acpi_handle handle; //the handle of the hotk device acpi_handle handle; /* the handle of the hotk device */
char status; //status of the hotk, for LEDs, ... char status; /* status of the hotk, for LEDs, ... */
u32 ledd_status; //status of the LED display u32 ledd_status; /* status of the LED display */
u8 light_level; //light sensor level u8 light_level; /* light sensor level */
u8 light_switch; //light sensor switch value u8 light_switch; /* light sensor switch value */
u16 event_count[128]; //count for each event TODO make this better u16 event_count[128]; /* count for each event TODO make this better */
struct input_dev *inputdev; struct input_dev *inputdev;
u16 *keycode_map; u16 *keycode_map;
}; };
...@@ -242,10 +254,12 @@ static struct backlight_ops asusbl_ops = { ...@@ -242,10 +254,12 @@ static struct backlight_ops asusbl_ops = {
.update_status = update_bl_status, .update_status = update_bl_status,
}; };
/* These functions actually update the LED's, and are called from a /*
* These functions actually update the LED's, and are called from a
* workqueue. By doing this as separate work rather than when the LED * workqueue. By doing this as separate work rather than when the LED
* subsystem asks, we avoid messing with the Asus ACPI stuff during a * subsystem asks, we avoid messing with the Asus ACPI stuff during a
* potentially bad time, such as a timer interrupt. */ * potentially bad time, such as a timer interrupt.
*/
static struct workqueue_struct *led_workqueue; static struct workqueue_struct *led_workqueue;
#define ASUS_LED(object, ledname, max) \ #define ASUS_LED(object, ledname, max) \
...@@ -318,8 +332,8 @@ static struct key_entry asus_keymap[] = { ...@@ -318,8 +332,8 @@ static struct key_entry asus_keymap[] = {
static int write_acpi_int(acpi_handle handle, const char *method, int val, static int write_acpi_int(acpi_handle handle, const char *method, int val,
struct acpi_buffer *output) struct acpi_buffer *output)
{ {
struct acpi_object_list params; //list of input parameters (an int here) struct acpi_object_list params; /* list of input parameters (an int) */
union acpi_object in_obj; //the only param we use union acpi_object in_obj; /* the only param we use */
acpi_status status; acpi_status status;
if (!handle) if (!handle)
...@@ -574,7 +588,7 @@ static ssize_t show_infos(struct device *dev, ...@@ -574,7 +588,7 @@ static ssize_t show_infos(struct device *dev,
{ {
int len = 0; int len = 0;
unsigned long long temp; unsigned long long temp;
char buf[16]; //enough for all info char buf[16]; /* enough for all info */
acpi_status rv = AE_OK; acpi_status rv = AE_OK;
/* /*
...@@ -734,8 +748,10 @@ static int read_display(void) ...@@ -734,8 +748,10 @@ static int read_display(void)
unsigned long long value = 0; unsigned long long value = 0;
acpi_status rv = AE_OK; acpi_status rv = AE_OK;
/* In most of the case, we know how to set the display, but sometime /*
we can't read it */ * In most of the case, we know how to set the display, but sometime
* we can't read it
*/
if (display_get_handle) { if (display_get_handle) {
rv = acpi_evaluate_integer(display_get_handle, NULL, rv = acpi_evaluate_integer(display_get_handle, NULL,
NULL, &value); NULL, &value);
...@@ -1152,8 +1168,10 @@ static int asus_hotk_get_info(void) ...@@ -1152,8 +1168,10 @@ static int asus_hotk_get_info(void)
ASUS_HANDLE_INIT(display_set); ASUS_HANDLE_INIT(display_set);
ASUS_HANDLE_INIT(display_get); ASUS_HANDLE_INIT(display_get);
/* There is a lot of models with "ALSL", but a few get /*
a real light sens, so we need to check it. */ * There is a lot of models with "ALSL", but a few get
* a real light sens, so we need to check it.
*/
if (!ASUS_HANDLE_INIT(ls_switch)) if (!ASUS_HANDLE_INIT(ls_switch))
ASUS_HANDLE_INIT(ls_level); ASUS_HANDLE_INIT(ls_level);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment