mfd: intel-lpss: Switch to use the software nodes
Software node was always created for the device if it was supplied with additional device properties, so those nodes might as well be constant. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
parent
9677e6f78f
commit
03152e35dd
@ -27,9 +27,13 @@ static const struct property_entry spt_i2c_properties[] = {
|
||||
{ },
|
||||
};
|
||||
|
||||
static const struct software_node spt_i2c_node = {
|
||||
.properties = spt_i2c_properties,
|
||||
};
|
||||
|
||||
static const struct intel_lpss_platform_info spt_i2c_info = {
|
||||
.clk_rate = 120000000,
|
||||
.properties = spt_i2c_properties,
|
||||
.swnode = &spt_i2c_node,
|
||||
};
|
||||
|
||||
static const struct property_entry uart_properties[] = {
|
||||
@ -39,10 +43,14 @@ static const struct property_entry uart_properties[] = {
|
||||
{ },
|
||||
};
|
||||
|
||||
static const struct software_node uart_node = {
|
||||
.properties = uart_properties,
|
||||
};
|
||||
|
||||
static const struct intel_lpss_platform_info spt_uart_info = {
|
||||
.clk_rate = 120000000,
|
||||
.clk_con_id = "baudclk",
|
||||
.properties = uart_properties,
|
||||
.swnode = &uart_node,
|
||||
};
|
||||
|
||||
static const struct intel_lpss_platform_info bxt_info = {
|
||||
@ -56,9 +64,13 @@ static const struct property_entry bxt_i2c_properties[] = {
|
||||
{ },
|
||||
};
|
||||
|
||||
static const struct software_node bxt_i2c_node = {
|
||||
.properties = bxt_i2c_properties,
|
||||
};
|
||||
|
||||
static const struct intel_lpss_platform_info bxt_i2c_info = {
|
||||
.clk_rate = 133000000,
|
||||
.properties = bxt_i2c_properties,
|
||||
.swnode = &bxt_i2c_node,
|
||||
};
|
||||
|
||||
static const struct property_entry apl_i2c_properties[] = {
|
||||
@ -68,9 +80,13 @@ static const struct property_entry apl_i2c_properties[] = {
|
||||
{ },
|
||||
};
|
||||
|
||||
static const struct software_node apl_i2c_node = {
|
||||
.properties = apl_i2c_properties,
|
||||
};
|
||||
|
||||
static const struct intel_lpss_platform_info apl_i2c_info = {
|
||||
.clk_rate = 133000000,
|
||||
.properties = apl_i2c_properties,
|
||||
.swnode = &apl_i2c_node,
|
||||
};
|
||||
|
||||
static const struct acpi_device_id intel_lpss_acpi_ids[] = {
|
||||
|
@ -70,9 +70,13 @@ static const struct property_entry spt_i2c_properties[] = {
|
||||
{ },
|
||||
};
|
||||
|
||||
static const struct software_node spt_i2c_node = {
|
||||
.properties = spt_i2c_properties,
|
||||
};
|
||||
|
||||
static const struct intel_lpss_platform_info spt_i2c_info = {
|
||||
.clk_rate = 120000000,
|
||||
.properties = spt_i2c_properties,
|
||||
.swnode = &spt_i2c_node,
|
||||
};
|
||||
|
||||
static const struct property_entry uart_properties[] = {
|
||||
@ -82,10 +86,14 @@ static const struct property_entry uart_properties[] = {
|
||||
{ },
|
||||
};
|
||||
|
||||
static const struct software_node uart_node = {
|
||||
.properties = uart_properties,
|
||||
};
|
||||
|
||||
static const struct intel_lpss_platform_info spt_uart_info = {
|
||||
.clk_rate = 120000000,
|
||||
.clk_con_id = "baudclk",
|
||||
.properties = uart_properties,
|
||||
.swnode = &uart_node,
|
||||
};
|
||||
|
||||
static const struct intel_lpss_platform_info bxt_info = {
|
||||
@ -95,7 +103,7 @@ static const struct intel_lpss_platform_info bxt_info = {
|
||||
static const struct intel_lpss_platform_info bxt_uart_info = {
|
||||
.clk_rate = 100000000,
|
||||
.clk_con_id = "baudclk",
|
||||
.properties = uart_properties,
|
||||
.swnode = &uart_node,
|
||||
};
|
||||
|
||||
static const struct property_entry bxt_i2c_properties[] = {
|
||||
@ -105,9 +113,13 @@ static const struct property_entry bxt_i2c_properties[] = {
|
||||
{ },
|
||||
};
|
||||
|
||||
static const struct software_node bxt_i2c_node = {
|
||||
.properties = bxt_i2c_properties,
|
||||
};
|
||||
|
||||
static const struct intel_lpss_platform_info bxt_i2c_info = {
|
||||
.clk_rate = 133000000,
|
||||
.properties = bxt_i2c_properties,
|
||||
.swnode = &bxt_i2c_node,
|
||||
};
|
||||
|
||||
static const struct property_entry apl_i2c_properties[] = {
|
||||
@ -117,9 +129,13 @@ static const struct property_entry apl_i2c_properties[] = {
|
||||
{ },
|
||||
};
|
||||
|
||||
static const struct software_node apl_i2c_node = {
|
||||
.properties = apl_i2c_properties,
|
||||
};
|
||||
|
||||
static const struct intel_lpss_platform_info apl_i2c_info = {
|
||||
.clk_rate = 133000000,
|
||||
.properties = apl_i2c_properties,
|
||||
.swnode = &apl_i2c_node,
|
||||
};
|
||||
|
||||
static const struct property_entry glk_i2c_properties[] = {
|
||||
@ -129,19 +145,23 @@ static const struct property_entry glk_i2c_properties[] = {
|
||||
{ },
|
||||
};
|
||||
|
||||
static const struct software_node glk_i2c_node = {
|
||||
.properties = glk_i2c_properties,
|
||||
};
|
||||
|
||||
static const struct intel_lpss_platform_info glk_i2c_info = {
|
||||
.clk_rate = 133000000,
|
||||
.properties = glk_i2c_properties,
|
||||
.swnode = &glk_i2c_node,
|
||||
};
|
||||
|
||||
static const struct intel_lpss_platform_info cnl_i2c_info = {
|
||||
.clk_rate = 216000000,
|
||||
.properties = spt_i2c_properties,
|
||||
.swnode = &spt_i2c_node,
|
||||
};
|
||||
|
||||
static const struct intel_lpss_platform_info ehl_i2c_info = {
|
||||
.clk_rate = 100000000,
|
||||
.properties = bxt_i2c_properties,
|
||||
.swnode = &bxt_i2c_node,
|
||||
};
|
||||
|
||||
static const struct pci_device_id intel_lpss_pci_ids[] = {
|
||||
|
@ -399,7 +399,7 @@ int intel_lpss_probe(struct device *dev,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
lpss->cell->properties = info->properties;
|
||||
lpss->cell->swnode = info->swnode;
|
||||
|
||||
intel_lpss_init_dev(lpss);
|
||||
|
||||
|
@ -15,14 +15,14 @@
|
||||
|
||||
struct device;
|
||||
struct resource;
|
||||
struct property_entry;
|
||||
struct software_node;
|
||||
|
||||
struct intel_lpss_platform_info {
|
||||
struct resource *mem;
|
||||
int irq;
|
||||
unsigned long clk_rate;
|
||||
const char *clk_con_id;
|
||||
const struct property_entry *properties;
|
||||
const struct software_node *swnode;
|
||||
};
|
||||
|
||||
int intel_lpss_probe(struct device *dev,
|
||||
|
Loading…
x
Reference in New Issue
Block a user