diff options
author | Len Brown <len.brown@intel.com> | 2007-10-10 00:30:19 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-10-10 00:30:19 -0400 |
commit | e270051d9c6e5f0b31668ec1f0d864ab9920ffca (patch) | |
tree | 49c2a5fb6ca6790f9cf070b49552388dadc7fa5b /drivers/acpi/sbshc.h | |
parent | a2883dfa2e4a94b24109b2bfe735561e50cc44b4 (diff) | |
parent | d5b4a3d0efa36de31b86d5677dad6c36cb8735d7 (diff) | |
download | kernel_goldelico_gta04-e270051d9c6e5f0b31668ec1f0d864ab9920ffca.zip kernel_goldelico_gta04-e270051d9c6e5f0b31668ec1f0d864ab9920ffca.tar.gz kernel_goldelico_gta04-e270051d9c6e5f0b31668ec1f0d864ab9920ffca.tar.bz2 |
Pull battery-sbs-ac into release branch
Diffstat (limited to 'drivers/acpi/sbshc.h')
-rw-r--r-- | drivers/acpi/sbshc.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/acpi/sbshc.h b/drivers/acpi/sbshc.h new file mode 100644 index 0000000..3bda349 --- /dev/null +++ b/drivers/acpi/sbshc.h @@ -0,0 +1,27 @@ +struct acpi_smb_hc; +enum acpi_smb_protocol { + SMBUS_WRITE_QUICK = 2, + SMBUS_READ_QUICK = 3, + SMBUS_SEND_BYTE = 4, + SMBUS_RECEIVE_BYTE = 5, + SMBUS_WRITE_BYTE = 6, + SMBUS_READ_BYTE = 7, + SMBUS_WRITE_WORD = 8, + SMBUS_READ_WORD = 9, + SMBUS_WRITE_BLOCK = 0xa, + SMBUS_READ_BLOCK = 0xb, + SMBUS_PROCESS_CALL = 0xc, + SMBUS_BLOCK_PROCESS_CALL = 0xd, +}; + +static const u8 SMBUS_PEC = 0x80; + +typedef void (*smbus_alarm_callback)(void *context); + +extern int acpi_smbus_read(struct acpi_smb_hc *hc, u8 protocol, u8 address, + u8 command, u8 * data); +extern int acpi_smbus_write(struct acpi_smb_hc *hc, u8 protocol, u8 slave_address, + u8 command, u8 * data, u8 length); +extern int acpi_smbus_register_callback(struct acpi_smb_hc *hc, + smbus_alarm_callback callback, void *context); +extern int acpi_smbus_unregister_callback(struct acpi_smb_hc *hc); |