diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-09-13 03:12:20 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-09-13 03:12:20 +0200 |
commit | f75ee9a8816824683e22aee2790f43a9fc43c613 (patch) | |
tree | 8eb48525bcd0291668d56d0bc4e8a0467467b9b3 /drivers/acpi/acpi_apd.c | |
parent | bd2058dc1aa88ac5690184f85a1e5051b12cd573 (diff) | |
parent | 20a875e2e86e73d13ec256781a7d55a7885868ec (diff) |
Merge branch 'device-properties' into acpi-soc
Diffstat (limited to 'drivers/acpi/acpi_apd.c')
-rw-r--r-- | drivers/acpi/acpi_apd.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c index c80c8f8f31d5..1f30fffe1efb 100644 --- a/drivers/acpi/acpi_apd.c +++ b/drivers/acpi/acpi_apd.c @@ -42,6 +42,7 @@ struct apd_private_data; struct apd_device_desc { unsigned int flags; unsigned int fixed_clk_rate; + struct property_entry *properties; int (*setup)(struct apd_private_data *pdata); }; @@ -76,9 +77,17 @@ static struct apd_device_desc cz_i2c_desc = { .fixed_clk_rate = 133000000, }; +static struct property_entry uart_properties[] = { + PROPERTY_ENTRY_U32("reg-io-width", 4), + PROPERTY_ENTRY_U32("reg-shift", 2), + PROPERTY_ENTRY_BOOL("snps,uart-16550-compatible"), + { }, +}; + static struct apd_device_desc cz_uart_desc = { .setup = acpi_apd_setup, .fixed_clk_rate = 48000000, + .properties = uart_properties, }; #endif @@ -130,6 +139,12 @@ static int acpi_apd_create_device(struct acpi_device *adev, goto err_out; } + if (dev_desc->properties) { + ret = device_add_properties(&adev->dev, dev_desc->properties); + if (ret) + goto err_out; + } + adev->driver_data = pdata; pdev = acpi_create_platform_device(adev); if (!IS_ERR_OR_NULL(pdev)) |