diff options
| author | Laxman Dewangan <ldewangan@nvidia.com> | 2016-09-14 08:45:01 -0400 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-07-04 13:03:10 -0400 |
| commit | 6a1e236d35ba680e9e5b6119b5cee873d5f82234 (patch) | |
| tree | 823b6aa0ef207210c4126849c63acceb546d721f /include/linux | |
| parent | 0eef90aef2aa88b7ec830327e7eb7e3b25bdb170 (diff) | |
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 <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1220784
Reviewed-on: https://git-master.nvidia.com/r/1768542
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/tegra_prod.h | 20 |
1 files changed, 20 insertions, 0 deletions
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 | |||
| @@ -62,6 +62,26 @@ int tegra_prod_set_by_name(void __iomem **base, const char *name, | |||
| 62 | struct tegra_prod *tegra_prod); | 62 | struct tegra_prod *tegra_prod); |
| 63 | 63 | ||
| 64 | /** | 64 | /** |
| 65 | * tegra_prod_set_by_name_partially - Set the prod setting from list partially | ||
| 66 | * under given prod name. The matching is done | ||
| 67 | * qith index, offset and mask. | ||
| 68 | * @base: base address of the register. | ||
| 69 | * @name: the name of tegra prod need to set. | ||
| 70 | * @tegra_prod: the list of tegra prods. | ||
| 71 | * @index: Index of base address. | ||
| 72 | * @offset: Offset of the register. | ||
| 73 | * @mask: Mask field on given register. | ||
| 74 | * | ||
| 75 | * Find the tegra prod in the list according to the name. Then set | ||
| 76 | * that tegra prod which has matching of index, offset and mask. | ||
| 77 | * | ||
| 78 | * Returns 0 on success. | ||
| 79 | */ | ||
| 80 | int tegra_prod_set_by_name_partially(void __iomem **base, const char *name, | ||
| 81 | struct tegra_prod *tegra_prod, u32 index, | ||
| 82 | u32 offset, u32 mask); | ||
| 83 | |||
| 84 | /** | ||
| 65 | * tegra_prod_by_name_supported - Tell whether tegra prod will be supported by | 85 | * tegra_prod_by_name_supported - Tell whether tegra prod will be supported by |
| 66 | * given name or not. | 86 | * given name or not. |
| 67 | * @tegra_prod: the list of tegra prods. | 87 | * @tegra_prod: the list of tegra prods. |
