b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | /* |
| 2 | * All Rights Reserved |
| 3 | * |
| 4 | * MARVELL CONFIDENTIAL |
| 5 | * Copyright 2012 Marvell International Ltd All Rights Reserved. |
| 6 | * The source code contained or described herein and all documents related to |
| 7 | * the source code ("Material") are owned by Marvell International Ltd or its |
| 8 | * suppliers or licensors. Title to the Material remains with Marvell International Ltd |
| 9 | * or its suppliers and licensors. The Material contains trade secrets and |
| 10 | * proprietary and confidential information of Marvell or its suppliers and |
| 11 | * licensors. The Material is protected by worldwide copyright and trade secret |
| 12 | * laws and treaty provisions. No part of the Material may be used, copied, |
| 13 | * reproduced, modified, published, uploaded, posted, transmitted, distributed, |
| 14 | * or disclosed in any way without Marvell's prior express written permission. |
| 15 | * |
| 16 | * No license under any patent, copyright, trade secret or other intellectual |
| 17 | * property right is granted to or conferred upon you by disclosure or delivery |
| 18 | * of the Materials, either expressly, by implication, inducement, estoppel or |
| 19 | * otherwise. Any license under such intellectual property rights must be |
| 20 | * express and approved by Marvell in writing. |
| 21 | * |
| 22 | */ |
| 23 | |
| 24 | #ifndef __H_ACM_ACH__ |
| 25 | #define __H_ACM_ACH__ |
| 26 | |
| 27 | #include "acm_debug.h" |
| 28 | |
| 29 | typedef enum { |
| 30 | ACH_RC_OK, |
| 31 | ACH_RC_NO_UPDATE_NEEDED, |
| 32 | ACH_RC_FAIL_TO_UPDATE |
| 33 | } ACH_ReturnCode; |
| 34 | |
| 35 | typedef enum { |
| 36 | COMPONENT_INACTIVE, |
| 37 | COMPONENT_ACTIVE |
| 38 | } ACH_ComponentStatus; |
| 39 | |
| 40 | typedef enum { |
| 41 | COMPONENT_TYPE_CODEC, |
| 42 | COMPONENT_TYPE_POWER, |
| 43 | COMPONENT_TYPE_BT, |
| 44 | COMPONENT_TYPE_FM, |
| 45 | COMPONENT_TYPE_GPIO, |
| 46 | COMPONENT_TYPE_MODEM, |
| 47 | COMPONENT_TYPE_SW, |
| 48 | } ACH_ComponentType; |
| 49 | |
| 50 | typedef struct { |
| 51 | unsigned char active; |
| 52 | unsigned char ref_count; |
| 53 | void (*ACH_Enable)(void); |
| 54 | void (*ACH_Disable)(void); |
| 55 | void (*ACH_Reset)(void); |
| 56 | void (*ACH_GetTypeAndID)(int *type, unsigned char *id); |
| 57 | ACH_ReturnCode (*ACH_Handle)(void *setting); |
| 58 | } ACH_ComponentHandler; |
| 59 | |
| 60 | typedef union { |
| 61 | struct { |
| 62 | unsigned char reg_index; |
| 63 | unsigned short reg_mask; |
| 64 | unsigned char reg_shift; |
| 65 | unsigned short length; |
| 66 | unsigned short *reg_value; |
| 67 | } i2c; |
| 68 | struct { |
| 69 | unsigned char gpio_port; |
| 70 | unsigned char gpio_value; |
| 71 | } gpio; |
| 72 | struct { |
| 73 | unsigned char hci_ocf; |
| 74 | unsigned char hci_ogf; |
| 75 | unsigned short length; |
| 76 | unsigned char *hci_parameters; |
| 77 | } hci; |
| 78 | struct { |
| 79 | unsigned int delay_value; |
| 80 | } delay; |
| 81 | } ACH_ComponentParameter; |
| 82 | |
| 83 | #endif |