Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a2851b9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPI / PM: Move ACPI video resume to a PM notifier
  ACPI: Reduce ACPI resource conflict message to KERN_WARNING, printk cleanup
  ACPI: battery drivers should call power_supply_changed()
  ACPI: battery: Fix CONFIG_ACPI_SYSFS_POWER=n
  PNPACPI: truncate _CRS windows with _LEN > _MAX - _MIN + 1
  ACPI: Don't send KEY_UNKNOWN for random video notifications
  ACPI: NUMA: map pxms to low node ids
  ACPI: use _HID when supplied by root-level devices
  ACPI / ACPICA: Do not check reference counters in acpi_ev_enable_gpe()
  ACPI: fixes a false alarm from lockdep
  ACPI dock: support multiple ACPI dock devices
  ACPI: EC: Allow multibyte access to EC
parents f5284e76 c25f7cf2
Loading
Loading
Loading
Loading
+7 −12
Original line number Diff line number Diff line
@@ -117,19 +117,14 @@ acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info)
	if (ACPI_FAILURE(status))
		return_ACPI_STATUS(status);

	/* Mark wake-enabled or HW enable, or both */

	if (gpe_event_info->runtime_count) {
	/* Clear the GPE (of stale events), then enable it */
	status = acpi_hw_clear_gpe(gpe_event_info);
	if (ACPI_FAILURE(status))
		return_ACPI_STATUS(status);

		/* Enable the requested runtime GPE */
	/* Enable the requested GPE */
	status = acpi_hw_write_gpe_enable_reg(gpe_event_info);
	}

	return_ACPI_STATUS(AE_OK);
	return_ACPI_STATUS(status);
}

/*******************************************************************************
+12 −0
Original line number Diff line number Diff line
@@ -468,6 +468,18 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)

		acpi_ut_add_reference(obj_desc->field.region_obj);

		/* allow full data read from EC address space */
		if (obj_desc->field.region_obj->region.space_id ==
			ACPI_ADR_SPACE_EC) {
			if (obj_desc->common_field.bit_length > 8)
				obj_desc->common_field.access_bit_width =
				ACPI_ROUND_UP(obj_desc->common_field.
							bit_length, 8);
				obj_desc->common_field.access_byte_width =
				ACPI_DIV_8(obj_desc->common_field.
							access_bit_width);
		}

		ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
				  "RegionField: BitOff %X, Off %X, Gran %X, Region %p\n",
				  obj_desc->field.start_field_bit_offset,
+3 −3
Original line number Diff line number Diff line
@@ -568,13 +568,13 @@ static int acpi_battery_update(struct acpi_battery *battery)
	result = acpi_battery_get_status(battery);
	if (result)
		return result;
#ifdef CONFIG_ACPI_SYSFS_POWER
	if (!acpi_battery_present(battery)) {
#ifdef CONFIG_ACPI_SYSFS_POWER
		sysfs_remove_battery(battery);
#endif
		battery->update_time = 0;
		return 0;
	}
#endif
	if (!battery->update_time ||
	    old_present != acpi_battery_present(battery)) {
		result = acpi_battery_get_info(battery);
@@ -880,7 +880,7 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event)
#ifdef CONFIG_ACPI_SYSFS_POWER
	/* acpi_battery_update could remove power_supply object */
	if (battery->bat.dev)
		kobject_uevent(&battery->bat.dev->kobj, KOBJ_CHANGE);
		power_supply_changed(&battery->bat);
#endif
}

+2 −5
Original line number Diff line number Diff line
@@ -1026,13 +1026,10 @@ static int dock_remove(struct dock_station *ds)
static acpi_status
find_dock(acpi_handle handle, u32 lvl, void *context, void **rv)
{
	acpi_status status = AE_OK;

	if (is_dock(handle))
		if (dock_add(handle) >= 0)
			status = AE_CTRL_TERMINATE;
		dock_add(handle);

	return status;
	return AE_OK;
}

static acpi_status
+9 −26
Original line number Diff line number Diff line
@@ -629,12 +629,12 @@ static u32 acpi_ec_gpe_handler(void *data)

static acpi_status
acpi_ec_space_handler(u32 function, acpi_physical_address address,
		      u32 bits, u64 *value,
		      u32 bits, u64 *value64,
		      void *handler_context, void *region_context)
{
	struct acpi_ec *ec = handler_context;
	int result = 0, i;
	u8 temp = 0;
	int result = 0, i, bytes = bits / 8;
	u8 *value = (u8 *)value64;

	if ((address > 0xFF) || !value || !handler_context)
		return AE_BAD_PARAMETER;
@@ -642,32 +642,15 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
	if (function != ACPI_READ && function != ACPI_WRITE)
		return AE_BAD_PARAMETER;

	if (bits != 8 && acpi_strict)
		return AE_BAD_PARAMETER;

	if (EC_FLAGS_MSI)
	if (EC_FLAGS_MSI || bits > 8)
		acpi_ec_burst_enable(ec);

	if (function == ACPI_READ) {
		result = acpi_ec_read(ec, address, &temp);
		*value = temp;
	} else {
		temp = 0xff & (*value);
		result = acpi_ec_write(ec, address, temp);
	}

	for (i = 8; unlikely(bits - i > 0); i += 8) {
		++address;
		if (function == ACPI_READ) {
			result = acpi_ec_read(ec, address, &temp);
			(*value) |= ((u64)temp) << i;
		} else {
			temp = 0xff & ((*value) >> i);
			result = acpi_ec_write(ec, address, temp);
		}
	}
	for (i = 0; i < bytes; ++i, ++address, ++value)
		result = (function == ACPI_READ) ?
			acpi_ec_read(ec, address, value) :
			acpi_ec_write(ec, address, *value);

	if (EC_FLAGS_MSI)
	if (EC_FLAGS_MSI || bits > 8)
		acpi_ec_burst_disable(ec);

	switch (result) {
Loading