diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-11 11:26:57 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-11 11:26:57 -0800 |
commit | 347708875a2fac81dd99ec826248ec29ac28f441 (patch) | |
tree | b37be7d7154f7555d78fc0b1ee1f3c0e0a1288bd /drivers/platform/x86/hp_accel.c | |
parent | Merge tag 'hsi-for-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi (diff) | |
parent | power: supply: Provide stubs for charge_behaviour helpers (diff) | |
download | linux-dev-347708875a2fac81dd99ec826248ec29ac28f441.tar.xz linux-dev-347708875a2fac81dd99ec826248ec29ac28f441.zip |
Merge tag 'platform-drivers-x86-v5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver updates from Hans de Goede:
"Highlights:
New drivers:
- asus-tf103c-dock
- intel_crystal_cove_charger
- lenovo-yogabook-wmi
- simatic-ipc platform-code + led driver + watchdog driver
- x86-android-tablets (kernel module to workaround DSDT bugs on
these)
amd-pmc:
- bug-fixes
- smar trace buffer support
asus-wmi:
- support for custom fan curves
int3472 (camera info ACPI object for Intel IPU3/SkyCam cameras):
- ACPI core + int3472 changes to delay enumeration of camera sensor
I2C clients until the PMIC for the sensor has been fully probed
- Add support for board data (DSDT info is incomplete) for setting up
the tps68470 PMIC used on some boards with these cameras
- Add board data for the Microsoft Surface Go (original, v2 and v3)
thinkpad_acpi:
- various cleanups
- support for forced battery discharging (for battery calibration)
- support to inhibit battery charging
- this includes power_supply core changes to add new APIs for this
think_lmi:
- enhanced BIOS password support
various other small fixes and hardware-id additions"
* tag 'platform-drivers-x86-v5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (78 commits)
power: supply: Provide stubs for charge_behaviour helpers
platform/x86: x86-android-tablets: Fix GPIO lookup leak on error-exit
platform/x86: int3472: Add board data for Surface Go 3
platform/x86: Add Asus TF103C dock driver
platform/x86: x86-android-tablets: Add TM800A550L data
platform/x86: x86-android-tablets: Add Asus MeMO Pad 7 ME176C data
platform/x86: x86-android-tablets: Add Asus TF103C data
platform/x86: x86-android-tablets: Add support for preloading modules
platform/x86: x86-android-tablets: Add support for registering GPIO lookup tables
platform/x86: x86-android-tablets: Add support for instantiating serdevs
platform/x86: x86-android-tablets: Add support for instantiating platform-devs
platform/x86: x86-android-tablets: Add support for PMIC interrupts
platform/x86: x86-android-tablets: Don't return -EPROBE_DEFER from a non probe() function
platform/x86: touchscreen_dmi: Remove the Glavey TM800A550L entry
platform/x86: touchscreen_dmi: Enable pen support on the Chuwi Hi10 Plus and Pro
platform/x86: touchscreen_dmi: Correct min/max values for Chuwi Hi10 Pro (CWI529) tablet
platform/x86: Add intel_crystal_cove_charger driver
power: supply: fix charge_behaviour attribute initialization
platform/x86: intel-uncore-frequency: use default_groups in kobj_type
x86/platform/uv: use default_groups in kobj_type
...
Diffstat (limited to 'drivers/platform/x86/hp_accel.c')
-rw-r--r-- | drivers/platform/x86/hp_accel.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/drivers/platform/x86/hp_accel.c b/drivers/platform/x86/hp_accel.c index 435a91fe2568..e9f852f7c27f 100644 --- a/drivers/platform/x86/hp_accel.c +++ b/drivers/platform/x86/hp_accel.c @@ -355,39 +355,20 @@ static int lis3lv02d_remove(struct platform_device *device) return 0; } -#ifdef CONFIG_PM_SLEEP -static int lis3lv02d_suspend(struct device *dev) +static int __maybe_unused lis3lv02d_suspend(struct device *dev) { /* make sure the device is off when we suspend */ lis3lv02d_poweroff(&lis3_dev); return 0; } -static int lis3lv02d_resume(struct device *dev) +static int __maybe_unused lis3lv02d_resume(struct device *dev) { lis3lv02d_poweron(&lis3_dev); return 0; } -static int lis3lv02d_restore(struct device *dev) -{ - lis3lv02d_poweron(&lis3_dev); - return 0; -} - -static const struct dev_pm_ops hp_accel_pm = { - .suspend = lis3lv02d_suspend, - .resume = lis3lv02d_resume, - .freeze = lis3lv02d_suspend, - .thaw = lis3lv02d_resume, - .poweroff = lis3lv02d_suspend, - .restore = lis3lv02d_restore, -}; - -#define HP_ACCEL_PM (&hp_accel_pm) -#else -#define HP_ACCEL_PM NULL -#endif +static SIMPLE_DEV_PM_OPS(hp_accel_pm, lis3lv02d_suspend, lis3lv02d_resume); /* For the HP MDPS aka 3D Driveguard */ static struct platform_driver lis3lv02d_driver = { @@ -395,7 +376,7 @@ static struct platform_driver lis3lv02d_driver = { .remove = lis3lv02d_remove, .driver = { .name = "hp_accel", - .pm = HP_ACCEL_PM, + .pm = &hp_accel_pm, .acpi_match_table = lis3lv02d_device_ids, }, }; |