提交 f142b9d6 编写于 作者: A Aapo Vienamo 提交者: Thierry Reding

soc/tegra: pmc: Implement tegra_io_pad_is_powered()

Implement a function to query whether a pad is in deep power down mode.
This is needed by the pinctrl callbacks.
Signed-off-by: NAapo Vienamo <avienamo@nvidia.com>
Acked-by: NJon Hunter <jonathanh@nvidia.com>
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 00ead3c9
......@@ -1075,6 +1075,21 @@ int tegra_io_pad_power_disable(enum tegra_io_pad id)
}
EXPORT_SYMBOL(tegra_io_pad_power_disable);
static int tegra_io_pad_is_powered(enum tegra_io_pad id)
{
unsigned long request, status;
u32 mask, value;
int err;
err = tegra_io_pad_get_dpd_register_bit(id, &request, &status, &mask);
if (err)
return err;
value = tegra_pmc_readl(status);
return !(value & mask);
}
int tegra_io_pad_set_voltage(enum tegra_io_pad id,
enum tegra_io_pad_voltage voltage)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册