Commit c05d74e5 authored by Heikki Krogerus's avatar Heikki Krogerus Committed by Greg Kroah-Hartman

ACPI / LPSS: provide con_id for the clkdev

commit fcf0789a upstream.

Commit 7d78cbef (serial: 8250_dw: add ability to handle
the peripheral clock) introduces handling for a second clk
to 8250_dw.c which is the driver also for LPSS UART. The
second clk forces us to provide identifier (con_id) for the
clkdev we create.

This fixes an issue where 8250_dw.c is getting the same
handler for both clocks.

Fixes: 7d78cbef (serial: 8250_dw: add ability to handle the peripheral clock)
Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 371817cd
...@@ -65,6 +65,7 @@ struct lpss_private_data; ...@@ -65,6 +65,7 @@ struct lpss_private_data;
struct lpss_device_desc { struct lpss_device_desc {
unsigned int flags; unsigned int flags;
const char *clk_con_id;
unsigned int prv_offset; unsigned int prv_offset;
size_t prv_size_override; size_t prv_size_override;
void (*setup)(struct lpss_private_data *pdata); void (*setup)(struct lpss_private_data *pdata);
...@@ -140,6 +141,7 @@ static struct lpss_device_desc lpt_i2c_dev_desc = { ...@@ -140,6 +141,7 @@ static struct lpss_device_desc lpt_i2c_dev_desc = {
static struct lpss_device_desc lpt_uart_dev_desc = { static struct lpss_device_desc lpt_uart_dev_desc = {
.flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_LTR, .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_LTR,
.clk_con_id = "baudclk",
.prv_offset = 0x800, .prv_offset = 0x800,
.setup = lpss_uart_setup, .setup = lpss_uart_setup,
}; };
...@@ -156,6 +158,7 @@ static struct lpss_device_desc byt_pwm_dev_desc = { ...@@ -156,6 +158,7 @@ static struct lpss_device_desc byt_pwm_dev_desc = {
static struct lpss_device_desc byt_uart_dev_desc = { static struct lpss_device_desc byt_uart_dev_desc = {
.flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX, .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX,
.clk_con_id = "baudclk",
.prv_offset = 0x800, .prv_offset = 0x800,
.setup = lpss_uart_setup, .setup = lpss_uart_setup,
}; };
...@@ -313,7 +316,7 @@ static int register_device_clock(struct acpi_device *adev, ...@@ -313,7 +316,7 @@ static int register_device_clock(struct acpi_device *adev,
return PTR_ERR(clk); return PTR_ERR(clk);
pdata->clk = clk; pdata->clk = clk;
clk_register_clkdev(clk, NULL, devname); clk_register_clkdev(clk, dev_desc->clk_con_id, devname);
return 0; return 0;
} }
......
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