summaryrefslogtreecommitdiffstats
path: root/drivers/platform
Commit message (Collapse)AuthorAgeFilesLines
* platform/x86: pcengines-apuv2: Spelling fixes in the driverAndy Shevchenko2019-12-201-20/+20
| | | | | | | | | Mainly does: - capitalize gpio and bios to GPIO and BIOS - capitalize beginning of comments - add periods in multi-line comments Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: pcengines-apuv2: detect apuv4 boardEnrico Weigelt, metux IT consult2019-12-201-0/+27
| | | | | | | | GPIO stuff on APUv4 seems to be the same as on APUv2, so we just need to match on DMI data. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: pcengines-apuv2: fix simswap GPIO assignmentEnrico Weigelt, metux IT consult2019-12-201-1/+1
| | | | | | | | | The mapping entry has to hold the GPIO line index instead of controller's register number. Fixes: 5037d4ddda31 ("platform/x86: pcengines-apuv2: wire up simswitch gpio as led") Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: pmc_atom: Add Siemens CONNECT X300 to critclk_systems DMI tableMichael Haener2019-12-201-0/+8
| | | | | | | | | | | The CONNECT X300 uses the PMC clock for on-board components and gets stuck during boot if the clock is disabled. Therefore, add this device to the critical systems list. Tested on CONNECT X300. Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL") Signed-off-by: Michael Haener <michael.haener@siemens.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytesHans de Goede2019-12-201-1/+1
| | | | | | | | | | | | | | | | | | | At least on the HP Envy x360 15-cp0xxx model the WMI interface for HPWMI_FEATURE2_QUERY requires an outsize of at least 128 bytes, otherwise it fails with an error code 5 (HPWMI_RET_INVALID_PARAMETERS): Dec 06 00:59:38 kernel: hp_wmi: query 0xd returned error 0x5 We do not care about the contents of the buffer, we just want to know if the HPWMI_FEATURE2_QUERY command is supported. This commits bumps the buffer size, fixing the error. Fixes: 8a1513b4932 ("hp-wmi: limit hotkey enable") Cc: stable@vger.kernel.org BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520703 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/mellanox: fix the mlx-bootctl sysfsLiming Sun2019-12-201-1/+1
| | | | | | | | | | | This is a follow-up commit for the sysfs attributes to change from DRIVER_ATTR to DEVICE_ATTR according to some initial comments. In such case, it's better to point the sysfs path to the device itself instead of the driver. The ABI document is also updated. Fixes: 79e29cb8fbc5 ("platform/mellanox: Add bootctl driver for Mellanox BlueField Soc") Signed-off-by: Liming Sun <lsun@mellanox.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* Merge tag 'tag-chrome-platform-for-v5.5' of ↵Linus Torvalds2019-12-0316-84/+912
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform changes from Benson Leung: "CrOS EC / MFD / IIO: - Contains tag-ib-chrome-mfd-iio-input-5.5, which is the first part of a series from Gwendal to refactor sensor code between MFD, CrOS EC, iio and input in order to add a new sensorhub driver and FIFO processing Wilco EC: - Add support for Dell's USB PowerShare policy control, keyboard backlight LED driver, and a new test_event file. - Fixes use after free in wilco_ec's telemetry driver. Misc: - bugfix in cros_usbpd_logger (missing destroy workqueue)" * tag 'tag-chrome-platform-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: wilco_ec: fix use after free issue platform/chrome: cros_ec: Add Kconfig default for cros-ec-sensorhub Revert "Input: cros_ec_keyb: mask out extra flags in event_type" Revert "Input: cros_ec_keyb - add back missing mask for event_type" platform/chrome: cros_ec: handle MKBP more events flag platform/chrome: cros_ec: Do not attempt to register a non-positive IRQ number platform/chrome: cros-ec: Record event timestamp in the hard irq mfd / platform / iio: cros_ec: Register sensor through sensorhub iio / platform: cros_ec: Add cros-ec-sensorhub driver mfd / platform: cros_ec: Add sensor_count and make check_features public platform/chrome: cros_ec: Put docs with the code platform/chrome: cros_usbpd_logger: add missed destroy_workqueue in remove platform/chrome: cros_ec: Fix Kconfig indentation platform/chrome: wilco_ec: Add keyboard backlight LED support platform/chrome: wilco_ec: Add charging config driver platform/chrome: wilco_ec: Add Dell's USB PowerShare Policy control platform/chrome: wilco_ec: Add debugfs test_event file
| * platform/chrome: wilco_ec: fix use after free issueWen Yang2019-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is caused by dereferencing 'dev_data' after put_device() in the telem_device_remove() function. This patch just moves the put_device() down a bit to avoid this issue. Fixes: 1210d1e6bad1 ("platform/chrome: wilco_ec: Add telemetry char device interface") Signed-off-by: Wen Yang <wenyang@linux.alibaba.com> Cc: Benson Leung <bleung@chromium.org> Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com> Cc: Nick Crews <ncrews@chromium.org> Cc: linux-kernel@vger.kernel.org Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
| * platform/chrome: cros_ec: Add Kconfig default for cros-ec-sensorhubEnric Balletbo i Serra2019-11-271-1/+2
| | | | | | | | | | | | | | Like the other CrOS EC sub-drivers set that depends on his parent and set default to the parent's value. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
| * Merge tag 'tag-ib-chrome-mfd-iio-input-5.5' into chrome-platform-5.5Enric Balletbo i Serra2019-11-218-63/+561
| |\ | | | | | | | | | | | | | | | IB between mfd, iio, input and chrome platform for cros-ec-sensorhub Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
| | * platform/chrome: cros_ec: handle MKBP more events flagEnrico Granata2019-11-215-58/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ChromeOS EC has support for signaling to the host that a single IRQ can serve multiple MKBP (Matrix KeyBoard Protocol) events. Doing this serves an optimization purpose, as it minimizes the number of round-trips into the interrupt handling machinery, and it proves beneficial to sensor timestamping as it keeps the desired synchronization of event times between the two processors. This patch adds kernel support for this EC feature, allowing the ec_irq to loop until all events have been served. Signed-off-by: Enrico Granata <egranata@chromium.org> Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
| | * platform/chrome: cros_ec: Do not attempt to register a non-positive IRQ numberGwendal Grignou2019-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a layer of sanity checking to cros_ec_register against attempting to register IRQ values that are not strictly greater than 0. Signed-off-by: Enrico Granata <egranata@chromium.org> Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
| | * platform/chrome: cros-ec: Record event timestamp in the hard irqGwendal Grignou2019-11-213-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To improve sensor timestamp precision, given EC and AP are in different time domains, the AP needs to try to record the exact moment an event was signalled to the AP by the EC as soon as possible after it happens. First thing in the hard irq is the best place for this. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Acked-by: Jonathan Cameron <Jonathan.Cameron@kernel.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
| | * iio / platform: cros_ec: Add cros-ec-sensorhub driverGwendal Grignou2019-11-213-0/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to HID sensor stack, the new driver sits between cros-ec-dev and the IIO device drivers: The EC based IIO device topology would be: iio:device1 -> ...0/0000:00:1f.0/PNP0C09:00/GOOG0004:00/cros-ec-dev.6.auto/ cros-ec-sensorhub.7.auto/ cros-ec-accel.15.auto/ iio:device1 It will be expanded to control EC sensor FIFO. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> [Fix "unknown type name 'uint32_t'" type errors] Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
| | * mfd / platform: cros_ec: Add sensor_count and make check_features publicGwendal Grignou2019-11-211-0/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new function to return the number of MEMS sensors available in a ChromeOS Embedded Controller. It uses MOTIONSENSE_CMD_DUMP if available or a specific memory map ACPI registers to find out. Also, make check_features public as it can be useful for other drivers to know what the Embedded Controller supports. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
| | * platform/chrome: cros_ec: Put docs with the codeGwendal Grignou2019-11-212-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid doc rot, put function documentations with code, not header. Use kernel-doc style comments for exported functions. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
| * | platform/chrome: cros_usbpd_logger: add missed destroy_workqueue in removeChuhong Yuan2019-11-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The driver forgets to destroy workqueue in remove. Add the missed call to fix it. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
| * | platform/chrome: cros_ec: Fix Kconfig indentationKrzysztof Kozlowski2019-11-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
| * | platform/chrome: wilco_ec: Add keyboard backlight LED supportDaniel Campello2019-11-194-6/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EC is in charge of controlling the keyboard backlight on the Wilco platform. We expose a standard LED class device named platform::kbd_backlight. Since the EC will never change the backlight level of its own accord, we don't need to implement a brightness_get() method. Signed-off-by: Nick Crews <ncrews@chromium.org> Signed-off-by: Daniel Campello <campello@chromium.org> Reviewed-by: Daniel Campello <campello@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
| * | platform/chrome: wilco_ec: Add charging config driverNick Crews2019-11-191-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a device to control the charging algorithm used on Wilco devices, which will be picked up by the drivers/power/supply/wilco-charger.c driver. See Documentation/ABI/testing/sysfs-class-power-wilco for the userspace interface and other info. Signed-off-by: Nick Crews <ncrews@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
| * | platform/chrome: wilco_ec: Add Dell's USB PowerShare Policy controlDaniel Campello2019-10-111-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | USB PowerShare is a policy which affects charging via the special USB PowerShare port (marked with a small lightning bolt or battery icon) when in low power states: - In S0, the port will always provide power. - In S0ix, if usb_charge is enabled, then power will be supplied to the port when on AC or if battery is > 50%. Else no power is supplied. - In S5, if usb_charge is enabled, then power will be supplied to the port when on AC. Else no power is supplied. Signed-off-by: Daniel Campello <campello@chromium.org> Signed-off-by: Nick Crews <ncrews@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
| * | platform/chrome: wilco_ec: Add debugfs test_event fileDaniel Campello2019-10-011-10/+37
| |/ | | | | | | | | | | | | | | | | | | | | | | This change introduces a new debugfs file 'test_event' that when written to causes the EC to generate a test event. This adds a second sub cmd for the test event, and pulls out send_ec_cmd to be a common helper between h1_gpio_get and test_event_set. Signed-off-by: Daniel Campello <campello@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Reviewed-by: Nick Crews <ncrews@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
* | Merge tag 'docs-5.5a' of git://git.lwn.net/linuxLinus Torvalds2019-12-022-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull Documentation updates from Jonathan Corbet: "Here are the main documentation changes for 5.5: - Various kerneldoc script enhancements. - More RST conversions; those are slowing down as we run out of things to convert, but we're a ways from done still. - Dan's "maintainer profile entry" work landed at last. Now we just need to get maintainers to fill in the profiles... - A reworking of the parallel build setup to work better with a variety of systems (and to not take over huge systems entirely in particular). - The MAINTAINERS file is now converted to RST during the build. Hopefully nobody ever tries to print this thing, or they will need to load a lot of paper. - A script and documentation making it easy for maintainers to add Link: tags at commit time. Also included is the removal of a bunch of spurious CR characters" * tag 'docs-5.5a' of git://git.lwn.net/linux: (91 commits) docs: remove a bunch of stray CRs docs: fix up the maintainer profile document libnvdimm, MAINTAINERS: Maintainer Entry Profile Maintainer Handbook: Maintainer Entry Profile MAINTAINERS: Reclaim the P: tag for Maintainer Entry Profile docs, parallelism: Rearrange how jobserver reservations are made docs, parallelism: Do not leak blocking mode to other readers docs, parallelism: Fix failure path and add comment Documentation: Remove bootmem_debug from kernel-parameters.txt Documentation: security: core.rst: fix warnings Documentation/process/howto/kokr: Update for 4.x -> 5.x versioning Documentation/translation: Use Korean for Korean translation title docs/memory-barriers.txt: Remove remaining references to mmiowb() docs/memory-barriers.txt/kokr: Update I/O section to be clearer about CPU vs thread docs/memory-barriers.txt/kokr: Fix style, spacing and grammar in I/O section Documentation/kokr: Kill all references to mmiowb() docs/memory-barriers.txt/kokr: Rewrite "KERNEL I/O BARRIER EFFECTS" section docs: Add initial documentation for devfreq Documentation: Document how to get links with git am docs: Add request_irq() documentation ...
| * \ Merge tag 'v5.4-rc4' into docs-nextJonathan Corbet2019-10-293-14/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | I need to pick up the independent changes made to Documentation/core-api/memory-allocation.rst to be able to merge further work without creating a total mess.
| * | | docs: admin-guide: Move Dell RBU document from driver-apiJonathan Neuschäfer2019-10-152-2/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | This document describes how an admin can use the dell_rbu driver, rather than any in-kernel API details. Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* | | Merge tag 'platform-drivers-x86-v5.5-1' of ↵Linus Torvalds2019-12-0122-315/+2114
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Andy Shevchenko: - New bootctl driver for Mellanox BlueField SoC. - New driver to support System76 laptops. - Temperature monitoring and fan control on Acer Aspire 7551 is now supported. - Previously the Huawei driver handled only hotkeys. After the conversion to WMI it has been expanded to support newer laptop models. - Big refactoring of intel-speed-select tools allows to use it on Intel CascadeLake-N systems. - Touchscreen support for ezpad 6 m4 and Schneider SCT101CTM tablets - Miscellaneous clean ups and fixes here and there. * tag 'platform-drivers-x86-v5.5-1' of git://git.infradead.org/linux-platform-drivers-x86: (59 commits) platform/x86: hp-wmi: Fix ACPI errors caused by passing 0 as input size platform/x86: hp-wmi: Fix ACPI errors caused by too small buffer platform/x86: intel_pmc_core: Add Comet Lake (CML) platform support to intel_pmc_core driver platform/x86: intel_pmc_core: Fix the SoC naming inconsistency platform/mellanox: Fix Kconfig indentation tools/power/x86/intel-speed-select: Display TRL buckets for just base config level tools/power/x86/intel-speed-select: Ignore missing config level platform/x86: touchscreen_dmi: Add info for the ezpad 6 m4 tablet tools/power/x86/intel-speed-select: Increment version tools/power/x86/intel-speed-select: Use core count for base-freq mask tools/power/x86/intel-speed-select: Support platform with limited Intel(R) Speed Select tools/power/x86/intel-speed-select: Use Frequency weight for CLOS tools/power/x86/intel-speed-select: Make CLOS frequency in MHz tools/power/x86/intel-speed-select: Use mailbox for CLOS_PM_QOS_CONFIG tools/power/x86/intel-speed-select: Auto mode for CLX tools/power/x86/intel-speed-select: Correct CLX-N frequency units tools/power/x86/intel-speed-select: Change display of "avx" to "avx2" tools/power/x86/intel-speed-select: Extend command set for perf-profile Add touchscreen platform data for the Schneider SCT101CTM tablet platform/x86: intel_int0002_vgpio: Pass irqchip when adding gpiochip ...
| * | | platform/x86: hp-wmi: Fix ACPI errors caused by passing 0 as input sizeHans de Goede2019-11-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The AML code implementing the WMI methods creates a variable length field to hold the input data we pass like this: CreateDWordField (Arg1, 0x0C, DSZI) Local5 = DSZI /* \HWMC.DSZI */ CreateField (Arg1, 0x80, (Local5 * 0x08), DAIN) If we pass 0 as bios_args.datasize argument then (Local5 * 0x08) is 0 which results in these errors: [ 71.973305] ACPI BIOS Error (bug): Attempt to CreateField of length zero (20190816/dsopcode-133) [ 71.973332] ACPI Error: Aborting method \HWMC due to previous error (AE_AML_OPERAND_VALUE) (20190816/psparse-529) [ 71.973413] ACPI Error: Aborting method \_SB.WMID.WMAA due to previous error (AE_AML_OPERAND_VALUE) (20190816/psparse-529) And in our HPWMI_WIRELESS2_QUERY calls always failing. for read commands like HPWMI_WIRELESS2_QUERY the DSZI value is not used / checked, except for read commands where extra input is needed to specify exactly what to read. So for HPWMI_WIRELESS2_QUERY we can safely pass the size of the expected output as insize to hp_wmi_perform_query(), as we are already doing for all other HPWMI_READ commands we send. Doing so fixes these errors. Cc: stable@vger.kernel.org BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=197007 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=201981 BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520703 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: hp-wmi: Fix ACPI errors caused by too small bufferHans de Goede2019-11-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HP WMI calls may take up to 128 bytes of data as input, and the AML methods implementing the WMI calls, declare a couple of fields for accessing input in different sizes, specifycally the HWMC method contains: CreateField (Arg1, 0x80, 0x0400, D128) Even though we do not use any of the WMI command-types which need a buffer of this size, the APCI interpreter still tries to create it as it is declared in generoc code at the top of the HWMC method which runs before the code looks at which command-type is requested. This results in many of these errors on many different HP laptop models: [ 14.459261] ACPI Error: Field [D128] at 1152 exceeds Buffer [NULL] size 160 (bits) (20170303/dsopcode-236) [ 14.459268] ACPI Error: Method parse/execution failed [\HWMC] (Node ffff8edcc61507f8), AE_AML_BUFFER_LIMIT (20170303/psparse-543) [ 14.459279] ACPI Error: Method parse/execution failed [\_SB.WMID.WMAA] (Node ffff8edcc61523c0), AE_AML_BUFFER_LIMIT (20170303/psparse-543) This commit increases the size of the data element of the bios_args struct to 128 bytes fixing these errors. Cc: stable@vger.kernel.org BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=197007 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=201981 BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520703 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: intel_pmc_core: Add Comet Lake (CML) platform support to ↵Gayatri Kammela2019-11-211-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | intel_pmc_core driver Add Comet Lake to the list of the platforms that intel_pmc_core driver supports for pmc_core device. Just like Ice Lake, Comet Lake can also reuse all the Cannon Lake PCH IPs. No additional effort is needed to enable but to simply reuse them. Cc: Mario Limonciello <mario.limonciello@dell.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Kan Liang <kan.liang@intel.com> Cc: David E. Box <david.e.box@intel.com> Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com> Cc: Tony Luck <tony.luck@intel.com> Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: intel_pmc_core: Fix the SoC naming inconsistencyGayatri Kammela2019-11-211-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intel's SoCs follow a naming convention which spells out the SoC name as two words instead of one word (E.g: Cannon Lake vs Cannonlake). Thus fix the naming inconsistency across the intel_pmc_core driver, so future SoCs can follow the naming consistency as below. Cometlake -> Comet Lake Tigerlake -> Tiger Lake Elkhartlake -> Elkhart Lake Cc: Mario Limonciello <mario.limonciello@dell.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Kan Liang <kan.liang@intel.com> Cc: David E. Box <david.e.box@intel.com> Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com> Cc: Tony Luck <tony.luck@intel.com> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/mellanox: Fix Kconfig indentationKrzysztof Kozlowski2019-11-211-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: touchscreen_dmi: Add info for the ezpad 6 m4 tabletHans de Goede2019-11-181-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add touchscreen info for the Jumper EZpad 6 m4 tablet. Reported-and-tested-by: youling257 <youling257@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | Add touchscreen platform data for the Schneider SCT101CTM tabletDaniel Gorbea Ainz2019-10-271-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add touchscreen platform data for the Schneider SCT101CTM tablet Signed-off-by: Daniel Gorbea <danielgorbea@hotmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: intel_int0002_vgpio: Pass irqchip when adding gpiochipLinus Walleij2019-10-271-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. This driver requests the IRQ directly in the driver so it needs to pass a NULL parent handler. We may revisit this code later and pull reqular shared IRQ handler into gpiolib, so leave a FIXME. Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: intel_punit_ipc: Drop useless labelAndy Shevchenko2019-10-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to have a label to return an error code in one case. Moreover the other places in the same function do not utilize that label. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: intel_punit_ipc: use devm_platform_ioremap_resource() to ↵Andy Shevchenko2019-10-271-29/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: huawei-wmi: Remove unnecessary battery mutexAyman Bagabas2019-10-211-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | battery_lock mutex is never used and not needed. Fixes: 355a070b09ab ("platform/x86: huawei-wmi: Add battery charging thresholds") Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: huawei-wmi: No need to check for battery nameAyman Bagabas2019-10-211-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No need to check for battery name, we already check if the WMI function is available in huawei_wmi_battery_setup. Fixes: 355a070b09ab ("platform/x86: huawei-wmi: Add battery charging thresholds") Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: huawei-wmi: Stricter battery thresholds setAyman Bagabas2019-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check if battery thresholds are within 0 and 100. Fixes: 355a070b09ab ("platform/x86: huawei-wmi: Add battery charging thresholds") Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | treewide: Rename Peter Feuerer to Peter KaestlePeter Kaestle2019-10-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename Peter Feuerer to Peter Kaestle. Cc: Darren Hart <dvhart@infradead.org> Cc: Andy Shevchenko <andy@infradead.org> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Peter Kaestle <peter@piie.net> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: acerhdf: Add support for Acer Aspire 7551Peter Feuerer2019-10-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for Acer Aspire 7551. Cc: Darren Hart <dvhart@infradead.org> Cc: Andy Shevchenko <andy@infradead.org> Signed-off-by: Peter Feuerer <peter@piie.net> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: Add System76 ACPI driverJeremy Soller2019-10-153-0/+398
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add System76 ACPI driver, which adds support for Fn-Fx key combinations, keyboard backlight, and airplane mode LEDs on System76 laptops running open source firmware. Signed-off-by: Jeremy Soller <jeremy@system76.com> Cc: platform-driver-x86@vger.kernel.org Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: huawei-wmi: Fix a precision vs width printf bugDan Carpenter2019-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was supposed to be precision "%.*s" instead of width "%*s". It's possible that this results in printing beyond the end of the string. Fixes: a970b95345ab ("platform/x86: huawei-wmi: Add debugfs support") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: huawei-wmi: Avoid use of global variable when possibleAndy Shevchenko2019-10-151-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to access global variable directly when we may derive it through other means. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: huawei-wmi: No need to keep pointer to platform deviceAndy Shevchenko2019-10-151-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to keep a pointer to the platform device. Currently there are no users of it directly, and if there will be in the future we may restore it from pointer to the struct device. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: huawei-wmi: Don't leak memory on the exitAndy Shevchenko2019-10-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have to clean memory resources allocated during init. Fixes: 7532afb35012 ("platform/x86: huawei-wmi: Move to platform driver") Cc: Ayman Bagabas <ayman.bagabas@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: huawei-wmi: huawei_wmi can be statickbuild test robot2019-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: 7532afb35012 ("platform/x86: huawei-wmi: Move to platform driver") Signed-off-by: kbuild test robot <lkp@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/x86: i2c-multi-instantiate: Fail the probe if no IRQ providedAndy Shevchenko2019-10-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For APIC case of interrupt we don't fail a ->probe() of the driver, which makes kernel to print a lot of warnings from the children. We have two options here: - switch to platform_get_irq_optional(), though it won't stop children to be probed and failed - fail the ->probe() of i2c-multi-instantiate Since the in reality we never had devices in the wild where IRQ resource is optional, the latter solution suits the best. Fixes: 799d3379a672 ("platform/x86: i2c-multi-instantiate: Introduce IOAPIC IRQ support") Reported-by: Ammy Yi <ammy.yi@intel.com> Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
| * | | platform/x86: intel_punit_ipc: Avoid error message when retrieving IRQAndy Shevchenko2019-10-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the commit 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") the platform_get_irq() started issuing an error message which is not what we want here. Switch to platform_get_irq_optional() to have only warning message provided by the driver. Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | | platform/mellanox: Add bootctl driver for Mellanox BlueField SocLiming Sun2019-10-154-0/+437
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the bootctl platform driver for Mellanox BlueField Soc, which queries secure state and controls the eMMC boot partition swapping by sending SMC calls to ATF running at EL3. Below are the sequences of typical use case. 1. User requests boot partition swapping, which could be on-demand or during boot-image upgrade via UEFI capsule; 2. This bootctl driver handles the request and sends SMC call to ATF. ATF programs register BREADCRUMB0 which has value preserved during warm reset. It also programs eMMC to swap the boot partition; 3. After software reset (rebooting), ATF BL1 (BootRom) checks register BREADCRUMB0 and enable watchdog if configured; 4. If booting fails, the watchdog timer will trigger rebooting. In such case, ATF Boot ROM will switch the boot partition back to the previous one. This is a robust feature and used to prevent failure during boot partition upgrade. Reviewed-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Liming Sun <lsun@mellanox.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>