/arch/arm/mach-msm/include/mach/oem_rapi_client.h

https://bitbucket.org/sammyz/iscream_thunderc-2.6.35-rebase · C++ Header · 132 lines · 64 code · 15 blank · 53 comment · 0 complexity · d3510d928cf7138a41c545aee07dbdaf MD5 · raw file

  1. /* Copyright (c) 2009, Code Aurora Forum. All rights reserved.
  2. *
  3. * Redistribution and use in source and binary forms, with or without
  4. * modification, are permitted provided that the following conditions are
  5. * met:
  6. * * Redistributions of source code must retain the above copyright
  7. * notice, this list of conditions and the following disclaimer.
  8. * * Redistributions in binary form must reproduce the above
  9. * copyright notice, this list of conditions and the following
  10. * disclaimer in the documentation and/or other materials provided
  11. * with the distribution.
  12. * * Neither the name of Code Aurora Forum, Inc. nor the names of its
  13. * contributors may be used to endorse or promote products derived
  14. * from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
  17. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  18. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
  19. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
  20. * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  21. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  22. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
  23. * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  24. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  25. * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
  26. * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. *
  28. */
  29. #ifndef __ASM__ARCH_OEM_RAPI_CLIENT_H
  30. #define __ASM__ARCH_OEM_RAPI_CLIENT_H
  31. /*
  32. * OEM RAPI CLIENT Driver header file
  33. */
  34. #include <linux/types.h>
  35. #include <mach/msm_rpcrouter.h>
  36. enum {
  37. OEM_RAPI_CLIENT_EVENT_NONE = 0,
  38. /*
  39. * list of oem rapi client events
  40. */
  41. #if defined (CONFIG_LGE_SUPPORT_RAPI)
  42. /* LGE_CHANGES_S [khlee@lge.com] 2009-12-04, [VS740] use OEMRAPI */
  43. LG_FW_RAPI_START = 100,
  44. LG_FW_RAPI_CLIENT_EVENT_GET_LINE_TYPE = LG_FW_RAPI_START,
  45. LG_FW_TESTMODE_EVENT_FROM_ARM11 = LG_FW_RAPI_START + 1,
  46. LG_FW_A2M_BATT_INFO_GET = LG_FW_RAPI_START + 2,
  47. LG_FW_A2M_PSEUDO_BATT_INFO_SET = LG_FW_RAPI_START + 3,
  48. LG_FW_MEID_GET = LG_FW_RAPI_START + 4,
  49. //LGSI_LS670_Froyo_ToGB_Raghupathy_26Apr2011_Start
  50. LG_FW_SET_OPERATION_MODE = LG_FW_RAPI_START + 5,
  51. //LGSI_LS670_Froyo_ToGB_Raghupathy_26Apr2011_End
  52. /* LGE_CHANGES_S [woonghee.park@lge.com] 2010-05-18, [VS740],
  53. * LG_FW_CHARGING_TIMER
  54. */
  55. LG_FW_SET_CHARGING_TIMER = LG_FW_RAPI_START + 6,
  56. LG_FW_GET_CHARGING_TIMER = LG_FW_RAPI_START + 7,
  57. /* LGE_CHANGES_E [woonghee.park@lge.com] */
  58. /* LGE_CHANGE [dojip.kim@lge.com] 2010-05-29, [LS670] PCB Version */
  59. LG_FW_GET_PCB_VERSION = LG_FW_RAPI_START + 8,
  60. /* LGE_CHANGE [dojip.kim@lge.com] 2010-05-29, [LS670] LG_FW_RTN_RESET */
  61. LG_FW_RAPI_CLIENT_EVENT_SET_RTN_RESET= LG_FW_RAPI_START + 9,
  62. /* LGE_CHANGE [dojip.kim@lge.com] 2010-08-09, [LS670]
  63. * no stop charging even if hot or cold battery
  64. */
  65. LG_FW_RAPI_CLIENT_EVENT_SET_THM_NO_STOP_CHARGING = LG_FW_RAPI_START + 10,
  66. /* LGE_CHANGE [dojip.kim@lge.com] 2010-08-9 */
  67. //LGSI_LS670_Froyo_ToGB_Raghupathy_26Apr2011_Start
  68. LG_FW_A2M_BLOCK_CHARGING_SET = LG_FW_RAPI_START + 11,
  69. /* LGE_CHANGE [james.jang@lge.com] 2010-08-25 */
  70. LG_FW_CIQ_EXCEPTION_ERROR_TEST = LG_FW_RAPI_START + 12,
  71. /* LGE_CHANGE [dojip.kim@lge.com] 2010-09-01 */
  72. LG_FW_SET_CHARGING_STAT_REALTIME_UPDATE = LG_FW_RAPI_START + 13,
  73. LG_FW_GET_CHARGING_STAT_REALTIME_UPDATE = LG_FW_RAPI_START + 14,
  74. //LGSI_LS670_Froyo_ToGB_Raghupathy_26Apr2011_End
  75. /* LGE_CHANGE [dojip.kim@lge.com] 2010-09-12, prl version */
  76. LG_FW_GET_PRL_VERSION = LG_FW_RAPI_START + 15,
  77. /* LGE_CHANGE [dojip.kim@lge.com] 2010-09-28, ftm boot */
  78. LG_FW_SET_FTM_BOOT = LG_FW_RAPI_START + 16,
  79. LG_FW_GET_FTM_BOOT = LG_FW_RAPI_START + 17,
  80. #endif
  81. OEM_RAPI_CLIENT_EVENT_MAX
  82. };
  83. struct oem_rapi_client_streaming_func_cb_arg {
  84. uint32_t event;
  85. void *handle;
  86. uint32_t in_len;
  87. char *input;
  88. uint32_t out_len_valid;
  89. uint32_t output_valid;
  90. uint32_t output_size;
  91. };
  92. struct oem_rapi_client_streaming_func_cb_ret {
  93. uint32_t *out_len;
  94. char *output;
  95. };
  96. struct oem_rapi_client_streaming_func_arg {
  97. uint32_t event;
  98. int (*cb_func)(struct oem_rapi_client_streaming_func_cb_arg *,
  99. struct oem_rapi_client_streaming_func_cb_ret *);
  100. void *handle;
  101. uint32_t in_len;
  102. char *input;
  103. uint32_t out_len_valid;
  104. uint32_t output_valid;
  105. uint32_t output_size;
  106. };
  107. struct oem_rapi_client_streaming_func_ret {
  108. uint32_t *out_len;
  109. char *output;
  110. };
  111. int oem_rapi_client_streaming_function(
  112. struct msm_rpc_client *client,
  113. struct oem_rapi_client_streaming_func_arg *arg,
  114. struct oem_rapi_client_streaming_func_ret *ret);
  115. int oem_rapi_client_close(void);
  116. struct msm_rpc_client *oem_rapi_client_init(void);
  117. #endif