Skip to content

Sonypi driver model & PM changes

Dmitry Torokhov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 19 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Sonypi: whitespace fixesdrivers/char/sonypi.c drivers/char/sonypi.h include/linux/sonypi.h+106 -750 replies
2/5Sonypi: switch to module_paramDocumentation/kernel-parameters.txt drivers/char/sonypi.c drivers/char/sonypi.h+81 -910 replies
3/5Sonypi: switch from sysdev to platform device, drop old-style PM codedrivers/char/sonypi.c drivers/char/sonypi.h+82 -1210 replies
4/5Sonypi: use wait_event_interruptible and other assorted changesdrivers/char/sonypi.c drivers/char/sonypi.h+70 -790 replies
5/5Sonypi: use pci_get_devicedrivers/char/sonypi.c+9 -62 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] Sonypi driver model & PM changes

Hi,

I have been looking at the sysdevs in present in the kernel and noticed that sonypi was registering itself as a system device. Surely it is possible to suspend it with interrupyts enabled, so it better be converted to a platform device. I course of convert I also did some additional changes:

01-sonypi-whitespace-fixes.patch
- get rid of extra whitespace and convert to the kernel cosing style:
... However, there is one special case, namely functions: they have the opening brace at the beginning of the next line...

02-sonypi-module_param.patch
- convert sonypi from using MODULE_PARM and __setup to module_param. The parameters are:
sonypi.camera
sonypi.compat
sonypi.fnkeyinit
sonypi.mask= - exported through sysfs, writeable
sonypi.minor=
sonypi.useinput
sonypi.verbose - exported through sysfs, writeable

03-sonypi-pm-changes.patch
- convert sonypi sysdev to platform device, drop old-style PM code since APM does call device_suspend anyway so the new style handlers will be called.

04-sonypi-misc-changes.patch
- switch sonypi_misc_read to use wake_event_interruptible instead of a homemade copy, fix small race there, make sure that the device is fully initialized before turning the interrupts on.

05-sonypi-pci_get_device.patch
- convert from pci_find_device which is obsolete to pci_get_device.

Warning: I do not have the hardware som while the code is compiles and I am pretty sure it is correct it has not been tested.

Should apply to 2.6.9

Signature · 1 line
Dmitry