Files
android_kernel_samsung_sm86…/include/smci/interface/IOpener.h
Sarthak Patidar 1efb70736f Misc: hdcp : Add smcinvoke support for hdcp driver
Change-Id: I76b0e8f24df7f3e36288b1383fc7203bb295c181
Signed-off-by:Sarthak Patidar <quic_spatidar@quicinc.com>
2023-05-30 21:33:34 -07:00

49 lines
992 B
C

/* SPDX-License-Identifier: GPL-2.0-only
*
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/
/** @cond */
#pragma once
#include "smcinvoke_object.h"
/** 0 is not a valid service ID. */
#define IOpener_INVALID_ID UINT32_C(0)
#define IOpener_ERROR_NOT_FOUND INT32_C(10)
#define IOpener_ERROR_PRIVILEGE INT32_C(11)
#define IOpener_ERROR_NOT_SUPPORTED INT32_C(12)
#define IOpener_OP_open 0
static inline int32_t
IOpener_release(struct Object self)
{
return Object_invoke(self, Object_OP_release, 0, 0);
}
static inline int32_t
IOpener_retain(struct Object self)
{
return Object_invoke(self, Object_OP_retain, 0, 0);
}
static inline int32_t
IOpener_open(struct Object self, uint32_t id_val,struct Object *obj_ptr)
{
union ObjectArg a[2];
int32_t result;
a[0].b = (struct ObjectBuf) { &id_val, sizeof(uint32_t) };
result = Object_invoke(self, IOpener_OP_open, a, ObjectCounts_pack(1, 0, 0, 1));
*obj_ptr = a[1].o;
return result;
}