^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) AudioScience HPI driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) Hardware Programming Interface (HPI) Utility functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) (C) Copyright AudioScience Inc. 2007
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) *******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) /* Initialise response headers, or msg/response pairs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) Note that it is valid to just init a response e.g. when a lower level is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) preparing a response to a message.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) However, when sending a message, a matching response buffer must always be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) prepared.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #ifndef _HPIMSGINIT_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #define _HPIMSGINIT_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) void hpi_init_response(struct hpi_response *phr, u16 object, u16 function,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) u16 error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) void hpi_init_message_response(struct hpi_message *phm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) struct hpi_response *phr, u16 object, u16 function);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) void hpi_init_responseV1(struct hpi_response_header *phr, u16 size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) u16 object, u16 function);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) void hpi_init_message_responseV1(struct hpi_message_header *phm, u16 msg_size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) struct hpi_response_header *phr, u16 res_size, u16 object,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) u16 function);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) #endif /* _HPIMSGINIT_H_ */