aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc
AgeCommit message (Collapse)AuthorFilesLines
2015-08-10misc: eeprom: Export I2C module alias information in missing driversJavier Martinez Canillas1-0/+1
The I2C core always reports the MODALIAS uevent as "i2c:<client name>" regardless if the driver later is match using the I2C id_table or the of_match_table. So the driver needs to export the I2C table and this be built into the module or udev won't have the necessary information to auto load the correct module when the device is added. Signed-off-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Jean Delvare <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2015-08-10misc: Drop owner assignment from i2c_driverKrzysztof Kozlowski9-9/+0
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2015-08-09Merge 4.2-rc6 into char-misc-nextGreg Kroah-Hartman1-3/+0
We want the fixes in Linus's tree in here as well. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-06cxl: Don't ignore add_process_element() result when attaching contextDaniel Axtens1-3/+1
Currently when attaching a context in dedicated mode, we ignore the result of add_process_element(), which could potentially fail. If add_process_element() returns an error, pass it back to the caller. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-08-05misc: eeprom: max6875: clean up max6875_read()Vladimir Zapolskiy1-6/+0
The change removes redundant sysfs binary file boundary check, since this task is already done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-05misc: eeprom: clean up eeprom_read()Vladimir Zapolskiy1-5/+0
The change removes redundant sysfs binary file boundary check, since this task is already done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy <[email protected]> Reviewed-by: Jean Delvare <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-05misc: eeprom: 93xx46: clean up eeprom_93xx46_bin_read/writeVladimir Zapolskiy1-14/+0
The change removes redundant sysfs binary file boundary checks, since this task is already done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-05misc: ds1682: clean up ds1682_eeprom_read() and ds1682_eeprom_write()Vladimir Zapolskiy1-12/+0
The change removes redundant sysfs binary file boundary checks, since this task is already done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-05misc: cxl: clean up afu_read_config()Vladimir Zapolskiy1-6/+1
The sanity checks for overflow are not needed, because this is done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy <[email protected]> Cc: Ian Munsie <[email protected]> Acked-by: Michael Neuling <[email protected]> Reviewed-by: Daniel Axtens <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-05nvmem: sunxi: Move the SID driver to the nvmem frameworkMaxime Ripard3-170/+0
Now that we have the nvmem framework, we can consolidate the common driver code. Move the driver to the framework, and hopefully, it will fix the sysfs file creation race. Signed-off-by: Maxime Ripard <[email protected]> [srinivas.kandagatla: Moved to regmap based EEPROM framework] Signed-off-by: Srinivas Kandagatla <[email protected]> Tested-by: Philipp Zabel <[email protected]> Tested-by: Rajendra Nayak <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-05ti-st: st_kim: use gpio_set_value_cansleep to fix warningJürg Billeter1-5/+5
GPIO accessor functions may sleep. Signed-off-by: Jürg Billeter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-05Revert "ti-st: add device tree support"Rob Herring2-102/+9
This reverts commit 46d0d33350e9b32642d745a8b46a954910196b4d. This binding is horrible and never should have been merged. It is not documented nor are there any in tree users, so reverting it will not break anything we care about. Lets revert it before we do have users. The problems with it are: - It is not documented. - The GPIO connection is described with a custom property and uses Linux GPIO numbering. - The UART connection is described using the Linux tty device name. Cc: Gigi Joseph <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-05VMware balloon: Add support for balloon capabilities.Xavier Deguillard1-30/+44
In order to extend the balloon protocol, the hypervisor and the guest driver need to agree on a set of supported functionality to use. Signed-off-by: Xavier Deguillard <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Philip P. Moltmann <[email protected]> Acked-by: Andy King <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-05VMware balloon: partially inline vmballoon_reserve_page.Xavier Deguillard1-56/+42
This split the function in two: the allocation part is inlined into the inflate function and the lock part is kept into his own function. This change is needed in order to be able to allocate more than one page before doing the hypervisor call. Signed-off-by: Xavier Deguillard <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Philip P. Moltmann <[email protected]> Acked-by: Andy King <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-05char: make misc_deregister a void functionGreg Kroah-Hartman1-6/+1
With well over 200+ users of this api, there are a mere 12 users that actually checked the return value of this function. And all of them really didn't do anything with that information as the system or module was shutting down no matter what. So stop pretending like it matters, and just return void from misc_deregister(). If something goes wrong in the call, you will get a WARNING splat in the syslog so you know how to fix up your driver. Other than that, there's nothing that can go wrong. Cc: Alasdair Kergon <[email protected]> Cc: Neil Brown <[email protected]> Cc: Oleg Drokin <[email protected]> Cc: Andreas Dilger <[email protected]> Cc: "Michael S. Tsirkin" <[email protected]> Cc: Wim Van Sebroeck <[email protected]> Cc: Christine Caulfield <[email protected]> Cc: David Teigland <[email protected]> Cc: Mark Fasheh <[email protected]> Acked-by: Joel Becker <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Acked-by: Mike Snitzer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-04mei: remove check on pm_runtime_active in __mei_cl_disconnectTomas Winkler1-3/+0
Remove bogus check on pm_runtime_active that prevented disconnection from a client in case the device was resuming from power gating but not yet active. Fix regression introduced by 18901357e70ae29e3fd1c58712a6847c2ae52eae mei: disconnect on connection request timeout Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: hbm: bump supported HBM version to 2.0Tomas Winkler1-2/+2
HBM 2.0 version for Sunrise point Skylake (PCH) based devices Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: me: add sunrise point device idsTomas Winkler2-0/+9
Add MEI devices ids for Intel Sunrisepoint Skylake (PCH) Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: me: d0i3: exit d0i3 on driver start and enter it on stopAlexander Usyskin1-9/+29
A BIOS may put the device in d0i3 on platform initialization so it won’t consume power even if the driver is not present, in turn the driver has to wake up the devices on load in order to perform the initialization sequence and move it back to low power state on driver remove. Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: me: d0i3: move mei_me_hw_reset down in the fileAlexander Usyskin1-51/+52
Move mei_me_hw_reset down in the source file to avoid forward declarations when introducing d0i3 flow in the next patch. Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: me: d0i3: add d0i3 enter/exit state machineAlexander Usyskin4-10/+346
Rework mei power gating state machine to support entry and exit to and from D0i3 power state. The choice between legacy and D0i3 routines is conditioned on d0i3_supported flag. The patch introduces warning: drivers/misc/mei/hw-me.c:901:12: warning: ‘mei_me_d0i3_enter’ defined but not used [-Wunused-function] it will go away in consequent patch Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: hbm: reorganize the power gating responsesAlexander Usyskin1-15/+70
Before adding support for D0i3 we need to reorganize the hbm pg handling Move HBM PG response code to dedicated functions in order to unclutter hbm command switch. Add check for the right system state before message processing and return -EPROTO in state mismatch case. Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: me: d0i3: enable d0i3 interruptsAlexander Usyskin4-35/+33
D0i3 adds additional interrupt reason bit, therefore we add a variable intr_source to save the interrupt causes for further dispatching. The interrupt cause is saved in the irq quick handler to achieve unified behavior for both MSI enabled and shared interrupt platforms. Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: me: d0i3: add flag to indicate D0i3 supportAlexander Usyskin3-3/+14
Detect d0i3 low power state during hw configuration, the value is set in HFS_1 pci config reigister. Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: me: d0i3: add the control registersTomas Winkler1-5/+15
Starting with Intel Sunrisepoint (Skylake PCH) the MEI device supports D0i3 low power state. Add D0i3 control registers. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: hbm: add new error code MEI_CL_CONN_NOT_ALLOWEDAlexander Usyskin2-0/+3
The device can return error 5 (NOT_ALLOWED) on connection attempt. This error can happen if: 1. An another connection attempt is in progress 2. There is an attempt to connect a fixed (connectionless) client 3. The number of available connections is exceeded (new in HBM 2.0) We should not hit that error unless there is an internal book keeping hiccup except option (3), therefore we translate the error code to errno EBUSY; Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: bus: add and call callback on notify eventAlexander Usyskin3-4/+49
Enable drivers on mei client bus to subscribe to asynchronous event notifications. Introduce events_mask to the existing callback infrastructure so it is possible to handle both RX and event notification. Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: implement fasync for event notificationTomas Winkler5-4/+53
A process can be informed about client notification also via SIGIO with POLL_PRI event. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: support polling for event notificationTomas Winkler1-0/+8
Polling on priority events is translated on waiting for event notification. One need to enable notification prior for calling select or poll system call otherwise process will not wait. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: add async event notification ioctlsTomas Winkler1-0/+67
Add ioctl IOCTL_MEI_NOTIFY_SET for enabling and disabling async event notification. Add ioctl IOCTL_MEI_NOTIFY_GET for receiving and acking an event notification. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: add a handler that waits for notification on eventTomas Winkler4-1/+58
mei_cl_notify_get is to be called by a host client to wait, receive, and ack the event notification. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: add mei_cl_notify_request commandTomas Winkler4-4/+157
Add per client notification request infrastructure that allows client to enable or disable async event notification. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: enable async event notifications only from hbm version 2.0Tomas Winkler4-0/+14
Only FW version 2.0 and newer support the async event notification. For backward compatibility block the feature if the FW version is older then 2.0 Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: implement async notification hbm messagesTomas Winkler3-0/+145
Implement sending and reception handlers for the async event notification hbm commands. Add client notification book keeping data required for the messages notify_en to indicate whether notification is enabled notify_ev to indicate whether an event is pending Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: define async notification hbm commandsTomas Winkler1-0/+62
FW has gained new capability where a FW client can asynchronously notify the host that an event has occurred in its process. The notification doesn't provide any data and host may need to query further the FW client in order to get details of the event. Host can subscribe or unsubscribe to the event notification via designated HBM commands, and also the notification is carried on a new HBM command. This patch adds definitions of asynchronous notification HBM commands. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: disconnect on connection request timeoutAlexander Usyskin6-29/+95
For the FW with HBM version >= 2.0 we don't need to reset the whole device in case of a particular client failing to connect, it is enough to send disconnect a request to bring the device to the stable state. Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: support for dynamic clientsTomas Winkler4-2/+144
HBM version 2.0 and above allows ME clients in the system to register/unregister after the system is fully initialized. Clients may be added or removed after enum_resp message was received 1. To preserve backward compatibility the driver can opt-in to receive client add messages by setting allow_add field in enum_req 2. A new client is added upon reception of MEI_HBM_ADD_CLIENT_REQ_CMD 3. A client is removed in a lazy manner when connection request respond with MEI_HBMS_CLIENT_NOT_FOUND status Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: bus: link client devices instead of host clientsTomas Winkler5-310/+213
MEI bus was designed around nfc and was hard to extend. Instead of the hard coded way of adding the devices on the mei bus we scan the whole me client list and create a device for each eligible me client (mei_cl_bus_rescan); currently we support only clients with single connection and fixed address clients. NFC radio name detection is run as a fixup routine The patch replaces handling the device list based on struct me_cl to device list based on me_cl_devices. The creating a connection is pushed from the device creation time to device enablement. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: bus: simplify how we build nfc bus nameTomas Winkler3-64/+55
Remove the dependency on struct ndev from the nfc device name creation function so it is possible to use it in a fixup routine Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: bus: blacklist clients by number of connectionsTomas Winkler1-0/+19
Currently we support only clients with single connection and fixed address clients so all other clients are blacklisted Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: bus: blacklist the nfc info clientTomas Winkler1-4/+19
Blacklist nfc info client which is only used for retrieval of the NFC radio version Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: bus: enable running fixup routines before device registrationTomas Winkler3-16/+107
Split the device registration into allocation and device struct initialization, device setup, and the final device registration. This why it is possible to run fixups and quirks during the setup stage on an initialized device. Each fixup routine effects do_match flag. If the flag is set to false at the end the device won't be registered on the bus. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: bus: add me client device list infrastructureTomas Winkler3-2/+6
Instead of holding the list of host clients (me_cl) we want to keep the list me client devices (mei_cl_device) This way we can create host to me client connection only when needed. Add list head to mei_cl_device and cl_bus_lock Add bus_added flag to the me client (mei_me_client) to track if the appropriate mei_cl_device was already created and is_added flag to mei_cl_device to track if it was already added to the device list across the bus rescans Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: bus: add reference to bus device in struct mei_cl_clientTomas Winkler1-0/+17
Add reference to the bus device (mei_device) for easier access. To ensures that referencing cldev->bus is valid during cldev life time we increase the bus ref counter on a client device creation and drop it on the device release. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: bus: revamp probe and remove functionsTomas Winkler1-11/+30
Instead of generating device id on the fly during probing we find the matching id entry on the device id table. Get bus the module reference counter so it cannot be unloaded after the driver has bounded to the client device Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: bus: revamp device matchingTomas Winkler1-19/+44
mei_cl_device_match now calls mei_cl_device_find that returns the matching device id in the device id table. We will utilize the mei_cl_device_find during probing to locate the matching entry. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: bus: report if event registration failedTomas Winkler1-1/+5
If event registeration has failed, the caller should know about it. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: bus: don't enable events implicitly in device enableTomas Winkler1-3/+0
Do not enable events implicitly in mei_cl_enable_device, it should be done explicitly using mei_cl_register_event_cb so the events are enabled only when needed. The NFC drivers has been already using it that way so no need for further changes just remove the code from mei_cl_enable_device. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: bus: rename uevent handler to mei_cl_device_ueventTomas Winkler1-2/+10
Rename mei_cl_uevent to mei_cl_device_uevent to match the naming convention of mei_cl_bus_type functions Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-03mei: bus: move driver api functions at the start of the fileTomas Winkler1-262/+351
To make the file more organize move mei client driver api to the start of the file and add Kdoc. There are no functional changes in this patch. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>