Skip to content

Commit

Permalink
HACK: i2c: aspeed: Comment the clock and reset out.
Browse files Browse the repository at this point in the history
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@huawei.com>
  • Loading branch information
jic23 authored and intel-lab-lkp committed May 25, 2023
1 parent 348e97f commit d400cf8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions drivers/i2c/busses/i2c-aspeed.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d400cf8

Please sign in to comment.