More ACPI updates for 5.16-rc1
- Add support for new ACPI device configuration object called _DSC
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).
-----BEGIN PGP SIGNATURE-----
iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmGL01cSHHJqd0Byand5
c29ja2kubmV0AAoJEILEb/54YlRxF0YQAKXlCWrebWXwkDDqnSXZOqk7/aL+QZ9x
Di1snFSqrpzgnSgZTuEjpUWLCFZ6hdpEyIH9X12PYo3o9SI3TkfGWpoA4XWEU6v7
CRpFWIXGHznFWFx3IHoyuUgfDMT2bLxdSrYQrC1lw0icvZHOyk72zNH7oVp0tsXq
QwfxQDozJKypgSnNxbL+KsabG/DhK8Vyf4HjE6K1pTZ9fpsf0q9CnRGWWgdiaqdE
B5iFxVIA46J1+izE2C9aN+bEJ43HThgVrvv9V+WOMLJKLJoHwEikZaDRBzvR1ofZ
dm2f7J5/TDhJQSrlRYftMtNkYrw4Fcey+1xeGE1lTrmw0GM+/pvOs8THfj+TaUp9
0dmJCsHTndEby6PpQqCqTdfTRYsCIbhp8xRK3Q9qZcrYVNXcOrrifzmqY9bUDh2G
IXHzPao6sfv4E9yWypuZ7VO4UR5alzxTQfnB5K+cCju2vMqz6Zkk1tr32xJLlsw/
vd6w3q3Bataa1xGZEBbgSYvgSkKEJwFOeU9R+Rvcn1QWgXQuoPufOssz28KSH3oQ
0mj/nHMJdRdlSDqADzyRUgoaxv7KUmRYRxbTUMiM+aWnDCu/OD7jWNq24sTNi9xC
c7WMWHYC+0t5YxsyHo1MRfz8Q12zE1qWJFjBqMO23IZuBO3M1p3YSjl+z6NkUMj6
95M4WeJK2cBb
=k8+T
-----END PGP SIGNATURE-----
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
This commit is contained in:
commit
285fc3db0a
16 changed files with 302 additions and 130 deletions
|
|
@ -1014,6 +1014,7 @@ int acpi_subsys_runtime_suspend(struct device *dev);
|
|||
int acpi_subsys_runtime_resume(struct device *dev);
|
||||
int acpi_dev_pm_attach(struct device *dev, bool power_on);
|
||||
bool acpi_storage_d3(struct device *dev);
|
||||
bool acpi_dev_state_d0(struct device *dev);
|
||||
#else
|
||||
static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; }
|
||||
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)
|
|||
{
|
||||
return false;
|
||||
}
|
||||
static inline bool acpi_dev_state_d0(struct device *dev)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#define _LINUX_I2C_H
|
||||
|
||||
#include <linux/acpi.h> /* for acpi_handle */
|
||||
#include <linux/bits.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/device.h> /* for struct device */
|
||||
#include <linux/sched.h> /* for completion */
|
||||
|
|
@ -222,6 +223,15 @@ enum i2c_alert_protocol {
|
|||
I2C_PROTOCOL_SMBUS_HOST_NOTIFY,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum i2c_driver_flags - Flags for an I2C device driver
|
||||
*
|
||||
* @I2C_DRV_ACPI_WAIVE_D0_PROBE: Don't put the device in D0 state for probe
|
||||
*/
|
||||
enum i2c_driver_flags {
|
||||
I2C_DRV_ACPI_WAIVE_D0_PROBE = BIT(0),
|
||||
};
|
||||
|
||||
/**
|
||||
* struct i2c_driver - represent an I2C device driver
|
||||
* @class: What kind of i2c device we instantiate (for detect)
|
||||
|
|
@ -236,6 +246,7 @@ enum i2c_alert_protocol {
|
|||
* @detect: Callback for device detection
|
||||
* @address_list: The I2C addresses to probe (for detect)
|
||||
* @clients: List of detected clients we created (for i2c-core use only)
|
||||
* @flags: A bitmask of flags defined in &enum i2c_driver_flags
|
||||
*
|
||||
* The driver.owner field should be set to the module owner of this driver.
|
||||
* The driver.name field should be set to the name of this driver.
|
||||
|
|
@ -294,6 +305,8 @@ struct i2c_driver {
|
|||
int (*detect)(struct i2c_client *client, struct i2c_board_info *info);
|
||||
const unsigned short *address_list;
|
||||
struct list_head clients;
|
||||
|
||||
u32 flags;
|
||||
};
|
||||
#define to_i2c_driver(d) container_of(d, struct i2c_driver, driver)
|
||||
|
||||
|
|
@ -1015,6 +1028,7 @@ u32 i2c_acpi_find_bus_speed(struct device *dev);
|
|||
struct i2c_client *i2c_acpi_new_device(struct device *dev, int index,
|
||||
struct i2c_board_info *info);
|
||||
struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle);
|
||||
bool i2c_acpi_waive_d0_probe(struct device *dev);
|
||||
#else
|
||||
static inline bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares,
|
||||
struct acpi_resource_i2c_serialbus **i2c)
|
||||
|
|
@ -1038,6 +1052,10 @@ static inline struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle ha
|
|||
{
|
||||
return NULL;
|
||||
}
|
||||
static inline bool i2c_acpi_waive_d0_probe(struct device *dev)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif /* CONFIG_ACPI */
|
||||
|
||||
#endif /* _LINUX_I2C_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue