Needs tidying up - hopefully can do clock right using on going work from Niyas https://linaro.atlassian.net/wiki/spaces/CLIENTPC/pages/28832333867/ACPI+Clock+Management Don't think ACPI provide an equivalent reset deasert / assert. _RST doesn't fit that model. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> --- drivers/i2c/busses/i2c-aspeed.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c index adbb93444d7a..df20382970f3 100644 --- a/drivers/i2c/busses/i2c-aspeed.c +++ b/drivers/i2c/busses/i2c-aspeed.c @@ -986,20 +986,21 @@ static int aspeed_i2c_probe_bus(struct platform_device *pdev) if (IS_ERR(bus->base)) return PTR_ERR(bus->base); - parent_clk = devm_clk_get(&pdev->dev, NULL); - if (IS_ERR(parent_clk)) - return PTR_ERR(parent_clk); - bus->parent_clk_frequency = clk_get_rate(parent_clk); + // parent_clk = devm_clk_get(&pdev->dev, NULL); + // if (IS_ERR(parent_clk))// + // return PTR_ERR(parent_clk); + bus->parent_clk_frequency = 1000000;//clk_get_rate(parent_clk); /* We just need the clock rate, we don't actually use the clk object. */ - devm_clk_put(&pdev->dev, parent_clk); + //devm_clk_put(&pdev->dev, parent_clk); bus->rst = devm_reset_control_get_shared(&pdev->dev, NULL); if (IS_ERR(bus->rst)) { - dev_err(&pdev->dev, + dev_warn(&pdev->dev, "missing or invalid reset controller device tree entry\n"); - return PTR_ERR(bus->rst); + bus->rst = 0; + } else { + reset_control_deassert(bus->rst); } - reset_control_deassert(bus->rst); ret = device_property_read_u32(&pdev->dev, "bus-frequency", &bus->bus_frequency); -- 2.39.2