diff mbox series

[v2,1/2] ACPI / APD: Add clock frequency for Hisilicon Hip08-Lite I2C controller

Message ID 1580693767-5185-1-git-send-email-guohanjun@huawei.com
State Awaiting Upstream
Headers show
Series [v2,1/2] ACPI / APD: Add clock frequency for Hisilicon Hip08-Lite I2C controller | expand

Commit Message

Hanjun Guo Feb. 3, 2020, 1:36 a.m. UTC
I2C clock frequency of Designware ip for Hisilicon Hip08 Lite
is 125M, use a new ACPI HID to enable it.

Tested-by: Sheng Feng <fengsheng5@huawei.com>
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
---

v2:
 - Reverse the order of the two patches suggested by Andy;

 drivers/acpi/acpi_apd.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Jarkko Nikula Feb. 3, 2020, 9 a.m. UTC | #1
On 2/3/20 3:36 AM, Hanjun Guo wrote:
> I2C clock frequency of Designware ip for Hisilicon Hip08 Lite
> is 125M, use a new ACPI HID to enable it.
> 
> Tested-by: Sheng Feng <fengsheng5@huawei.com>
> Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
> ---
> 
> v2:
>   - Reverse the order of the two patches suggested by Andy;
> 
>   drivers/acpi/acpi_apd.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Rafael J. Wysocki Feb. 3, 2020, 11:04 a.m. UTC | #2
On Mon, Feb 3, 2020 at 2:41 AM Hanjun Guo <guohanjun@huawei.com> wrote:
>
> I2C clock frequency of Designware ip for Hisilicon Hip08 Lite
> is 125M, use a new ACPI HID to enable it.
>
> Tested-by: Sheng Feng <fengsheng5@huawei.com>
> Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
> ---
>
> v2:
>  - Reverse the order of the two patches suggested by Andy;
>
>  drivers/acpi/acpi_apd.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
> index 71511ae..ba2612e 100644
> --- a/drivers/acpi/acpi_apd.c
> +++ b/drivers/acpi/acpi_apd.c
> @@ -161,6 +161,11 @@ static int st_misc_setup(struct apd_private_data *pdata)
>         .fixed_clk_rate = 250000000,
>  };
>
> +static const struct apd_device_desc hip08_lite_i2c_desc = {
> +       .setup = acpi_apd_setup,
> +       .fixed_clk_rate = 125000000,
> +};
> +
>  static const struct apd_device_desc thunderx2_i2c_desc = {
>         .setup = acpi_apd_setup,
>         .fixed_clk_rate = 125000000,
> @@ -243,6 +248,7 @@ static int acpi_apd_create_device(struct acpi_device *adev,
>         { "CAV9007",  APD_ADDR(thunderx2_i2c_desc) },
>         { "HISI02A1", APD_ADDR(hip07_i2c_desc) },
>         { "HISI02A2", APD_ADDR(hip08_i2c_desc) },
> +       { "HISI02A3", APD_ADDR(hip08_lite_i2c_desc) },
>         { "HISI0173", APD_ADDR(hip08_spi_desc) },
>         { "NXP0001", APD_ADDR(nxp_i2c_desc) },
>  #endif
> --

Both patches in the series applied as 5.6 material, thanks!
diff mbox series

Patch

diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index 71511ae..ba2612e 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -161,6 +161,11 @@  static int st_misc_setup(struct apd_private_data *pdata)
 	.fixed_clk_rate = 250000000,
 };
 
+static const struct apd_device_desc hip08_lite_i2c_desc = {
+	.setup = acpi_apd_setup,
+	.fixed_clk_rate = 125000000,
+};
+
 static const struct apd_device_desc thunderx2_i2c_desc = {
 	.setup = acpi_apd_setup,
 	.fixed_clk_rate = 125000000,
@@ -243,6 +248,7 @@  static int acpi_apd_create_device(struct acpi_device *adev,
 	{ "CAV9007",  APD_ADDR(thunderx2_i2c_desc) },
 	{ "HISI02A1", APD_ADDR(hip07_i2c_desc) },
 	{ "HISI02A2", APD_ADDR(hip08_i2c_desc) },
+	{ "HISI02A3", APD_ADDR(hip08_lite_i2c_desc) },
 	{ "HISI0173", APD_ADDR(hip08_spi_desc) },
 	{ "NXP0001", APD_ADDR(nxp_i2c_desc) },
 #endif