Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) ==================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) Sony Programmable I/O Control Device Driver Readme
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) ==================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) 	- Copyright (C) 2001-2004 Stelian Pop <stelian@popies.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) 	- Copyright (C) 2001-2002 Alcôve <www.alcove.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) 	- Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 	- Copyright (C) 2001 Junichi Morita <jun1m@mars.dti.ne.jp>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 	- Copyright (C) 2000 Takaya Kinjo <t-kinjo@tc4.so-net.ne.jp>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) 	- Copyright (C) 2000 Andrew Tridgell <tridge@samba.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) This driver enables access to the Sony Programmable I/O Control Device which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) can be found in many Sony Vaio laptops. Some newer Sony laptops (seems to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) limited to new FX series laptops, at least the FX501 and the FX702) lack a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) sonypi device and are not supported at all by this driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) It will give access (through a user space utility) to some events those laptops
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) generate, like:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 	- jogdial events (the small wheel on the side of Vaios)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 	- capture button events (only on Vaio Picturebook series)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 	- Fn keys
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 	- bluetooth button (only on C1VR model)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	- programmable keys, back, help, zoom, thumbphrase buttons, etc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	  (when available)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) Those events (see linux/sonypi.h) can be polled using the character device node
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) /dev/sonypi (major 10, minor auto allocated or specified as a option).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) A simple daemon which translates the jogdial movements into mouse wheel events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) can be downloaded at: <http://popies.net/sonypi/>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) Another option to intercept the events is to get them directly through the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) input layer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) This driver supports also some ioctl commands for setting the LCD screen
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) brightness and querying the batteries charge information (some more
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) commands may be added in the future).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) This driver can also be used to set the camera controls on Picturebook series
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) (brightness, contrast etc), and is used by the video4linux driver for the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) Motion Eye camera.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) Please note that this driver was created by reverse engineering the Windows
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) driver and the ACPI BIOS, because Sony doesn't agree to release any programming
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) specs for its laptops. If someone convinces them to do so, drop me a note.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) Driver options:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) ---------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) Several options can be passed to the sonypi driver using the standard
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) module argument syntax (<param>=<value> when passing the option to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) module or sonypi.<param>=<value> on the kernel boot line when sonypi is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) statically linked into the kernel). Those options are:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	=============== =======================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	minor:		minor number of the misc device /dev/sonypi,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 			default is -1 (automatic allocation, see /proc/misc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 			or kernel logs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	camera:		if you have a PictureBook series Vaio (with the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 			integrated MotionEye camera), set this parameter to 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 			in order to let the driver access to the camera
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	fnkeyinit:	on some Vaios (C1VE, C1VR etc), the Fn key events don't
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 			get enabled unless you set this parameter to 1.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 			Do not use this option unless it's actually necessary,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 			some Vaio models don't deal well with this option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 			This option is available only if the kernel is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 			compiled without ACPI support (since it conflicts
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 			with it and it shouldn't be required anyway if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 			ACPI is already enabled).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	verbose:	set to 1 to print unknown events received from the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 			sonypi device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 			set to 2 to print all events received from the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 			sonypi device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	compat:		uses some compatibility code for enabling the sonypi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 			events. If the driver worked for you in the past
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 			(prior to version 1.5) and does not work anymore,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 			add this option and report to the author.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	mask:		event mask telling the driver what events will be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 			reported to the user. This parameter is required for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 			some Vaio models where the hardware reuses values
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 			used in other Vaio models (like the FX series who does
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 			not have a jogdial but reuses the jogdial events for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 			programmable keys events). The default event mask is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 			set to 0xffffffff, meaning that all possible events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 			will be tried. You can use the following bits to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 			construct your own event mask (from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 			drivers/char/sonypi.h)::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 				SONYPI_JOGGER_MASK		0x0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 				SONYPI_CAPTURE_MASK		0x0002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 				SONYPI_FNKEY_MASK		0x0004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 				SONYPI_BLUETOOTH_MASK		0x0008
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 				SONYPI_PKEY_MASK		0x0010
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 				SONYPI_BACK_MASK		0x0020
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 				SONYPI_HELP_MASK		0x0040
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 				SONYPI_LID_MASK			0x0080
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 				SONYPI_ZOOM_MASK		0x0100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 				SONYPI_THUMBPHRASE_MASK		0x0200
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 				SONYPI_MEYE_MASK		0x0400
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 				SONYPI_MEMORYSTICK_MASK		0x0800
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 				SONYPI_BATTERY_MASK		0x1000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 				SONYPI_WIRELESS_MASK		0x2000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	useinput:	if set (which is the default) two input devices are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 			created, one which interprets the jogdial events as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 			mouse events, the other one which acts like a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 			keyboard reporting the pressing of the special keys.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 	=============== =======================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) Module use:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) -----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) In order to automatically load the sonypi module on use, you can put those
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) lines a configuration file in /etc/modprobe.d/::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	alias char-major-10-250 sonypi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	options sonypi minor=250
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) This supposes the use of minor 250 for the sonypi device::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	# mknod /dev/sonypi c 10 250
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) Bugs:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) -----
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	- several users reported that this driver disables the BIOS-managed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	  Fn-keys which put the laptop in sleeping state, or switch the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	  external monitor on/off. There is no workaround yet, since this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 	  driver disables all APM management for those keys, by enabling the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	  ACPI management (and the ACPI core stuff is not complete yet). If
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	  you have one of those laptops with working Fn keys and want to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	  continue to use them, don't use this driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	- some users reported that the laptop speed is lower (dhrystone
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	  tested) when using the driver with the fnkeyinit parameter. I cannot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	  reproduce it on my laptop and not all users have this problem.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	  This happens because the fnkeyinit parameter enables the ACPI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	  mode (but without additional ACPI control, like processor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	  speed handling etc). Use ACPI instead of APM if it works on your
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	  laptop.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	- sonypi lacks the ability to distinguish between certain key
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	  events on some models.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 	- some models with the nvidia card (geforce go 6200 tc) uses a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	  different way to adjust the backlighting of the screen. There
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 	  is a userspace utility to adjust the brightness on those models,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	  which can be downloaded from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	  https://www.acc.umu.se/~erikw/program/smartdimmer-0.1.tar.bz2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 	- since all development was done by reverse engineering, there is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	  *absolutely no guarantee* that this driver will not crash your
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	  laptop. Permanently.