Skip to content

Commit

Permalink
Merge branches 'acpi-video', 'acpi-battery', 'acpi-spcr' and 'acpi-misc'
Browse files Browse the repository at this point in the history
* acpi-video:
  ACPI / video: Add force_none quirk for Dell OptiPlex 9020M

* acpi-battery:
  ACPI: make device_attribute const

* acpi-spcr:
  ACPI: SPCR: work around clock issue on xgene UART
  ACPI: SPCR: extend XGENE 8250 workaround to m400

* acpi-misc:
  ACPI / dock: constify attribute_group structure
  MAINTAINERS: Add Tony and Boris as ACPI/APEI reviewers
  ACPI / lpat: Fix typos in comments and kerneldoc style
  MAINTAINERS: device property: ACPI: add fwnode.h
  • Loading branch information
Rafael J. Wysocki committed Sep 3, 2017
5 parents 01d2f10 + 1f59ab2 + 82d2b61 + 03c3876 + 19dc713 commit 940c8df
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 12 deletions.
9 changes: 9 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ S: Supported
F: drivers/acpi/
F: drivers/pnp/pnpacpi/
F: include/linux/acpi.h
F: include/linux/fwnode.h
F: include/acpi/
F: Documentation/acpi/
F: Documentation/ABI/testing/sysfs-bus-acpi
Expand All @@ -310,6 +311,14 @@ F: drivers/pci/*/*acpi*
F: drivers/pci/*/*/*acpi*
F: tools/power/acpi/

ACPI APEI
M: "Rafael J. Wysocki" <rjw@rjwysocki.net>
M: Len Brown <lenb@kernel.org>
L: linux-acpi@vger.kernel.org
R: Tony Luck <tony.luck@intel.com>
R: Borislav Petkov <bp@alien8.de>
F: drivers/acpi/apei/

ACPI COMPONENT ARCHITECTURE (ACPICA)
M: Robert Moore <robert.moore@intel.com>
M: Lv Zheng <lv.zheng@intel.com>
Expand Down
6 changes: 3 additions & 3 deletions drivers/acpi/acpi_lpat.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @raw: the raw value, used as a key to get the temerature from the
* above mapping table
*
* A positive converted temperarure value will be returned on success,
* A positive converted temperature value will be returned on success,
* a negative errno will be returned in error cases.
*/
int acpi_lpat_raw_to_temp(struct acpi_lpat_conversion_table *lpat_table,
Expand Down Expand Up @@ -55,11 +55,11 @@ EXPORT_SYMBOL_GPL(acpi_lpat_raw_to_temp);
* acpi_lpat_temp_to_raw(): Return raw value from temperature through
* LPAT conversion table
*
* @lpat: the temperature_raw mapping table
* @lpat_table: the temperature_raw mapping table
* @temp: the temperature, used as a key to get the raw value from the
* above mapping table
*
* A positive converted temperature value will be returned on success,
* The raw value will be returned on success,
* a negative errno will be returned in error cases.
*/
int acpi_lpat_temp_to_raw(struct acpi_lpat_conversion_table *lpat_table,
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ static ssize_t acpi_battery_alarm_store(struct device *dev,
return count;
}

static struct device_attribute alarm_attr = {
static const struct device_attribute alarm_attr = {
.attr = {.name = "alarm", .mode = 0644},
.show = acpi_battery_alarm_show,
.store = acpi_battery_alarm_store,
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/dock.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ static struct attribute *dock_attributes[] = {
NULL
};

static struct attribute_group dock_attribute_group = {
static const struct attribute_group dock_attribute_group = {
.attrs = dock_attributes
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/sbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ static ssize_t acpi_battery_alarm_store(struct device *dev,
return count;
}

static struct device_attribute alarm_attr = {
static const struct device_attribute alarm_attr = {
.attr = {.name = "alarm", .mode = 0644},
.show = acpi_battery_alarm_show,
.store = acpi_battery_alarm_store,
Expand Down
27 changes: 21 additions & 6 deletions drivers/acpi/spcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,24 @@ static bool qdf2400_erratum_44_present(struct acpi_table_header *h)
*/
static bool xgene_8250_erratum_present(struct acpi_table_spcr *tb)
{
bool xgene_8250 = false;

if (tb->interface_type != ACPI_DBG2_16550_COMPATIBLE)
return false;

if (memcmp(tb->header.oem_id, "APMC0D", ACPI_OEM_ID_SIZE))
if (memcmp(tb->header.oem_id, "APMC0D", ACPI_OEM_ID_SIZE) &&
memcmp(tb->header.oem_id, "HPE ", ACPI_OEM_ID_SIZE))
return false;

if (!memcmp(tb->header.oem_table_id, "XGENESPC",
ACPI_OEM_TABLE_ID_SIZE) && tb->header.oem_revision == 0)
return true;
xgene_8250 = true;

return false;
if (!memcmp(tb->header.oem_table_id, "ProLiant",
ACPI_OEM_TABLE_ID_SIZE) && tb->header.oem_revision == 1)
xgene_8250 = true;

return xgene_8250;
}

/**
Expand Down Expand Up @@ -182,11 +189,19 @@ int __init parse_spcr(bool earlycon)
uart = "qdf2400_e44";
}

if (xgene_8250_erratum_present(table))
if (xgene_8250_erratum_present(table)) {
iotype = "mmio32";

snprintf(opts, sizeof(opts), "%s,%s,0x%llx,%d", uart, iotype,
table->serial_port.address, baud_rate);
/* for xgene v1 and v2 we don't know the clock rate of the
* UART so don't attempt to change to the baud rate state
* in the table because driver cannot calculate the dividers
*/
snprintf(opts, sizeof(opts), "%s,%s,0x%llx", uart, iotype,
table->serial_port.address);
} else {
snprintf(opts, sizeof(opts), "%s,%s,0x%llx,%d", uart, iotype,
table->serial_port.address, baud_rate);
}

pr_info("console: %s\n", opts);

Expand Down
14 changes: 14 additions & 0 deletions drivers/acpi/video_detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ static int video_detect_force_native(const struct dmi_system_id *d)
return 0;
}

static int video_detect_force_none(const struct dmi_system_id *d)
{
acpi_backlight_dmi = acpi_backlight_none;
return 0;
}

static const struct dmi_system_id video_detect_dmi_table[] = {
/* On Samsung X360, the BIOS will set a flag (VDRV) if generic
* ACPI backlight device is used. This flag will definitively break
Expand Down Expand Up @@ -313,6 +319,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Precision 7510"),
},
},
{
.callback = video_detect_force_none,
.ident = "Dell OptiPlex 9020M",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 9020M"),
},
},
{ },
};

Expand Down

0 comments on commit 940c8df

Please sign in to comment.