18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/****************************************************************************** 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci AudioScience HPI driver 58c2ecf20Sopenharmony_ci Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci Hardware Programming Interface (HPI) Utility functions 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci (C) Copyright AudioScience Inc. 2007 118c2ecf20Sopenharmony_ci*******************************************************************************/ 128c2ecf20Sopenharmony_ci/* Initialise response headers, or msg/response pairs. 138c2ecf20Sopenharmony_ciNote that it is valid to just init a response e.g. when a lower level is 148c2ecf20Sopenharmony_cipreparing a response to a message. 158c2ecf20Sopenharmony_ciHowever, when sending a message, a matching response buffer must always be 168c2ecf20Sopenharmony_ciprepared. 178c2ecf20Sopenharmony_ci*/ 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#ifndef _HPIMSGINIT_H_ 208c2ecf20Sopenharmony_ci#define _HPIMSGINIT_H_ 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_civoid hpi_init_response(struct hpi_response *phr, u16 object, u16 function, 238c2ecf20Sopenharmony_ci u16 error); 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_civoid hpi_init_message_response(struct hpi_message *phm, 268c2ecf20Sopenharmony_ci struct hpi_response *phr, u16 object, u16 function); 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_civoid hpi_init_responseV1(struct hpi_response_header *phr, u16 size, 298c2ecf20Sopenharmony_ci u16 object, u16 function); 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_civoid hpi_init_message_responseV1(struct hpi_message_header *phm, u16 msg_size, 328c2ecf20Sopenharmony_ci struct hpi_response_header *phr, u16 res_size, u16 object, 338c2ecf20Sopenharmony_ci u16 function); 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#endif /* _HPIMSGINIT_H_ */ 36