nbd: fix whitespace in server error message
[qemu/ar7.git] / include / hw / i2c / pm_smbus.h
blob060d3c6ac02d9c8cd42579229c61e1eb7610bff7
1 #ifndef PM_SMBUS_H
2 #define PM_SMBUS_H
4 #define PM_SMBUS_MAX_MSG_SIZE 32
6 typedef struct PMSMBus {
7 I2CBus *smbus;
8 MemoryRegion io;
10 uint8_t smb_stat;
11 uint8_t smb_ctl;
12 uint8_t smb_cmd;
13 uint8_t smb_addr;
14 uint8_t smb_data0;
15 uint8_t smb_data1;
16 uint8_t smb_data[PM_SMBUS_MAX_MSG_SIZE];
17 uint8_t smb_blkdata;
18 uint8_t smb_auxctl;
19 uint32_t smb_index;
21 /* Set by pm_smbus.c */
22 void (*reset)(struct PMSMBus *s);
24 /* Set by the user. */
25 bool i2c_enable;
26 void (*set_irq)(struct PMSMBus *s, bool enabled);
27 void *opaque;
29 /* Internally used by pm_smbus. */
31 /* Set on block transfers after the last byte has been read, so the
32 INTR bit can be set at the right time. */
33 bool op_done;
34 } PMSMBus;
36 void pm_smbus_init(DeviceState *parent, PMSMBus *smb, bool force_aux_blk);
38 #endif /* PM_SMBUS_H */