summaryrefslogtreecommitdiffstats
path: root/Documentation/numastat.txt
Commit message (Expand)AuthorAgeFilesLines
* Linux-2.6.12-rc2Linus Torvalds2005-04-171-0/+22
| | | | | | | One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct gpio_keys_polled_dev { ... struct gpio_keys_button_data data[0]; }; size = sizeof(struct gpio_keys_polled_dev) + count * sizeof(struct gpio_keys_button_data); instance = devm_kzalloc(dev, size, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = devm_kzalloc(dev, struct_size(instance, data, count), GFP_KERNEL); Notice that, in this case, variable size is not necessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * Input: tca8418 - remove set but not used variable 'max_keys'YueHaibing2019-05-281-2/+1Star | | | | | | | | | | | | | Fixes gcc '-Wunused-but-set-variable' warning: drivers/input/keyboard/tca8418_keypad.c: In function tca8418_keypad_probe: drivers/input/keyboard/tca8418_keypad.c:269:24: warning: variable max_keys set but not used [-Wunused-but-set-variable] It's not used since commit 16ff7cb1848a ("Input: tca8418-keypad - switch to using managed resources") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * Input: synaptics-rmi4 - remove set but not used variable 'sensor_flags'YueHaibing2019-05-281-4/+2Star | | | | | | | | | | | | | Fixes gcc '-Wunused-but-set-variable' warning: drivers/input/rmi4/rmi_f12.c: In function rmi_f12_read_sensor_tuning: drivers/input/rmi4/rmi_f12.c:76:6: warning: variable sensor_flags set but not used [-Wunused-but-set-variable] It's not used since introduction in commit b43d2c1e9353 ("Input: synaptics-rmi4 - add support for F12") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * Input: elantech - remove P52 and P72 from SMBus blacklistBenjamin Tissoires2019-05-281-4/+0Star | | | | | | | | Both now works correctly over SMBus. Let's use this driver so we can update all five fingers every 8ms. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * Input: elan_i2c - handle physical middle buttonBenjamin Tissoires2019-05-281-4/+12 | | | | | | | Some models have a middle button, we should export it as well. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * Input: elantech/SMBus - export all capabilities from the PS/2 nodeBenjamin Tissoires2019-05-282-5/+44 | | | | | | | | | | | | | | | | The recent touchpads might not have all the information regarding the characteristics through the I2C port. On some Lenovo t480s, this results in the touchpad not being detected as a clickpad, and on the Lenovo P52, this results in a failure while fetching the resolution through I2C. We need to imitate the Windows behavior: fetch the data under PS/2, and limit the querries under I2C. This patch prepares this by exporting the info from PS/2. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * Input: elan_i2c - do not query the info if they are providedBenjamin Tissoires2019-05-281-12/+44 | | | | | | | | | | See the previous patch for a long explanation. TL;DR: the P52 and the t480s from Lenovo can't rely on I2C to fetch the information, so we need it from PS/2. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * dt-bindings: add more optional properties for elan_i2c touchpadsBenjamin Tissoires2019-05-281-0/+11 | | | | | | | | | | Some new touchpads IC are connected through PS/2 and I2C. On some of these new IC, the I2C part doesn't have all of the information available. We need to be able to forward the touchpad parameters from PS/2 and thus, we need those new optional properties. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * Input: elantech - detect middle button based on firmware versionBenjamin Tissoires2019-05-282-12/+7Star | | | | | | | | | | | | | | Looks like the new generation of Lenovo machine also need to be added to the PnPID whitelist. This is definitively not going to scale, as there is nothing that tells us currently if a touchpad supports a true physical middle button. Consider that all new touchpads that are not clickpads (so matching ETP_NEW_IC_SMBUS_HOST_NOTIFY) are handling 3 physical buttons. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * Input: elantech - add helper function elantech_is_buttonpad()Benjamin Tissoires2019-05-281-44/+49 | | | | | | | | We check for this bit all over the code, better have it defined once for all. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * Input: elantech - query the min/max information beforehand tooBenjamin Tissoires2019-05-282-86/+79Star | | | | | | | | | | For the latest generation of Elantech touchpads, we need to forward the min/max information from PS/2 to SMBus. Prepare this work by fetching the information before creating the SMBus companion device. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * Merge branch 'for-linus' into nextDmitry Torokhov2019-05-284-2/+25 |\ | | | | | | | | Sync up with 'for-linus' branch to avoid merge conflicts with following patches to Elan touchpad drivers. | * Input: uinput - add compat ioctl number translation for UI_*_FF_UPLOADAndrey Smirnov2019-05-231-2/+20 | | | | | | | | | | | | | | | | | | | | | | | | In the case of compat syscall ioctl numbers for UI_BEGIN_FF_UPLOAD and UI_END_FF_UPLOAD need to be adjusted before being passed on uinput_ioctl_handler() since code built with -m32 will be passing slightly different values. Extend the code already covering UI_SET_PHYS to cover UI_BEGIN_FF_UPLOAD and UI_END_FF_UPLOAD as well. Reported-by: Pierre-Loup A. Griffais <pgriffais@valvesoftware.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> | * Input: silead - add MSSL0017 to acpi_device_idDaniel Smith2019-05-231-0/+1 | | | | | | | | | | | | | | | | On Chuwi Hi10 Plus, the Silead device id is MSSL0017. Signed-off-by: Daniel Smith <danct12@disroot.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> | * Input: elantech - enable middle button support on 2 ThinkPadsAaron Ma2019-05-211-0/+2 | | | | | | | | | | | | | | Adding 2 new touchpad PNPIDs to enable middle button support. Signed-off-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> | * Input: elan_i2c - increment wakeup count if wake sourceRavi Chandra Sadineni2019-05-161-0/+2 | | | | | | | | | | | | | | | | | | Notify the PM core that this device is the wake source. This helps userspace daemon tracking the wake sources to identify the origin of the wake. Signed-off-by: Ravi Chandra Sadineni <ravisadineni@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> | * Merge branch 'next' into for-linusDmitry Torokhov2019-05-1030-74/+2297 | |\ | | | | | | | | | Prepare input updates for 5.2 merge window. * | | Input: iqs5xx - remove redundant dev_set_drvdata callAxel Lin2019-05-231-2/+0Star | | | | | | | | | | | | | | | | | | | | | | | | Calling i2c_set_clientdata() is enough. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Jeff LaBundy <jeff@labundy.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * | | Input: imx6ul_tsc - use devm_platform_ioremap_resource() to simplify codeAnson Huang2019-05-211-6/+2Star | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new helper devm_platform_ioremap_resource() which wraps the platform_get_resource() and devm_ioremap_resource() together, to simplify the code. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * | | Input: imx_keypad - use devm_platform_ioremap_resource() to simplify codeAnson Huang2019-05-211-3/+1Star | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new helper devm_platform_ioremap_resource() which wraps the platform_get_resource() and devm_ioremap_resource() together, to simplify the code. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * | | Input: da9063_onkey - convert header to SPDXWolfram Sang2019-05-211-10/+1Star | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the header of the source file to SPDX. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Acked-by: Steve Twiss <stwiss.opensource@diasemi.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * | | Input: da9063_onkey - remove platform_data supportWolfram Sang2019-05-211-9/+2Star | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are no in-kernel users anymore, so remove this outdated interface. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Acked-by: Steve Twiss <stwiss.opensource@diasemi.com> Tested-by: Steve Twiss <stwiss.opensource@diasemi.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * | | Input: eeti_ts - read hardware state once after wakeupDaniel Mack2019-05-161-15/+56 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For systems in which the touch IRQ is acting as wakeup source, and that do not support level-driven interrupts, the interrupt controller might not latch the GPIO IRQ during sleep. In such cases, the interrupt will never occur again after resume, hence the touch screen appears dead. To fix this, check for the assertion of the attn gpio, and read form the controller once in the resume path to read the hardware status and to arm the IRQ again. Introduce a mutex to guard eeti_ts_read() against parallel invocations from different contexts. Signed-off-by: Daniel Mack <daniel@zonque.org> Reported-by: Sven Neumann <Sven.Neumann@teufel.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> * | | Merge tag 'ib-mfd-gpio-input-leds-power-v5.2' of ↵Dmitry Torokhov2019-05-1022-0/+1349 |\ \ \ | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into next Sync up with MFD tree to bring in MAX77650 PMIC driver. | * | | MAINTAINERS: Add an entry for MAX77650 PMIC driverBartosz Golaszewski2019-05-081-0/+14 | | | | | | | | | | | | | | | | | | | | | | | | | | | | I plan on extending this set of drivers so add myself as maintainer. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> | * | | input: max77650: Add onkey supportBartosz Golaszewski2019-05-083-0/+131 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the push- and slide-button events for max77650. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Lee Jones <lee.jones@linaro.org> | * | | leds: max77650: Add LEDs supportBartosz Golaszewski2019-05-083-0/+154 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds basic support for LEDs for the max77650 PMIC. The device has three current sinks for driving LEDs. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Lee Jones <lee.jones@linaro.org> | * | | gpio: max77650: Add GPIO supportBartosz Golaszewski2019-05-083-0/+198 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add GPIO support for max77650 mfd device. This PMIC exposes a single GPIO line. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> | * | | power: supply: max77650: Add support for battery chargerBartosz Golaszewski2019-05-083-0/+376 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add basic support for the battery charger for max77650 PMIC. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> | * | | mfd: Add new driver for MAX77650 PMICBartosz Golaszewski2019-05-084-0/+306 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the core MFD driver for max77650 PMIC. We define five sub-devices for which the drivers will be added in subsequent patches. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> | * | | mfd: mfd-core: Document mfd_add_devices()Bartosz Golaszewski2019-05-081-0/+13 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a kernel doc for mfd_add_devices(). Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Lee Jones <lee.jones@linaro.org> | * | | dt-bindings: input: Add DT bindings for max77650Bartosz Golaszewski2019-05-081-0/+26 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the DT binding document for the onkey module of max77650. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> | * | | dt-bindings: leds: Add DT bindings for max77650Bartosz Golaszewski2019-05-081-0/+57 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the DT binding document for the LEDs module of max77650. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Lee Jones <lee.jones@linaro.org> | * | | dt-bindings: power: supply: Add DT bindings for max77650Bartosz Golaszewski2019-05-081-0/+28 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the DT binding document for the battery charger module of max77650. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> | * | | dt-bindings: mfd: Add DT bindings for max77650Bartosz Golaszewski2019-05-081-0/+46 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a DT binding document for max77650 ultra-low power PMIC. This describes the core mfd device and the GPIO module. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Lee Jones <lee.jones@linaro.org> * | | | Merge tag 'v5.1' into nextDmitry Torokhov2019-05-10