i2c: designware: reverts "i2c: designware: Add support for AMD I2C controller"
The patch reverts commit a445900c90
(i2c: designware: Add support for
AMD I2C controller). It never worked anyhow because it did not register
a proper clkdev.
Since kernel 4.1 starts to support APD, there is no need to get freq
from id->driver_data for AMD0010. clkdev is supposed to be already
registered in APD.
So, revert old design and make AMD0010 looks like other ones.
Signed-off-by: Ken Xue <Ken.Xue@amd.com>
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
fa721baed6
commit
3eddad96c4
@ -73,7 +73,6 @@ static void dw_i2c_acpi_params(struct platform_device *pdev, char method[],
|
|||||||
static int dw_i2c_acpi_configure(struct platform_device *pdev)
|
static int dw_i2c_acpi_configure(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
|
struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
|
||||||
const struct acpi_device_id *id;
|
|
||||||
|
|
||||||
dev->adapter.nr = -1;
|
dev->adapter.nr = -1;
|
||||||
dev->tx_fifo_depth = 32;
|
dev->tx_fifo_depth = 32;
|
||||||
@ -87,29 +86,9 @@ static int dw_i2c_acpi_configure(struct platform_device *pdev)
|
|||||||
dw_i2c_acpi_params(pdev, "FMCN", &dev->fs_hcnt, &dev->fs_lcnt,
|
dw_i2c_acpi_params(pdev, "FMCN", &dev->fs_hcnt, &dev->fs_lcnt,
|
||||||
&dev->sda_hold_time);
|
&dev->sda_hold_time);
|
||||||
|
|
||||||
/*
|
|
||||||
* Provide a way for Designware I2C host controllers that are not
|
|
||||||
* based on Intel LPSS to specify their input clock frequency via
|
|
||||||
* id->driver_data.
|
|
||||||
*/
|
|
||||||
id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev);
|
|
||||||
if (id && id->driver_data)
|
|
||||||
clk_register_fixed_rate(&pdev->dev, dev_name(&pdev->dev), NULL,
|
|
||||||
CLK_IS_ROOT, id->driver_data);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dw_i2c_acpi_unconfigure(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
|
|
||||||
const struct acpi_device_id *id;
|
|
||||||
|
|
||||||
id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev);
|
|
||||||
if (id && id->driver_data)
|
|
||||||
clk_unregister(dev->clk);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct acpi_device_id dw_i2c_acpi_match[] = {
|
static const struct acpi_device_id dw_i2c_acpi_match[] = {
|
||||||
{ "INT33C2", 0 },
|
{ "INT33C2", 0 },
|
||||||
{ "INT33C3", 0 },
|
{ "INT33C3", 0 },
|
||||||
@ -117,7 +96,7 @@ static const struct acpi_device_id dw_i2c_acpi_match[] = {
|
|||||||
{ "INT3433", 0 },
|
{ "INT3433", 0 },
|
||||||
{ "80860F41", 0 },
|
{ "80860F41", 0 },
|
||||||
{ "808622C1", 0 },
|
{ "808622C1", 0 },
|
||||||
{ "AMD0010", 133 * 1000 * 1000 },
|
{ "AMD0010", 0 },
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
|
MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
|
||||||
@ -126,7 +105,6 @@ static inline int dw_i2c_acpi_configure(struct platform_device *pdev)
|
|||||||
{
|
{
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
static inline void dw_i2c_acpi_unconfigure(struct platform_device *pdev) { }
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int dw_i2c_plat_probe(struct platform_device *pdev)
|
static int dw_i2c_plat_probe(struct platform_device *pdev)
|
||||||
@ -261,9 +239,6 @@ static int dw_i2c_plat_remove(struct platform_device *pdev)
|
|||||||
pm_runtime_put_sync(&pdev->dev);
|
pm_runtime_put_sync(&pdev->dev);
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
|
|
||||||
if (has_acpi_companion(&pdev->dev))
|
|
||||||
dw_i2c_acpi_unconfigure(pdev);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user