Commit a92ec174 authored by Weifeng Voon's avatar Weifeng Voon Committed by Wolfram Sang

i2c: designware: get fast plus and high speed *CNT configuration

I2C designware controller can run at fast mode plus and high speed. This
patch adds the capability to get the HCNT, LCNT configuration via
FPCN (fast plus) and HSCN (high speed) ACPI method.
Signed-off-by: default avatarWeifeng Voon <weifeng.voon@intel.com>
Signed-off-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 19c0a539
...@@ -62,6 +62,10 @@ ...@@ -62,6 +62,10 @@
* @ss_lcnt: standard speed LCNT value * @ss_lcnt: standard speed LCNT value
* @fs_hcnt: fast speed HCNT value * @fs_hcnt: fast speed HCNT value
* @fs_lcnt: fast speed LCNT value * @fs_lcnt: fast speed LCNT value
* @fp_hcnt: fast plus HCNT value
* @fp_lcnt: fast plus LCNT value
* @hs_hcnt: high speed HCNT value
* @hs_lcnt: high speed LCNT value
* @acquire_lock: function to acquire a hardware lock on the bus * @acquire_lock: function to acquire a hardware lock on the bus
* @release_lock: function to release a hardware lock on the bus * @release_lock: function to release a hardware lock on the bus
* @pm_runtime_disabled: true if pm runtime is disabled * @pm_runtime_disabled: true if pm runtime is disabled
...@@ -105,6 +109,10 @@ struct dw_i2c_dev { ...@@ -105,6 +109,10 @@ struct dw_i2c_dev {
u16 ss_lcnt; u16 ss_lcnt;
u16 fs_hcnt; u16 fs_hcnt;
u16 fs_lcnt; u16 fs_lcnt;
u16 fp_hcnt;
u16 fp_lcnt;
u16 hs_hcnt;
u16 hs_lcnt;
int (*acquire_lock)(struct dw_i2c_dev *dev); int (*acquire_lock)(struct dw_i2c_dev *dev);
void (*release_lock)(struct dw_i2c_dev *dev); void (*release_lock)(struct dw_i2c_dev *dev);
bool pm_runtime_disabled; bool pm_runtime_disabled;
......
...@@ -107,6 +107,8 @@ static int dw_i2c_acpi_configure(struct platform_device *pdev) ...@@ -107,6 +107,8 @@ static int dw_i2c_acpi_configure(struct platform_device *pdev)
dw_i2c_acpi_params(pdev, "SSCN", &dev->ss_hcnt, &dev->ss_lcnt, NULL); dw_i2c_acpi_params(pdev, "SSCN", &dev->ss_hcnt, &dev->ss_lcnt, NULL);
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);
dw_i2c_acpi_params(pdev, "FPCN", &dev->fp_hcnt, &dev->fp_lcnt, NULL);
dw_i2c_acpi_params(pdev, "HSCN", &dev->hs_hcnt, &dev->hs_lcnt, NULL);
id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev); id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev);
if (id && id->driver_data) if (id && id->driver_data)
......
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