Commit 4b82d95e authored by Joey Gouly's avatar Joey Gouly
Browse files

pinctrl: add clock code



This will not be needed once power domain support is added.
Signed-off-by: Joey Gouly's avatarJoey Gouly <joey.gouly@arm.com>
parent 1b470076
......@@ -449,6 +449,7 @@ static int apple_gpio_gpio_register(struct apple_gpio_pinctrl *pctl)
static int apple_gpio_pinctrl_probe(struct platform_device *pdev)
{
struct apple_gpio_pinctrl *pctl;
struct clk *clk;
struct pinctrl_pin_desc *pins;
unsigned int npins;
const char **pin_names;
......@@ -489,6 +490,17 @@ static int apple_gpio_pinctrl_probe(struct platform_device *pdev)
if (IS_ERR(pctl->base))
return PTR_ERR(pctl->base);
clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(clk)) {
dev_err(&pdev->dev, "unable to get clock: %ld.\n",
PTR_ERR(clk));
return PTR_ERR(clk);
}
res = clk_prepare_enable(clk);
if (res)
return res;
for (i = 0; i < npins; i++) {
reg = apple_gpio_get_reg(pctl, i);
pctl->pin_shadow[i] = reg;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment