1 /* SPDX-License-Identifier: GPL-2.0 */
3 enum acpi_smb_protocol
{
7 SMBUS_RECEIVE_BYTE
= 5,
12 SMBUS_WRITE_BLOCK
= 0xa,
13 SMBUS_READ_BLOCK
= 0xb,
14 SMBUS_PROCESS_CALL
= 0xc,
15 SMBUS_BLOCK_PROCESS_CALL
= 0xd,
18 enum acpi_sbs_device_addr
{
19 ACPI_SBS_CHARGER
= 0x9,
20 ACPI_SBS_MANAGER
= 0xa,
21 ACPI_SBS_BATTERY
= 0xb,
24 typedef void (*smbus_alarm_callback
)(void *context
);
26 extern int acpi_smbus_read(struct acpi_smb_hc
*hc
, u8 protocol
, u8 address
,
27 u8 command
, u8
* data
);
28 extern int acpi_smbus_write(struct acpi_smb_hc
*hc
, u8 protocol
, u8 slave_address
,
29 u8 command
, u8
* data
, u8 length
);
30 extern int acpi_smbus_register_callback(struct acpi_smb_hc
*hc
,
31 smbus_alarm_callback callback
, void *context
);
32 extern int acpi_smbus_unregister_callback(struct acpi_smb_hc
*hc
);