/* Return: pointer to handle if successful, else EINVAL if invalid conditions are encountered.  */
const struct ti_sci_handle* ti_sci_get_handle(struct udevice *dev)
/* Return: pointer to handle if successful, else EINVAL if invalid conditions are encountered.  */
const struct ti_sci_handle* ti_sci_get_handle(struct udevice *dev)
{
	if (!dev)
		return ERR_PTR(-EINVAL);
	struct udevice *sci_dev = dev_get_parent(dev);
	return ti_sci_get_handle_from_sysfw(sci_dev);
}