2016-01-22 15:27:13 +01:00
/*
* Common functions for kernel modules using Dell SMBIOS
*
* Copyright ( c ) Red Hat < mjg @ redhat . com >
* Copyright ( c ) 2014 Gabriele Mazzotta < gabriele . mzt @ gmail . com >
* Copyright ( c ) 2014 Pali Rohár < pali . rohar @ gmail . com >
*
* Based on documentation in the libsmbios package :
* Copyright ( C ) 2005 - 2014 Dell Inc .
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation .
*/
# ifndef _DELL_SMBIOS_H_
# define _DELL_SMBIOS_H_
2017-03-16 11:55:32 +01:00
struct notifier_block ;
2016-01-22 15:27:13 +01:00
/* This structure will be modified by the firmware when we enter
* system management mode , hence the volatiles */
struct calling_interface_buffer {
2017-11-01 14:25:22 -05:00
u16 cmd_class ;
u16 cmd_select ;
2016-01-22 15:27:13 +01:00
volatile u32 input [ 4 ] ;
volatile u32 output [ 4 ] ;
} __packed ;
struct calling_interface_token {
u16 tokenID ;
u16 location ;
union {
u16 value ;
u16 stringlength ;
} ;
} ;
2016-03-04 14:09:07 +01:00
int dell_smbios_error ( int value ) ;
2016-03-04 14:09:06 +01:00
2016-01-22 15:27:20 +01:00
struct calling_interface_buffer * dell_smbios_get_buffer ( void ) ;
2016-01-22 15:27:15 +01:00
void dell_smbios_clear_buffer ( void ) ;
2016-01-22 15:27:16 +01:00
void dell_smbios_release_buffer ( void ) ;
2016-01-22 15:27:19 +01:00
void dell_smbios_send_request ( int class , int select ) ;
2016-01-22 15:27:13 +01:00
2016-01-22 15:27:22 +01:00
struct calling_interface_token * dell_smbios_find_token ( int tokenid ) ;
2017-03-16 11:55:32 +01:00
enum dell_laptop_notifier_actions {
DELL_LAPTOP_KBD_BACKLIGHT_BRIGHTNESS_CHANGED ,
} ;
int dell_laptop_register_notifier ( struct notifier_block * nb ) ;
int dell_laptop_unregister_notifier ( struct notifier_block * nb ) ;
void dell_laptop_call_notifier ( unsigned long action , void * data ) ;
2016-01-22 15:27:13 +01:00
# endif