From: Hanjun Guo <guohanjun@huawei.com>
To: linux-acpi@vger.kernel.org, linux-i2c@vger.kernel.org
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Wolfram Sang <wsa@the-dreams.de>,
Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
linuxarm@huawei.com, wangkefeng.wang@huawei.com,
Hanjun Guo <hanjun.guo@linaro.org>
Subject: [PATCH 1/2] ACPI / APD: Add clock frequency for Hisilicon Hip07/08 I2C controller
Date: Sat, 22 Apr 2017 11:23:43 +0800 [thread overview]
Message-ID: <1492831424-40581-1-git-send-email-guohanjun@huawei.com> (raw)
From: Hanjun Guo <hanjun.guo@linaro.org>
I2C clock frequency of Designware ip for Hisilicon Hip07 is 200M,
but 250M for Hip08, use two ACPI IDs to differentiate them.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
---
drivers/acpi/acpi_apd.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index 26696b6..8f57648 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -106,6 +106,16 @@ static int acpi_apd_setup(struct apd_private_data *pdata)
.setup = acpi_apd_setup,
.fixed_clk_rate = 133000000,
};
+
+static const struct apd_device_desc hip07_i2c_desc = {
+ .setup = acpi_apd_setup,
+ .fixed_clk_rate = 200000000,
+};
+
+static const struct apd_device_desc hip08_i2c_desc = {
+ .setup = acpi_apd_setup,
+ .fixed_clk_rate = 250000000,
+};
#endif
#else
@@ -169,6 +179,8 @@ static int acpi_apd_create_device(struct acpi_device *adev,
#ifdef CONFIG_ARM64
{ "APMC0D0F", APD_ADDR(xgene_i2c_desc) },
{ "BRCM900D", APD_ADDR(vulcan_spi_desc) },
+ { "HISI0A21", APD_ADDR(hip07_i2c_desc) },
+ { "HISI0A22", APD_ADDR(hip08_i2c_desc) },
#endif
{ }
};
--
1.7.12.4
next reply other threads:[~2017-04-22 3:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-22 3:23 Hanjun Guo [this message]
2017-04-22 3:23 ` [PATCH 2/2] i2c: designware: Add ACPI HID for Hisilicon Hip07/08 I2C controller Hanjun Guo
2017-04-24 9:34 ` Jarkko Nikula
2017-04-24 11:51 ` [PATCH 1/2] ACPI / APD: Add clock frequency " Kefeng Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1492831424-40581-1-git-send-email-guohanjun@huawei.com \
--to=guohanjun@huawei.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=hanjun.guo@linaro.org \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mika.westerberg@linux.intel.com \
--cc=rjw@rjwysocki.net \
--cc=wangkefeng.wang@huawei.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).