Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 177b9dd5 authored by Ravi Gummadidala's avatar Ravi Gummadidala
Browse files

msm: ipa: add an API to check if IPA driver is ready



Clients can use this API to ensure IPA driver was
initialized successfully before invoking any other IPA APIs.

Change-Id: Ib4a8b62a2c9a2746db1090f540cccd01bae74272
Signed-off-by: default avatarRavi Gummadidala <rgummadi@codeaurora.org>
parent 47d53bf2
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -3606,3 +3606,15 @@ fail_alloc_pkt_init:
fail_alloc_desc:
	return res;
}

/**
 * ipa_is_ready() - check if IPA module was initialized
 * successfully
 *
 * Return value: true for yes; false for no
 */
bool ipa_is_ready(void)
{
	return (ipa_ctx != NULL) ? true : false;
}
EXPORT_SYMBOL(ipa_is_ready);
+7 −0
Original line number Diff line number Diff line
@@ -953,6 +953,8 @@ int ipa_remove_interrupt_handler(enum ipa_irq_type interrupt);

int ipa_get_ep_mapping(enum ipa_client_type client);

bool ipa_is_ready(void);

#else /* CONFIG_IPA */

/*
@@ -1421,6 +1423,11 @@ static inline int ipa_get_ep_mapping(enum ipa_client_type client)
{
	return -EPERM;
}

static inline bool ipa_is_ready(void)
{
	return false;
}
#endif /* CONFIG_IPA*/

#endif /* _IPA_H_ */