uwb: Use kcalloc instead of kzalloc to allocate array
[zen-stable.git] / arch / x86 / include / asm / intel_scu_ipc.h
blob4420993acc4734c962922d58ee63e0b700cf330e
1 #ifndef _ASM_X86_INTEL_SCU_IPC_H_
2 #define _ASM_X86_INTEL_SCU_IPC_H_
4 #include <linux/notifier.h>
6 #define IPCMSG_VRTC 0xFA /* Set vRTC device */
8 /* Command id associated with message IPCMSG_VRTC */
9 #define IPC_CMD_VRTC_SETTIME 1 /* Set time */
10 #define IPC_CMD_VRTC_SETALARM 2 /* Set alarm */
12 /* Read single register */
13 int intel_scu_ipc_ioread8(u16 addr, u8 *data);
15 /* Read two sequential registers */
16 int intel_scu_ipc_ioread16(u16 addr, u16 *data);
18 /* Read four sequential registers */
19 int intel_scu_ipc_ioread32(u16 addr, u32 *data);
21 /* Read a vector */
22 int intel_scu_ipc_readv(u16 *addr, u8 *data, int len);
24 /* Write single register */
25 int intel_scu_ipc_iowrite8(u16 addr, u8 data);
27 /* Write two sequential registers */
28 int intel_scu_ipc_iowrite16(u16 addr, u16 data);
30 /* Write four sequential registers */
31 int intel_scu_ipc_iowrite32(u16 addr, u32 data);
33 /* Write a vector */
34 int intel_scu_ipc_writev(u16 *addr, u8 *data, int len);
36 /* Update single register based on the mask */
37 int intel_scu_ipc_update_register(u16 addr, u8 data, u8 mask);
39 /* Issue commands to the SCU with or without data */
40 int intel_scu_ipc_simple_command(int cmd, int sub);
41 int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen,
42 u32 *out, int outlen);
43 /* I2C control api */
44 int intel_scu_ipc_i2c_cntrl(u32 addr, u32 *data);
46 /* Update FW version */
47 int intel_scu_ipc_fw_update(u8 *buffer, u32 length);
49 extern struct blocking_notifier_head intel_scu_notifier;
51 static inline void intel_scu_notifier_add(struct notifier_block *nb)
53 blocking_notifier_chain_register(&intel_scu_notifier, nb);
56 static inline void intel_scu_notifier_remove(struct notifier_block *nb)
58 blocking_notifier_chain_unregister(&intel_scu_notifier, nb);
61 static inline int intel_scu_notifier_post(unsigned long v, void *p)
63 return blocking_notifier_call_chain(&intel_scu_notifier, v, p);
66 #define SCU_AVAILABLE 1
67 #define SCU_DOWN 2
69 #endif