History

Merge tag 'acpi-5.16-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more ACPI updates from Rafael Wysocki: "These add support for a new ACPI device configuration object called _DSC, fix some issues including one recent regression, add two new items to quirk lists and clean up assorted pieces of code. Specifics: - Add support for new ACPI device configuration object called _DSC ("Deepest State for Configuration") to allow certain devices to be probed without changing their power states, document it and make two drivers use it (Sakari Ailus, Rajmohan Mani). - Fix device wakeup power reference counting broken recently by mistake (Rafael Wysocki). - Drop unused symbol and macros depending on it from acgcc.h (Rafael Wysocki). - Add HP ZHAN 66 Pro to the "no EC wakeup" quirk list (Binbin Zhou). - Add Xiaomi Mi Pad 2 to the backlight quirk list and drop an unused piece of data from all of the list entries (Hans de Goede). - Fix register read accesses handling in the Intel PMIC operation region driver (Hans de Goede). - Clean up static variables initialization in the EC driver (wangzhitong)" * tag 'acpi-5.16-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Documentation: ACPI: Fix non-D0 probe _DSC object example ACPI: Drop ACPI_USE_BUILTIN_STDARG ifdef from acgcc.h ACPI: PM: Fix device wakeup power reference counting error ACPI: video: use platform backlight driver on Xiaomi Mi Pad 2 ACPI: video: Drop dmi_system_id.ident settings from video_detect_dmi_table[] ACPI: PMIC: Fix intel_pmic_regs_handler() read accesses ACPI: EC: Remove initialization of static variables to false ACPI: EC: Use ec_no_wakeup on HP ZHAN 66 Pro at24: Support probing while in non-zero ACPI D state media: i2c: imx319: Support device probe in non-zero ACPI D state ACPI: Add a convenience function to tell a device is in D0 state Documentation: ACPI: Document _DSC object usage for enum power state i2c: Allow an ACPI driver to manage the device's power state during probe ACPI: scan: Obtain device's desired enumeration power state

Linus Torvalds committed 5 years ago

Commit 285fc3d2 parents e68a7d3 314c6e216 files · +301 −129Browse files

Showing the changes to include (4 of 16 files). Show all

Unified · Split

4 files
  1. include/acpi/acpi_bus.h +1 −0
  2. include/acpi/platform/acgcc.h +0 −13
  3. include/linux/acpi.h +5 −0
  4. include/linux/i2c.h +18 −0
include/acpi/acpi_bus.h+1−0
@@ -278,6 +278,7 @@ struct acpi_device_power { · 277 unmodified lines
278278 int state; /* Current state */
279279 struct acpi_device_power_flags flags;
280280 struct acpi_device_power_state states[ACPI_D_STATE_COUNT]; /* Power states (D0-D3Cold) */
281+ u8 state_for_enumeration; /* Deepest power state for enumeration */
281282 };
282283
283284 struct acpi_dep_data {
include/acpi/platform/acgcc.h+0−13
@@ -10,25 +10,12 @@ · 9 unmodified lines
1010 #ifndef __ACGCC_H__
1111 #define __ACGCC_H__
1212
13−/*
14− * Use compiler specific <stdarg.h> is a good practice for even when
15− * -nostdinc is specified (i.e., ACPI_USE_STANDARD_HEADERS undefined.
16− */
1713 #ifndef va_arg
18−#ifdef ACPI_USE_BUILTIN_STDARG
19−typedef __builtin_va_list va_list;
20−#define va_start(v, l) __builtin_va_start(v, l)
21−#define va_end(v) __builtin_va_end(v)
22−#define va_arg(v, l) __builtin_va_arg(v, l)
23−#define va_copy(d, s) __builtin_va_copy(d, s)
24−#else
2514 #ifdef __KERNEL__
2615 #include <linux/stdarg.h>
2716 #else
28−/* Used to build acpi tools */
2917 #include <stdarg.h>
3018 #endif /* __KERNEL__ */
31−#endif /* ACPI_USE_BUILTIN_STDARG */
3219 #endif /* ! va_arg */
3320
3421 #define ACPI_INLINE __inline__
include/linux/acpi.h+5−0
@@ -1014,6 +1014,7 @@ int acpi_subsys_runtime_suspend(struct device *dev); · 1013 unmodified lines
10141014 int acpi_subsys_runtime_resume(struct device *dev);
10151015 int acpi_dev_pm_attach(struct device *dev, bool power_on);
10161016 bool acpi_storage_d3(struct device *dev);
1017+bool acpi_dev_state_d0(struct device *dev);
10171018 #else
10181019 static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; }
10191020 static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; }
@@ -1025,6 +1026,10 @@ static inline bool acpi_storage_d3(struct device *dev) · 5 unmodified lines
10251026 {
10261027 return false;
10271028 }
1029+static inline bool acpi_dev_state_d0(struct device *dev)
1030+{
1031+ return true;
1032+}
10281033 #endif
10291034
10301035 #if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)
include/linux/i2c.h+18−0
@@ -11,6 +11,7 @@ · 10 unmodified lines
1111 #define _LINUX_I2C_H
1212
1313 #include <linux/acpi.h> /* for acpi_handle */
14+#include <linux/bits.h>
1415 #include <linux/mod_devicetable.h>
1516 #include <linux/device.h> /* for struct device */
1617 #include <linux/sched.h> /* for completion */
@@ -222,6 +223,15 @@ enum i2c_alert_protocol { · 205 unmodified lines
222223 I2C_PROTOCOL_SMBUS_HOST_NOTIFY,
223224 };
224225
226+/**
227+ * enum i2c_driver_flags - Flags for an I2C device driver
228+ *
229+ * @I2C_DRV_ACPI_WAIVE_D0_PROBE: Don't put the device in D0 state for probe
230+ */
231+enum i2c_driver_flags {
232+ I2C_DRV_ACPI_WAIVE_D0_PROBE = BIT(0),
233+};
234+
225235 /**
226236 * struct i2c_driver - represent an I2C device driver
227237 * @class: What kind of i2c device we instantiate (for detect)
@@ -236,6 +246,7 @@ enum i2c_alert_protocol { · 8 unmodified lines
236246 * @detect: Callback for device detection
237247 * @address_list: The I2C addresses to probe (for detect)
238248 * @clients: List of detected clients we created (for i2c-core use only)
249+ * @flags: A bitmask of flags defined in &enum i2c_driver_flags
239250 *
240251 * The driver.owner field should be set to the module owner of this driver.
241252 * The driver.name field should be set to the name of this driver.
@@ -294,6 +305,8 @@ struct i2c_driver { · 52 unmodified lines
294305 int (*detect)(struct i2c_client *client, struct i2c_board_info *info);
295306 const unsigned short *address_list;
296307 struct list_head clients;
308+
309+ u32 flags;
297310 };
298311 #define to_i2c_driver(d) container_of(d, struct i2c_driver, driver)
299312
@@ -1015,6 +1028,7 @@ u32 i2c_acpi_find_bus_speed(struct device *dev); · 715 unmodified lines
10151028 struct i2c_client *i2c_acpi_new_device(struct device *dev, int index,
10161029 struct i2c_board_info *info);
10171030 struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle);
1031+bool i2c_acpi_waive_d0_probe(struct device *dev);
10181032 #else
10191033 static inline bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares,
10201034 struct acpi_resource_i2c_serialbus **i2c)
@@ -1038,6 +1052,10 @@ static inline struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle ha · 17 unmodified lines
10381052 {
10391053 return NULL;
10401054 }
1055+static inline bool i2c_acpi_waive_d0_probe(struct device *dev)
1056+{
1057+ return false;
1058+}
10411059 #endif /* CONFIG_ACPI */
10421060
10431061 #endif /* _LINUX_I2C_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t