aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-11-16platform/x86: dell-wmi-descriptor: check if memory was allocatedMario Limonciello1-0/+5
devm_kzalloc will return NULL pointer if no memory was allocated. This should be checked. This problem also existed when the driver was dell-wmi.c. Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Pali Rohár <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-13platform/x86: Revert intel_pmc_ipc: Use MFD framework to create dependent ↵Andy Shevchenko1-139/+259
devices Heikki discovered a runtime issue with this patch. Taking into consideration we have no time to test any fix right now, revert the commit 43aaf4f03f063b12bcba2f8b800fdec85e2acc75. Reported-by: Heikki Krogerus <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-11-08platform/x86: dell-smbios-wmi: release mutex lock on WMI call failureMario Limonciello1-2/+5
Unbound devices may race with calling this function causing the mutex to stay locked. This failure mode should have released the mutex too. Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-08platform/x86: wmi: release mutex on module acquistion failureMario Limonciello1-2/+4
This failure mode should have also released the mutex. Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-08platform/x86: dell-smbios: fix string overflowArnd Bergmann1-8/+4
The new sysfs code overwrites two fixed-length character arrays that are each one byte shorter than they need to be, to hold the trailing \0: drivers/platform/x86/dell-smbios.c: In function 'build_tokens_sysfs': drivers/platform/x86/dell-smbios.c:494:42: error: 'sprintf' writing a terminating nul past the end of the destination [-Werror=format-overflow=] sprintf(buffer_location, "%04x_location", drivers/platform/x86/dell-smbios.c:494:3: note: 'sprintf' output 14 bytes into a destination of size 13 drivers/platform/x86/dell-smbios.c:506:36: error: 'sprintf' writing a terminating nul past the end of the destination [-Werror=format-overflow=] sprintf(buffer_value, "%04x_value", drivers/platform/x86/dell-smbios.c:506:3: note: 'sprintf' output 11 bytes into a destination of size 10 This changes it to just use kasprintf(), which always gets it right. Discovered with gcc-7.1.1 with the following commit reverted: bd664f6b3e disable new gcc-7.1.1 warnings for now Fixes: 33b9ca1e53b4 ("platform/x86: dell-smbios: Add a sysfs interface for SMBIOS tokens") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Mario Limonciello <[email protected]> [dvhart: add subject prefix and reproducer details for context] Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-05platform/x86: intel_pmc_ipc: Use MFD framework to create dependent devicesKuppuswamy Sathyanarayanan1-259/+139
Currently, we have lot of repetitive code in dependent device resource allocation and device creation handling code. This logic can be improved if we use MFD framework for dependent device creation. This patch adds this support. Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-11-05platform/x86: intel_punit_ipc: Fix resource ioremap warningKuppuswamy Sathyanarayanan1-4/+4
For PUNIT device, ISPDRIVER_IPC and GTDDRIVER_IPC resources are not mandatory. So when PMC IPC driver creates a PUNIT device, if these resources are not available then it creates dummy resource entries for these missing resources. But during PUNIT device probe, doing ioremap on these dummy resources generates following warning messages. intel_punit_ipc: can't request region for resource [mem 0x00000000] intel_punit_ipc: can't request region for resource [mem 0x00000000] intel_punit_ipc: can't request region for resource [mem 0x00000000] intel_punit_ipc: can't request region for resource [mem 0x00000000] This patch fixes this issue by adding extra check for resource size before performing ioremap operation. Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-11-05platform/x86: dell-smo8800: remove redundant assignments to byte_dataColin Ian King1-2/+1
Variable byte_data is being initialized and re-assigned with values that are never read. Remove these as these redundant assignments. Cleans up clang warning: drivers/platform/x86/dell-smo8800.c:106:2: warning: Value stored to 'byte_data' is never read Signed-off-by: Colin Ian King <[email protected]> Acked-by: Pali Rohár <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-11-05platform/x86: hp-wmi: Fix tablet mode detection for convertiblesStefan Brüns1-1/+1
Commit f9cf3b2880cc ("platform/x86: hp-wmi: Refactor dock and tablet state fetchers") consolidated the methods for docking and laptop mode detection, but omitted to apply the correct mask for the laptop mode (it always uses the constant for docking). Fixes: f9cf3b2880cc ("platform/x86: hp-wmi: Refactor dock and tablet state fetchers") Signed-off-by: Stefan Brüns <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-11-05platform/x86: intel_ips: Convert timers to use timer_setup()Kees Cook1-8/+7
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Moves timer structure off stack and into struct ips_driver. Cc: Darren Hart <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: [email protected] Cc: Thomas Gleixner <[email protected]> Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-11-05platform/x86: sony-laptop: Drop variable assignment in sony_nc_setup_rfkill()Markus Elfring1-1/+1
The local variable "err" will eventually be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-11-05platform/x86: sony-laptop: Fix error handling in sony_nc_setup_rfkill()Markus Elfring1-6/+8
Source code review for a specific software refactoring showed the need for another correction because the error code "-1" was returned so far if a call of the function "sony_call_snc_handle" failed here. Thus assign the return value from these two function calls also to the variable "err" and provide it in case of a failure. Fixes: d6f15ed876b83a1a0eba1d0473eef58acc95444a ("sony-laptop: use soft rfkill status stored in hw") Suggested-by: Andy Shevchenko <[email protected]> Link: https://lkml.org/lkml/2017/10/31/463 Link: https://lkml.kernel.org/r/<CAHp75VcMkXCioCzmLE0+BTmkqc5RSOx9yPO0ectVHMrMvewgwg@mail.gmail.com> Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-11-03tools/wmi: add a sample for dell smbios communication over WMIMario Limonciello4-6/+237
This application uses the character device /dev/wmi/dell-smbios to perform SMBIOS communications from userspace. It offers demonstrations of a few simple tasks: - Running a class/select command - Querying a token value - Activating a token Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-03platform/x86: dell-smbios-wmi: introduce userspace interfaceMario Limonciello4-41/+133
It's important for the driver to provide a R/W ioctl to ensure that two competing userspace processes don't race to provide or read each others data. This userspace character device will be used to perform SMBIOS calls from any applications. It provides an ioctl that will allow passing the WMI calling interface buffer between userspace and kernel space. This character device is intended to deprecate the dcdbas kernel module and the interface that it provides to userspace. To perform an SMBIOS IOCTL call using the character device userspace will perform a read() on the the character device. The WMI bus will provide a u64 variable containing the necessary size of the IOCTL buffer. The API for interacting with this interface is defined in documentation as well as the WMI uapi header provides the format of the structures. Not all userspace requests will be accepted. The dell-smbios filtering functionality will be used to prevent access to certain tokens and calls. All whitelisted commands and tokens are now shared out to userspace so applications don't need to define them in their own headers. Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-03platform/x86: wmi: create userspace interface for driversMario Limonciello4-2/+219
For WMI operations that are only Set or Query readable and writable sysfs attributes created by WMI vendor drivers or the bus driver makes sense. For other WMI operations that are run on Method, there needs to be a way to guarantee to userspace that the results from the method call belong to the data request to the method call. Sysfs attributes don't work well in this scenario because two userspace processes may be competing at reading/writing an attribute and step on each other's data. When a WMI vendor driver declares a callback method in the wmi_driver the WMI bus driver will create a character device that maps to that function. This callback method will be responsible for filtering invalid requests and performing the actual call. That character device will correspond to this path: /dev/wmi/$driver Performing read() on this character device will provide the size of the buffer that the character device needs to perform calls. This buffer size can be set by vendor drivers through a new symbol or when MOF parsing is available by the MOF. Performing ioctl() on this character device will be interpretd by the WMI bus driver. It will perform sanity tests for size of data, test them for a valid instance, copy the data from userspace and pass iton to the vendor driver to further process and run. This creates an implicit policy that each driver will only be allowed a single character device. If a module matches multiple GUID's, the wmi_devices will need to be all handled by the same wmi_driver. The WMI vendor drivers will be responsible for managing inappropriate access to this character device and proper locking on data used by it. When a WMI vendor driver is unloaded the WMI bus driver will clean up the character device and any memory allocated for the call. Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-03platform/x86: dell-smbios: Add filtering supportMario Limonciello2-0/+203
When a userspace interface is introduced to dell-smbios filtering support will be used to make sure that userspace doesn't make calls deemed unsafe or that can cause the kernel drivers to get out of sync. A blacklist is provided for the following: - Items that are in use by other kernel drivers - Items that are deemed unsafe (diagnostics, write-once, etc) - Any items in the blacklist will be rejected. Following that a whitelist is provided as follows: - Each item has an associated capability. If a userspace interface accesses this item, that capability will be tested to filter the request. - If the process provides CAP_SYS_RAWIO the whitelist will be overridden. When an item is not in the blacklist, or whitelist and the process is run with insufficient capabilities the call will be rejected. Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-03platform/x86: dell-smbios-smm: test for WSMTMario Limonciello2-0/+35
WSMT is as an attestation to the OS that the platform won't modify memory outside of pre-defined areas. If a platform has WSMT enabled in BIOS setup, SMM calls through dcdbas will fail. The only way to access platform data in these instances is through the WMI SMBIOS calling interface. Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-03platform/x86: dell-smbios-wmi: Add new WMI dispatcher driverMario Limonciello4-0/+257
The dell-smbios stack only currently uses an SMI interface which grants direct access to physical memory to the firmware SMM methods via a pointer. This dispatcher driver adds a WMI-ACPI interface that is detected by WMI probe and preferred over the SMI interface in dell-smbios. Changing this to operate over WMI-ACPI will use an ACPI OperationRegion for a buffer of data storage when SMM calls are performed. This is a safer approach to use in kernel drivers as the SMM will only have access to that OperationRegion. Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-03platform/x86: dell-smbios: Introduce dispatcher for SMM callsMario Limonciello8-248/+398
This splits up the dell-smbios driver into two drivers: * dell-smbios * dell-smbios-smm dell-smbios can operate with multiple different dispatcher drivers to perform SMBIOS operations. Also modify the interface that dell-laptop and dell-wmi use align to this model more closely. Rather than a single global buffer being allocated for all drivers, each driver will allocate and be responsible for it's own buffer. The pointer will be passed to the calling function and each dispatcher driver will then internally copy it to the proper location to perform it's call. Add defines for calls used by these methods in the dell-smbios.h header for tracking purposes. Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-03platform/x86: dell-smbios: Add a sysfs interface for SMBIOS tokensMario Limonciello3-1/+240
Currently userspace tools can access system tokens via the dcdbas kernel module and a SMI call that will cause the platform to execute SMM code. With a goal in mind of deprecating the dcdbas kernel module a different method for accessing these tokens from userspace needs to be created. This is intentionally marked to only be readable as a process with CAP_SYS_ADMIN as it can contain sensitive information about the platform's configuration. While adding this interface I found that some tokens are duplicated. These need to be ignored from sysfs to avoid duplicate files. MAINTAINERS was missing for this driver. Add myself and Pali to maintainers list for it. Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-03platform/x86: dell-smbios: only run if proper oem string is detectedMario Limonciello1-0/+7
The proper way to indicate that a system is a 'supported' Dell System is by the presence of this string in OEM strings. Allowing the driver to load on non-Dell systems will have undefined results. Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-03platform/x86: wmi: Don't allow drivers to get each other's GUIDsMario Limonciello2-21/+0
The only driver using this was dell-wmi, and it really was a hack. The driver was getting a data attribute from another driver and this type of action should not be encouraged. Rather drivers that need to interact with one another should pass data back and forth via exported functions. Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Pali Rohár <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-03platform/x86: dell-wmi-descriptor: split WMI descriptor into it's own driverMario Limonciello6-74/+208
All communication on individual GUIDs should occur in separate drivers. Allowing a driver to communicate with the bus to another GUID is just a hack that discourages drivers to adopt the bus model. The information found from the WMI descriptor driver is now exported for use by other drivers. Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-03platform/x86: dell-wmi: don't check length returnedMario Limonciello1-5/+1
This is intended to be variable and provided by the platform. Some platforms this year will be adopting a 32k WMI buffer, so don't complain when encountering those platforms or any other future changes. Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Pali Rohár <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-03platform/x86: dell-wmi: clean up wmi descriptor checkMario Limonciello1-5/+5
Some cases the wrong type was used for errors and checks can be done more cleanly. Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Suggested-by: Andy Shevchenko <[email protected]> Reviewed-by: Pali Rohár <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-03platform/x86: dell-wmi: increase severity of some failuresMario Limonciello1-6/+7
There is a lot of error checking in place for the format of the WMI descriptor buffer, but some of the potentially raised issues should be considered critical failures. If the buffer size or header don't match, this is a good indication that the buffer format changed in a way that the rest of the data should not be relied upon. For the remaining data set vectors, continue to notate a warning in undefined results, but as those are fields that the descriptor intended to refer to other applications, don't fail if they're new values. Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Pali Rohár <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-03platform/x86: wmi: Add new method wmidev_evaluate_methodMario Limonciello2-4/+30
Drivers properly using the wmibus can pass their wmi_device pointer rather than the GUID back to the WMI bus to evaluate the proper methods. Any "new" drivers added that use the WMI bus should use this rather than the old wmi_evaluate_method that would take the GUID. Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Pali Rohár <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-03platform/x86: dell-smbios: Prefix class/select with cmd_Mario Limonciello2-4/+4
Later on these structures will be brought up to userspace. the word "class" is a reserved word in c++ and this will prevent uapi headers from being included directly in c++ programs. To make life easier on these applications, prepare the change now. Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-11-03platform/x86: intel_cht_int33fe: Update fusb302 type string, add propertiesHans de Goede2-2/+48
The fusb302 driver as merged in staging uses "typec_fusb302" as i2c-id rather then just "fusb302" and needs us to set a number of device- properties, adjust the intel_cht_int33fe driver accordingly. One of the properties set is max-snk-mv which makes the fusb302 driver negotiate up to 12V charging voltage, which is a bad idea on boards which are not setup to handle this, so this commit also adds 2 extra sanity checks to make sure that the expected Whiskey Cove PMIC + TI bq24292i charger combo, which can handle 12V, is present. Signed-off-by: Hans de Goede <[email protected]> Acked-by: Andy Shevchenko <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-11-03Merge branch 'i2c/cht-wc-fusb302-immutable' of ↵Andy Shevchenko1401-8917/+18344
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c/cht-wc-fusb302-immutable immutable branch from Wolfram Sang: as discussed before, here is the immutable branch for the i2c-cht-wc driver, so you can safely apply Hans' patch [1] "platform/x86: intel_cht_int33fe: Update fusb302 type string, add properties" on top of this. [1] http://patchwork.ozlabs.org/patch/824314/
2017-11-03platform/x86: silead_dmi: Add entry for the Digma e200 tabletSergey Tshovrebov1-0/+25
Add touchscreen platform data for the Digma e200 tablet. Signed-off-by: Sergey Tshovrebov <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-11-03platform/x86: silead_dmi: Fix GP-electronic T701 entryHans de Goede1-0/+2
The GP-electronic T701 has its LCD panel mounted upside-down, initially my plan was to fix this by transparently rotating the image in the i915 driver (my "drm/i915: Deal with upside-down mounted LCD" patch), but that approach has been rejected instead the kernel will now export a "panel orientation" property on the drm-connector for the panel and let userspace deal with it. But userspace expects the touchscreen coordinates to match the panel coordinates *before* applying any rotation, so now that we no longer hide the upside-down-ness of the LCD panel from userspace the coordinates being generated are wrong and we need to apply a rotation of 180 degrees to the coordinates to fix this. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-11-03platform/x86: peaq-wmi: Remove unnecessary checks from peaq_wmi_exitHans de Goede1-7/+1
peaq_wmi_exit will only ever get called if peaq_wmi_init succeeds, so there is no need to repeat the checks from peaq_wmi_init. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-11-03platform/x86: peaq_wmi: Fix missing terminating entry for peaq_dmi_tableHans de Goede1-0/+1
Add missing terminating entry to peaq_dmi_table. Fixes: 3b95206110a2 ("platform/x86: peaq-wmi: Add DMI check before ...") Cc: [email protected] Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-10-31platform/x86: ideapad-laptop: Add Lenovo Yoga 920-13IKB to no_hw_rfkill dmi listPhilipp Hug1-0/+7
The Lenovo Yoga 920-13IKB does not have a hw rfkill switch, and trying to read the hw rfkill switch through the ideapad module causes it to always report as blocked. This commit adds the Lenovo Yoga 920-13IKB to the no_hw_rfkill dmi list, fixing the WiFI breakage. Signed-off-by: Philipp Hug <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]>
2017-10-30platform/x86: fujitsu-laptop: Fix radio LED detectionMichał Kępień1-5/+9
Radio LED detection method implemented in commit 4f62568c1fcf ("fujitsu-laptop: Support radio LED") turned out to be incorrect as it causes a radio LED to be erroneously detected on a Fujitsu Lifebook E751 which has a slide switch (and thus no radio LED). Use bit 17 of flags_supported (the value returned by method S000 of ACPI device FUJ02E3) to determine whether a radio LED is present as it seems to be a more reliable indicator, based on comparing DSDT tables of four Fujitsu Lifebook models (E744, E751, S7110, S8420). Fixes: 4f62568c1fcf ("fujitsu-laptop: Support radio LED") Reported-by: Heinrich Siebmanns <[email protected]> Signed-off-by: Michał Kępień <[email protected]> Tested-by: Heinrich Siebmanns <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-10-27platform/x86: hp_accel: Add quirk for HP ProBook 440 G4Osama Khan1-0/+1
Added support for HP ProBook 440 G4 laptops by including the accelerometer orientation quirk for that device. Testing was performed based on the axis orientation guidelines here: https://www.kernel.org/doc/Documentation/misc-devices/lis3lv02d which states "If the left side is elevated, X increases (becomes positive)". When tested, on lifting the left edge, x values became increasingly negative thus indicating an inverted x-axis on the installed lis3lv02d chip. This was compensated by adding an entry for this device in hp_accel.c specifying the quirk as x_inverted. The patch was tested on a ProBook 440 G4 device and x-axis as well as y and z-axis values are now generated as per spec. Signed-off-by: Osama Khan <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-10-27platform/x86: intel_turbo_max_3: Add Skylake platformSrinivas Pandruvada1-0/+1
Ev Kontsevoy reported that he can't see the presence of "/proc/sys/kernel/sched_itmt_enabled" on i9-7900x with Asrock x299 Taichi system even if he enabled "Turbo 3.0" in the BIOS. The problem is that even if one core max is 200MHz more than others, the current implementation couldn't enumerate that with the way the system is configured. The system by default configured for legacy mode (no HWP or speed shift technology), in this mode only way we can enumerate via the mail box interface as implemented in this driver. We were planing to only use this driver for Broadwell, but we need to extend this because some Skylake system has same issue as Braodwell systems. On this system BIOS allows to change to HWP mode, where we expect that we can enumerate favored core with ACPI-CPPC. But on this system the core priority is 0xff for all cores in CPPC object. So this is not an option. Hence this change allows Skylake systems to be enumerate favored core similar to Broadwell in legacy mode. Reported-and-tested-by: Ev Kontsevoy <[email protected]> Signed-off-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-10-27platform/x86: intel_telemetry: Remove useless default in KconfigAndy Shevchenko1-1/+0
'default n' is a default behaviour of Kconfig options. So, remove explicit line from Kconfig. Signed-off-by: Andy Shevchenko <[email protected]>
2017-10-27platform/x86: intel_telemetry: Add needed inclusionAndy Shevchenko1-0/+2
linux/io.h defines readq() and ioremap_nocache() / iounmap() functions. If not included, the build fails: intel_telemetry_pltdrv.c:1165:31: warning: assignment makes pointer from integer without a cast [-Wint-conversion] intel_telemetry_pltdrv.c:1165:33: error: implicit declaration of function 'ioremap_nocache' [-Werror=implicit-function-declaration] intel_telemetry_pltdrv.c:1202:3: error: implicit declaration of function 'iounmap' [-Werror=implicit-function-declaration] intel_telemetry_pltdrv.c:900:20: error: implicit declaration of function 'readq' [-Werror=implicit-function-declaration] Fix this by including linux/io.h. Reported-by: kbuild test robot <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-10-27i2c-cht-wc: Add device-properties for fusb302 integrationHans de Goede2-7/+49
Add device-properties to make the bq24292i charger connected to the bus get its input-current-limit from the fusb302 Type-C port controller which is used on boards with the cht-wc PMIC, as well as regulator_init_data for the 5V boost converter on the bq24292i. Since this means we now hook-up the bq24292i to the fusb302 Type-C port controller add a check for the ACPI device which instantiates the fusb302. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2017-10-27i2c: Allow overriding dev_name through board_infoHans de Goede2-2/+10
For devices not instantiated through ACPI the i2c-client's device-name gets set to <busnr>-<addr> by default, e.g. "0-0022" this means that the device-name is dependent on the order in which the i2c-busses are enumerated. In some cases having a predictable constant device-name is desirable, for example on non device-tree platforms the link between a regulator and its consumers is specified by the platform code by setting regulator_init_data.consumers. This array identifies the regulator's consumers by dev_name and supply(-name). Which requires a constant dev_name. This commit adds a dev_name field to i2c_board_info allowing platform code to set a contstant dev_name so that the device can be identified by its dev_name in other platform code. Signed-off-by: Hans de Goede <[email protected]> Acked-by: Mark Brown <[email protected]> (live at ELCE17) Acked-by: Andy Shevchenko <[email protected]> (live at ELCE17) Signed-off-by: Wolfram Sang <[email protected]>
2017-10-23platform/x86: intel_pmc_ipc: Use spin_lock to protect GCR updatesKuppuswamy Sathyanarayanan1-8/+13
Currently, update_no_reboot_bit() function implemented in this driver uses mutex_lock() to protect its register updates. But this function is called with in atomic context in iTCO_wdt_start() and iTCO_wdt_stop() functions in iTCO_wdt.c driver, which in turn causes "sleeping into atomic context" issue. This patch fixes this issue by replacing the mutex_lock() with spin_lock() to protect the GCR read/write/update APIs. Fixes: 9d855d4 ("platform/x86: intel_pmc_ipc: Fix iTCO_wdt GCS memory mapping failure") Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-10-23platform/x86: intel_telemetry: cleanup redundant headersRajneesh Bhardwaj3-15/+4
Removes unnecessary header files included in the driver and sorts the remaining ones in the alphabetical order. Signed-off-by: Rajneesh Bhardwaj <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-10-23platform/x86: intel_telemetry: Fix typosRajneesh Bhardwaj1-7/+7
Telemetry word is misspelled several times in this file as Telemtry. This fixes the spelling mistake and folds in another minor typo. Signed-off-by: Rajneesh Bhardwaj <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-10-23platform/x86: intel_telemetry: Fix load failure infoRajneesh Bhardwaj1-1/+0
Intel Telemetry driver depends on IPC1 interface. If IPC1 interface is disabled on a given platform by the system firmware, the driver does not load but prints misleading information in the dmesg logs. Signed-off-by: Rajneesh Bhardwaj <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-10-23platform/x86: intel_cht_int33fe: make a couple of local functions staticColin Ian King1-2/+2
The functions cht_int33fe_check_for_max17047 and cht_int33fe_find_max17047 are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'cht_int33fe_check_for_max17047' was not declared. Should it be static? symbol 'cht_int33fe_find_max17047' was not declared. Should it be static? Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2017-10-23Linux 4.14-rc6Linus Torvalds1-1/+1
2017-10-23Merge tag 'staging-4.14-rc6' of ↵Linus Torvalds9-39/+96
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO fixes from Greg KH: "Here are a small number of patches to resolve some reported IIO and a staging driver problem. Nothing major here, full details are in the shortlog below. All have been in linux-next with no reported issues" * tag 'staging-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: bcm2835-audio: Fix memory corruption iio: adc: at91-sama5d2_adc: fix probe error on missing trigger property iio: adc: dln2-adc: fix build error iio: dummy: events: Add missing break staging: iio: ade7759: fix signed extension bug on shift of a u8 iio: pressure: zpa2326: Remove always-true check which confuses gcc iio: proximity: as3935: noise detection + threshold changes
2017-10-23Merge tag 'char-misc-4.14-rc6' of ↵Linus Torvalds4-26/+15
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are four small fixes for 4.14-rc6. Three of them are binder driver fixes for reported issues, and the last one is a hyperv driver bugfix. Nothing major, but good fixes to get into 4.14-final. All of these have been in linux-next with no reported issues" * tag 'char-misc-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: android: binder: Fix null ptr dereference in debug msg android: binder: Don't get mm from task vmbus: hvsock: add proper sync for vmbus_hvsock_device_unregister() binder: call poll_wait() unconditionally.