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

Commit 82ea74e2 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Add an helper function to read DT properties"

parents f178c434 b8777b0a
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -749,4 +749,19 @@ static inline int kgsl_cmdbatch_sync_pending(struct kgsl_cmdbatch *cmdbatch)
	return ret;
}

/**
 * kgsl_property_read_u32() - Read a u32 property from the device tree
 * @device: Pointer to the KGSL device
 * @prop: String name of the property to query
 * @ptr: Pointer to the variable to store the property
 */
static inline int kgsl_property_read_u32(struct kgsl_device *device,
	const char *prop, unsigned int *ptr)
{
	struct platform_device *pdev =
		container_of(device->parentdev, struct platform_device, dev);

	return of_property_read_u32(pdev->dev.of_node, prop, ptr);
}

#endif  /* __KGSL_DEVICE_H */