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
278 int state; /* Current state */278 int state; /* Current state */
279 struct acpi_device_power_flags flags;279 struct acpi_device_power_flags flags;
280 struct acpi_device_power_state states[ACPI_D_STATE_COUNT]; /* Power states (D0-D3Cold) */280 struct acpi_device_power_state states[ACPI_D_STATE_COUNT]; /* Power states (D0-D3Cold) */
281 u8 state_for_enumeration; /* Deepest power state for enumeration */
281};282};
282 283
283struct acpi_dep_data {284struct acpi_dep_data {
include/acpi/platform/acgcc.h+0−13
@@ -10,25 +10,12 @@ · 9 unmodified lines
10#ifndef __ACGCC_H__10#ifndef __ACGCC_H__
11#define __ACGCC_H__11#define __ACGCC_H__
12 12
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 */
17#ifndef va_arg13#ifndef va_arg
18#ifdef ACPI_USE_BUILTIN_STDARG
19typedef __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
25#ifdef __KERNEL__14#ifdef __KERNEL__
26#include <linux/stdarg.h>15#include <linux/stdarg.h>
27#else16#else
28/* Used to build acpi tools */
29#include <stdarg.h>17#include <stdarg.h>
30#endif /* __KERNEL__ */18#endif /* __KERNEL__ */
31#endif /* ACPI_USE_BUILTIN_STDARG */
32#endif /* ! va_arg */19#endif /* ! va_arg */
33 20
34#define ACPI_INLINE __inline__21#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
1014int acpi_subsys_runtime_resume(struct device *dev);1014int acpi_subsys_runtime_resume(struct device *dev);
1015int acpi_dev_pm_attach(struct device *dev, bool power_on);1015int acpi_dev_pm_attach(struct device *dev, bool power_on);
1016bool acpi_storage_d3(struct device *dev);1016bool acpi_storage_d3(struct device *dev);
1017bool acpi_dev_state_d0(struct device *dev);
1017#else1018#else
1018static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; }1019static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; }
1019static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; }1020static 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
1025{1026{
1026 return false;1027 return false;
1027}1028}
1029static inline bool acpi_dev_state_d0(struct device *dev)
1030{
1031 return true;
1032}
1028#endif1033#endif
1029 1034
1030#if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)1035#if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)
include/linux/i2c.h+18−0
@@ -11,6 +11,7 @@ · 10 unmodified lines
11#define _LINUX_I2C_H11#define _LINUX_I2C_H
12 12
13#include <linux/acpi.h> /* for acpi_handle */13#include <linux/acpi.h> /* for acpi_handle */
14#include <linux/bits.h>
14#include <linux/mod_devicetable.h>15#include <linux/mod_devicetable.h>
15#include <linux/device.h> /* for struct device */16#include <linux/device.h> /* for struct device */
16#include <linux/sched.h> /* for completion */17#include <linux/sched.h> /* for completion */
@@ -222,6 +223,15 @@ enum i2c_alert_protocol { · 205 unmodified lines
222 I2C_PROTOCOL_SMBUS_HOST_NOTIFY,223 I2C_PROTOCOL_SMBUS_HOST_NOTIFY,
223};224};
224 225
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 */
231enum i2c_driver_flags {
232 I2C_DRV_ACPI_WAIVE_D0_PROBE = BIT(0),
233};
234
225/**235/**
226 * struct i2c_driver - represent an I2C device driver236 * struct i2c_driver - represent an I2C device driver
227 * @class: What kind of i2c device we instantiate (for detect)237 * @class: What kind of i2c device we instantiate (for detect)
@@ -236,6 +246,7 @@ enum i2c_alert_protocol { · 8 unmodified lines
236 * @detect: Callback for device detection246 * @detect: Callback for device detection
237 * @address_list: The I2C addresses to probe (for detect)247 * @address_list: The I2C addresses to probe (for detect)
238 * @clients: List of detected clients we created (for i2c-core use only)248 * @clients: List of detected clients we created (for i2c-core use only)
249 * @flags: A bitmask of flags defined in &enum i2c_driver_flags
239 *250 *
240 * The driver.owner field should be set to the module owner of this driver.251 * The driver.owner field should be set to the module owner of this driver.
241 * The driver.name field should be set to the name of this driver.252 * The driver.name field should be set to the name of this driver.
@@ -294,6 +305,8 @@ struct i2c_driver { · 52 unmodified lines
294 int (*detect)(struct i2c_client *client, struct i2c_board_info *info);305 int (*detect)(struct i2c_client *client, struct i2c_board_info *info);
295 const unsigned short *address_list;306 const unsigned short *address_list;
296 struct list_head clients;307 struct list_head clients;
308
309 u32 flags;
297};310};
298#define to_i2c_driver(d) container_of(d, struct i2c_driver, driver)311#define to_i2c_driver(d) container_of(d, struct i2c_driver, driver)
299 312
@@ -1015,6 +1028,7 @@ u32 i2c_acpi_find_bus_speed(struct device *dev); · 715 unmodified lines
1015struct i2c_client *i2c_acpi_new_device(struct device *dev, int index,1028struct i2c_client *i2c_acpi_new_device(struct device *dev, int index,
1016 struct i2c_board_info *info);1029 struct i2c_board_info *info);
1017struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle);1030struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle);
1031bool i2c_acpi_waive_d0_probe(struct device *dev);
1018#else1032#else
1019static inline bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares,1033static inline bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares,
1020 struct acpi_resource_i2c_serialbus **i2c)1034 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
1038{1052{
1039 return NULL;1053 return NULL;
1040}1054}
1055static inline bool i2c_acpi_waive_d0_probe(struct device *dev)
1056{
1057 return false;
1058}
1041#endif /* CONFIG_ACPI */1059#endif /* CONFIG_ACPI */
1042 1060
1043#endif /* _LINUX_I2C_H */1061#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