From 6a1e236d35ba680e9e5b6119b5cee873d5f82234 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Wed, 14 Sep 2016 18:15:01 +0530 Subject: platform: tegra: APIs to set prod based on name/index/offset/mask Add prod APIs to set the prod value based on name, index, offset and mask matches. This helps in client to set the prod setting partially based on their initialisation sequence. bug 1807581 Change-Id: I83e5d5499da7685548702ab0692db59ff3ae3b6f Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/1220784 Reviewed-on: https://git-master.nvidia.com/r/1768542 Tested-by: Nicolin Chen GVS: Gerrit_Virtual_Submit Reviewed-by: Sachin Nikam Reviewed-by: mobile promotions Tested-by: mobile promotions --- include/linux/tegra_prod.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include/linux') diff --git a/include/linux/tegra_prod.h b/include/linux/tegra_prod.h index 1a33bf20e..3329cda65 100644 --- a/include/linux/tegra_prod.h +++ b/include/linux/tegra_prod.h @@ -61,6 +61,26 @@ int tegra_prod_set_boot_init(void __iomem **base, int tegra_prod_set_by_name(void __iomem **base, const char *name, struct tegra_prod *tegra_prod); +/** + * tegra_prod_set_by_name_partially - Set the prod setting from list partially + * under given prod name. The matching is done + * qith index, offset and mask. + * @base: base address of the register. + * @name: the name of tegra prod need to set. + * @tegra_prod: the list of tegra prods. + * @index: Index of base address. + * @offset: Offset of the register. + * @mask: Mask field on given register. + * + * Find the tegra prod in the list according to the name. Then set + * that tegra prod which has matching of index, offset and mask. + * + * Returns 0 on success. + */ +int tegra_prod_set_by_name_partially(void __iomem **base, const char *name, + struct tegra_prod *tegra_prod, u32 index, + u32 offset, u32 mask); + /** * tegra_prod_by_name_supported - Tell whether tegra prod will be supported by * given name or not. -- cgit v1.2.2