Linux Input/HID development
 help / color / mirror / Atom feed
* Re: [PATCH v2] drm/bridge: sil_sii8620: make remote control optional.
From: Andrzej Hajda @ 2019-03-04  7:13 UTC (permalink / raw)
  To: Inki Dae, Laurent Pinchart, Dmitry Torokhov, Lukas Wunner,
	dri-devel, linux-input, linux-kernel
In-Reply-To: <20190304021325.GA30785@innovation.ch>

On 04.03.2019 03:13, Life is hard, and then you die wrote:
> On Thu, Jan 24, 2019 at 05:33:55PM -0800, Ronald Tschalär wrote:
>> commit d6abe6df706c (drm/bridge: sil_sii8620: do not have a dependency
>> of RC_CORE) changed the driver to select both RC_CORE and INPUT.
>> However, this causes problems with other drivers, in particular an input
>> driver that depends on MFD_INTEL_LPSS_PCI (to be added in a separate
>> commit):
>>
>>   drivers/clk/Kconfig:9:error: recursive dependency detected!
>>   drivers/clk/Kconfig:9:        symbol COMMON_CLK is selected by MFD_INTEL_LPSS
>>   drivers/mfd/Kconfig:566:      symbol MFD_INTEL_LPSS is selected by MFD_INTEL_LPSS_PCI
>>   drivers/mfd/Kconfig:580:      symbol MFD_INTEL_LPSS_PCI is implied by KEYBOARD_APPLESPI
>>   drivers/input/keyboard/Kconfig:73:    symbol KEYBOARD_APPLESPI depends on INPUT
>>   drivers/input/Kconfig:8:      symbol INPUT is selected by DRM_SIL_SII8620
>>   drivers/gpu/drm/bridge/Kconfig:83:    symbol DRM_SIL_SII8620 depends on DRM_BRIDGE
>>   drivers/gpu/drm/bridge/Kconfig:1:     symbol DRM_BRIDGE is selected by DRM_PL111
>>   drivers/gpu/drm/pl111/Kconfig:1:      symbol DRM_PL111 depends on COMMON_CLK
>>
>> According to the docs and general consensus, select should only be used
>> for non user-visible symbols, but both RC_CORE and INPUT are
>> user-visible. Furthermore almost all other references to INPUT
>> throughout the kernel config are depends, not selects. For this reason
>> the first part of this change reverts commit d6abe6df706c.
>>
>> In order to address the original reason for commit d6abe6df706c, namely
>> that not all boards use the remote controller functionality and hence
>> should not need have to deal with RC_CORE, the second part of this
>> change now makes the remote control support in the driver optional and
>> contingent on RC_CORE being defined. And with this the hard dependency
>> on INPUT also goes away as that is only needed if RC_CORE is defined
>> (which in turn already depends on INPUT).
>>
>> CC: Inki Dae <inki.dae@samsung.com>
>> CC: Andrzej Hajda <a.hajda@samsung.com>
>> CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>> Signed-off-by: Ronald Tschalär <ronald@innovation.ch>
>> ---
>> Resending this, as I somehow managed to forget to cc dri-devel.
>> Apologies for the duplication.
>>
>> Changes in v2:
>>  - completely remove dependencies on both RC_CORE and INPUT in Kconfig,
>>  - make remote control functionality in driver contingent on RC_CORE
>>    being defined
>>
>>  drivers/gpu/drm/bridge/Kconfig       |  2 --
>>  drivers/gpu/drm/bridge/sil-sii8620.c | 17 +++++++++++++++++
>>  2 files changed, 17 insertions(+), 2 deletions(-)
> [snip]
>
> Is there anything I can do to help get this reviewed and moved forward?


Addressing my comments [1] ? :)

Ah I see, for some reasons (my mistake apparently) my response was not
sent to you, sorry.

[1]: https://lkml.org/lkml/2019/1/28/258


Regards

Andrzej


>
>
>   Cheers,
>
>   Ronald
>
>
>

^ permalink raw reply

* [PATCH] HID: hid-asus: select CONFIG_POWER_SUPPLY
From: Arnd Bergmann @ 2019-03-04 19:54 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires
  Cc: NOGUCHI Hiroshi, Arnd Bergmann, linux-input, linux-kernel

The newly added power supply code fails to link when the power supply core
code is disabled:

drivers/hid/hid-asus.o: In function `asus_battery_get_property':
hid-asus.c:(.text+0x11de): undefined reference to `power_supply_get_drvdata'
drivers/hid/hid-asus.o: In function `asus_probe':
hid-asus.c:(.text+0x170c): undefined reference to `devm_power_supply_register'
hid-asus.c:(.text+0x1734): undefined reference to `power_supply_powers'
drivers/hid/hid-asus.o: In function `asus_raw_event':
hid-asus.c:(.text+0x1914): undefined reference to `power_supply_changed'

Select the subsystem from Kconfig as we do for other hid drivers already.

Fixes: 6311d329e12a ("HID: hid-asus: Add BT keyboard dock battery monitoring support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 6ca8d322b487..4ca0cdfa6b33 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -150,6 +150,7 @@ config HID_ASUS
 	tristate "Asus"
 	depends on LEDS_CLASS
 	depends on ASUS_WMI || ASUS_WMI=n
+	select POWER_SUPPLY
 	---help---
 	Support for Asus notebook built-in keyboard and touchpad via i2c, and
 	the Asus Republic of Gamers laptop keyboard special keys.
-- 
2.20.0

^ permalink raw reply related

* [PATCH] Input: msm-vibrator: use correct gpio header
From: Arnd Bergmann @ 2019-03-04 19:56 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Arnd Bergmann, Brian Masney, linux-input, linux-kernel

When CONFIG_GPIOLIB is not set, we get a couple of build
errors during test building:

drivers/input/misc/msm-vibrator.c: In function 'msm_vibrator_start':
drivers/input/misc/msm-vibrator.c:79:3: error: implicit declaration of function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_cansleep'? [-Werror=implicit-function-declaration]
   gpiod_set_value_cansleep(vibrator->enable_gpio, 1);
   ^~~~~~~~~~~~~~~~~~~~~~~~
   gpio_set_value_cansleep
drivers/input/misc/msm-vibrator.c: In function 'msm_vibrator_probe':
drivers/input/misc/msm-vibrator.c:176:26: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'devm_gpio_free'? [-Werror=implicit-function-declaration]
  vibrator->enable_gpio = devm_gpiod_get(&pdev->dev, "enable",
                          ^~~~~~~~~~~~~~
                          devm_gpio_free
drivers/input/misc/msm-vibrator.c:177:13: error: 'GPIOD_OUT_LOW' undeclared (first use in this function); did you mean 'GPIOF_INIT_LOW'?
             GPIOD_OUT_LOW);
             ^~~~~~~~~~~~~
             GPIOF_INIT_LOW
drivers/input/misc/msm-vibrator.c:177:13: note: each undeclared identifier is reported only once for each function it appears in

This is easy to avoid when we use gpio/consumer.h as the documented interface.

Fixes: 0f681d09e66e ("Input: add new vibrator driver for various MSM SOCs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/input/misc/msm-vibrator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/misc/msm-vibrator.c b/drivers/input/misc/msm-vibrator.c
index 69f2579c4ec2..b60f1aaee705 100644
--- a/drivers/input/misc/msm-vibrator.c
+++ b/drivers/input/misc/msm-vibrator.c
@@ -13,7 +13,7 @@
 
 #include <linux/clk.h>
 #include <linux/err.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/input.h>
 #include <linux/io.h>
 #include <linux/module.h>
-- 
2.20.0

^ permalink raw reply related

* [PATCH] Input: raspberrypi-ts: select CONFIG_INPUT_POLLDEV
From: Arnd Bergmann @ 2019-03-04 19:57 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Arnd Bergmann, Zhu Yi, Nicolas Saenz Julienne, linux-input,
	linux-kernel

When CONFIG_INPUT_POLLDEV is disabled, we get a link error:

drivers/input/touchscreen/raspberrypi-ts.o: In function `rpi_ts_probe':
raspberrypi-ts.c:(.text+0xec): undefined reference to `devm_input_allocate_polled_device'
raspberrypi-ts.c:(.text+0xec): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `devm_input_allocate_polled_device'
raspberrypi-ts.c:(.text+0x19c): undefined reference to `input_register_polled_device'
raspberrypi-ts.c:(.text+0x19c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `input_register_polled_device'

Select that symbol like we do from the other similar drivers.

Fixes: 0b9f28fed3f7 ("Input: add official Raspberry Pi's touchscreen driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/input/touchscreen/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 7c597a49c265..7a4884ad198b 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -699,6 +699,7 @@ config TOUCHSCREEN_EDT_FT5X06
 config TOUCHSCREEN_RASPBERRYPI_FW
 	tristate "Raspberry Pi's firmware base touch screen support"
 	depends on RASPBERRYPI_FIRMWARE || (RASPBERRYPI_FIRMWARE=n && COMPILE_TEST)
+	select INPUT_POLLDEV
 	help
 	  Say Y here if you have the official Raspberry Pi 7 inch screen on
 	  your system.
-- 
2.20.0

^ permalink raw reply related

* Re: [PATCH] Input: msm-vibrator: use correct gpio header
From: Linus Walleij @ 2019-03-05  7:49 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Dmitry Torokhov, Brian Masney, Linux Input,
	linux-kernel@vger.kernel.org
In-Reply-To: <20190304195734.1070109-1-arnd@arndb.de>

On Mon, Mar 4, 2019 at 8:57 PM Arnd Bergmann <arnd@arndb.de> wrote:

> When CONFIG_GPIOLIB is not set, we get a couple of build
> errors during test building:
>
> drivers/input/misc/msm-vibrator.c: In function 'msm_vibrator_start':
> drivers/input/misc/msm-vibrator.c:79:3: error: implicit declaration of function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_cansleep'? [-Werror=implicit-function-declaration]
>    gpiod_set_value_cansleep(vibrator->enable_gpio, 1);
>    ^~~~~~~~~~~~~~~~~~~~~~~~
>    gpio_set_value_cansleep
> drivers/input/misc/msm-vibrator.c: In function 'msm_vibrator_probe':
> drivers/input/misc/msm-vibrator.c:176:26: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'devm_gpio_free'? [-Werror=implicit-function-declaration]
>   vibrator->enable_gpio = devm_gpiod_get(&pdev->dev, "enable",
>                           ^~~~~~~~~~~~~~
>                           devm_gpio_free
> drivers/input/misc/msm-vibrator.c:177:13: error: 'GPIOD_OUT_LOW' undeclared (first use in this function); did you mean 'GPIOF_INIT_LOW'?
>              GPIOD_OUT_LOW);
>              ^~~~~~~~~~~~~
>              GPIOF_INIT_LOW
> drivers/input/misc/msm-vibrator.c:177:13: note: each undeclared identifier is reported only once for each function it appears in
>
> This is easy to avoid when we use gpio/consumer.h as the documented interface.
>
> Fixes: 0f681d09e66e ("Input: add new vibrator driver for various MSM SOCs")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply

* Re: [PATCH] Input: raspberrypi-ts: select CONFIG_INPUT_POLLDEV
From: Nicolas Saenz Julienne @ 2019-03-05 10:39 UTC (permalink / raw)
  To: Arnd Bergmann, Dmitry Torokhov; +Cc: Zhu Yi, linux-input, linux-kernel
In-Reply-To: <20190304195845.1096214-1-arnd@arndb.de>

[-- Attachment #1: Type: text/plain, Size: 1647 bytes --]

On Mon, 2019-03-04 at 20:57 +0100, Arnd Bergmann wrote:
> When CONFIG_INPUT_POLLDEV is disabled, we get a link error:
> 
> drivers/input/touchscreen/raspberrypi-ts.o: In function `rpi_ts_probe':
> raspberrypi-ts.c:(.text+0xec): undefined reference to
> `devm_input_allocate_polled_device'
> raspberrypi-ts.c:(.text+0xec): relocation truncated to fit: R_AARCH64_CALL26
> against undefined symbol `devm_input_allocate_polled_device'
> raspberrypi-ts.c:(.text+0x19c): undefined reference to
> `input_register_polled_device'
> raspberrypi-ts.c:(.text+0x19c): relocation truncated to fit: R_AARCH64_CALL26
> against undefined symbol `input_register_polled_device'
> 
> Select that symbol like we do from the other similar drivers.
> 
> Fixes: 0b9f28fed3f7 ("Input: add official Raspberry Pi's touchscreen driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/input/touchscreen/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/input/touchscreen/Kconfig
> b/drivers/input/touchscreen/Kconfig
> index 7c597a49c265..7a4884ad198b 100644
> --- a/drivers/input/touchscreen/Kconfig
> +++ b/drivers/input/touchscreen/Kconfig
> @@ -699,6 +699,7 @@ config TOUCHSCREEN_EDT_FT5X06
>  config TOUCHSCREEN_RASPBERRYPI_FW
>  	tristate "Raspberry Pi's firmware base touch screen support"
>  	depends on RASPBERRYPI_FIRMWARE || (RASPBERRYPI_FIRMWARE=n &&
> COMPILE_TEST)
> +	select INPUT_POLLDEV
>  	help
>  	  Say Y here if you have the official Raspberry Pi 7 inch screen on
>  	  your system.

Thanks!
Looks good to me.

Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply

* Re: [PATCH v2] platform/x86: touchscreen_dmi: Add info for the CHUWI Hi10 Air tablet
From: Andy Shevchenko @ 2019-03-05 13:42 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Christian Oder, Andy Shevchenko, Darren Hart, linux-input,
	Linux Kernel Mailing List, Platform Driver
In-Reply-To: <f4937ec1-9dac-0810-7386-a15ec5d306ae@redhat.com>

On Sun, Mar 3, 2019 at 3:59 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Hi Christian,
>
> On 03-03-19 14:47, Christian Oder wrote:
> > Add  touchscreen info for the CHUWUI Hi10 Air tablet.
> >
> > Signed-off-by: Christian Oder <me@myself5.de>
> > Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Pushed to my review and testing queue, thanks!

> > ---
> > Changes in v2:
> > - added review tag
>
> A quick note for any patches you may submit in the future, there
> is no need to send a v2 just to add someones Reviewed-by or Acked-by,
> these will be picked up automatically by the subsys-maintainer when
> they add the patch to their tree.
>
> Regards,
>
> Hans
>
> >
> >   drivers/platform/x86/touchscreen_dmi.c | 27 ++++++++++++++++++++++++++
> >   1 file changed, 27 insertions(+)
> >
> > diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
> > index 167a156e3cc7..2d56ff7c8230 100644
> > --- a/drivers/platform/x86/touchscreen_dmi.c
> > +++ b/drivers/platform/x86/touchscreen_dmi.c
> > @@ -72,6 +72,25 @@ static const struct ts_dmi_data chuwi_hi8_pro_data = {
> >       .properties     = chuwi_hi8_pro_props,
> >   };
> >
> > +static const struct property_entry chuwi_hi10_air_props[] = {
> > +     PROPERTY_ENTRY_U32("touchscreen-size-x", 1981),
> > +     PROPERTY_ENTRY_U32("touchscreen-size-y", 1271),
> > +     PROPERTY_ENTRY_U32("touchscreen-min-x", 99),
> > +     PROPERTY_ENTRY_U32("touchscreen-min-y", 9),
> > +     PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
> > +     PROPERTY_ENTRY_U32("touchscreen-fuzz-x", 5),
> > +     PROPERTY_ENTRY_U32("touchscreen-fuzz-y", 4),
> > +     PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10-air.fw"),
> > +     PROPERTY_ENTRY_U32("silead,max-fingers", 10),
> > +     PROPERTY_ENTRY_BOOL("silead,home-button"),
> > +     { }
> > +};
> > +
> > +static const struct ts_dmi_data chuwi_hi10_air_data = {
> > +     .acpi_name      = "MSSL1680:00",
> > +     .properties     = chuwi_hi10_air_props,
> > +};
> > +
> >   static const struct property_entry chuwi_vi8_props[] = {
> >       PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
> >       PROPERTY_ENTRY_U32("touchscreen-min-y", 6),
> > @@ -546,6 +565,14 @@ static const struct dmi_system_id touchscreen_dmi_table[] = {
> >                       DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
> >               },
> >       },
> > +     {
> > +             /* Chuwi Hi10 Air */
> > +             .driver_data = (void *)&chuwi_hi10_air_data,
> > +             .matches = {
> > +                     DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
> > +                     DMI_MATCH(DMI_PRODUCT_SKU, "P1W6_C109D_B"),
> > +             },
> > +     },
> >       {
> >               /* Chuwi Vi8 (CWI506) */
> >               .driver_data = (void *)&chuwi_vi8_data,
> >



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply

* Intel ISH doesn't generate IRQ
From: Kai-Heng Feng @ 2019-03-06  8:02 UTC (permalink / raw)
  To: Srinivas Pandruvada
  Cc: hong.liu, hongyan.song, open list:HID CORE LAYER, linux-kernel

Hi,

This is an old issue filed at [1].

Few days ago I noticed there’s a new commit 74fbc7d371d9 ("HID:  
intel-ish-hid: add MSI interrupt support”) that may solve the problem.
Unfortunately it the device in question doesn’t support MSI and MSI-X, so  
the commit doesn’t make any difference.

Please let me know what additional information I can provide.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=200775

Kai-Heng

^ permalink raw reply

* [PATCH] drivers: input: keyboard: Kconfig: formatting cleanup
From: Enrico Weigelt, metux IT consult @ 2019-03-06 15:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: dmitry.torokhov, linux-input

Formatting of Kconfig files doesn't look so pretty, so just
take damp cloth and clean it up.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/input/keyboard/Kconfig | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index a878351..ef39f5c 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -138,14 +138,14 @@ config KEYBOARD_ATKBD_RDI_KEYCODES
 	  left-hand column.
 
 config KEYBOARD_QT1070
-       tristate "Atmel AT42QT1070 Touch Sensor Chip"
-       depends on I2C
-       help
-         Say Y here if you want to use Atmel AT42QT1070 QTouch
-         Sensor chip as input device.
-
-         To compile this driver as a module, choose M here:
-         the module will be called qt1070
+	tristate "Atmel AT42QT1070 Touch Sensor Chip"
+	depends on I2C
+	help
+	  Say Y here if you want to use Atmel AT42QT1070 QTouch
+	  Sensor chip as input device.
+
+	  To compile this driver as a module, choose M here:
+	  the module will be called qt1070
 
 config KEYBOARD_QT2160
 	tristate "Atmel AT42QT2160 Touch Sensor Chip"
-- 
1.9.1

^ permalink raw reply related

* Re: [PATCH v6 0/4] input: touchscreen: Add goodix GT5553 CTP support
From: Jagan Teki @ 2019-03-06 17:17 UTC (permalink / raw)
  To: Dmitry Torokhov, Bastien Nocera, Rob Herring
  Cc: Henrik Rydberg, linux-input, linux-kernel, devicetree,
	Mark Rutland, linux-amarula, Michael Trimarchi
In-Reply-To: <CAMty3ZDpy5YX3V+6e=UtY=a9Lgiw-NEP1JPQn4_LKL3mYFtrvQ@mail.gmail.com>

Hi Dmitry,

On Tue, Feb 26, 2019 at 11:43 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> Hi Dmitry,
>
> On Tue, Feb 19, 2019 at 3:46 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
> >
> > This is v6 patchset for supporting goodix GT5553 CTP. Here is the
> > previous version[1]
> >
> > Changes for v5:
> > - document bindings for required regulators, which are need during
> >   power-on sequence
> > - enable, disable required regulators as described in power-on sequence
> >   using normal regulator calls
> > - update the proper commi messages
> > Changes for v4:
> > - document AVDD22, DVDD12, VDDIO as optional properties
> > - use regulator bulk calls, for get, enable and disable functionalities
> > Changes for v4:
> > - devm_add_action_or_reset for disabling regulator
> > Changes for v3:
> > - add cover-letter
> > - s/ADVV28/AVDD28 on commit head
> > - fix few typo
> > Changes for v2:
> > - Rename vcc-supply with AVDD28-supply
> > - disable regulator in remove
> > - fix to setup regulator in probe code
> > - add chipdata
> > - drop example node in dt-bindings
> >
> > [1] https://patchwork.kernel.org/cover/10816901/
> >
> > Jagan Teki (4):
> >   dt-bindings: input: touchscreen: goodix: Document regulator properties
> >   Input: goodix - Add regulators suppot
> >   dt-bindings: input: touchscreen: goodix: Add GT5663 compatible
> >   Input: goodix - Add GT5663 CTP support
> >
> >  .../bindings/input/touchscreen/goodix.txt     |  3 +
> >  drivers/input/touchscreen/goodix.c            | 60 +++++++++++++++++++
> >  2 files changed, 63 insertions(+)
>
> Let me know if you have any further comments on regulator patch, fyi
> Rob reviewed it already.

Would you comment on this? few dts changes are pending for this to support.

Jagan.

^ permalink raw reply

* [PATCH] drivers: input: Kconfig: pedantic claenups
From: Enrico Weigelt, metux IT consult @ 2019-03-06 18:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: dmitry.torokhov, linux-input

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/input/misc/Kconfig        | 26 +++++++++++++-------------
 drivers/input/mouse/Kconfig       | 26 +++++++++++++-------------
 drivers/input/serio/Kconfig       |  2 +-
 drivers/input/tablet/Kconfig      | 20 ++++++++++----------
 drivers/input/touchscreen/Kconfig |  2 +-
 5 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index ca59a2b..0ffafc0 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -240,13 +240,13 @@ config INPUT_APANEL
 	select INPUT_POLLDEV
 	select CHECK_SIGNATURE
 	help
-	 Say Y here for support of the Application Panel buttons, used on
-	 Fujitsu Lifebook. These are attached to the mainboard through
-	 an SMBus interface managed by the I2C Intel ICH (i801) driver,
-	 which you should also build for this kernel.
+	  Say Y here for support of the Application Panel buttons, used on
+	  Fujitsu Lifebook. These are attached to the mainboard through
+	  an SMBus interface managed by the I2C Intel ICH (i801) driver,
+	  which you should also build for this kernel.
 
-	 To compile this driver as a module, choose M here: the module will
-	 be called apanel.
+	  To compile this driver as a module, choose M here: the module will
+	  be called apanel.
 
 config INPUT_GP2A
 	tristate "Sharp GP2AP002A00F I2C Proximity/Opto sensor driver"
@@ -273,12 +273,12 @@ config INPUT_GPIO_DECODER
 	depends on GPIOLIB || COMPILE_TEST
 	select INPUT_POLLDEV
 	help
-	 Say Y here if you want driver to read status of multiple GPIO
-	 lines and report the encoded value as an absolute integer to
-	 input subsystem.
+	  Say Y here if you want driver to read status of multiple GPIO
+	  lines and report the encoded value as an absolute integer to
+	  input subsystem.
 
-	 To compile this driver as a module, choose M here: the module
-	 will be called gpio_decoder.
+	  To compile this driver as a module, choose M here: the module
+	  will be called gpio_decoder.
 
 config INPUT_IXP4XX_BEEPER
 	tristate "IXP4XX Beeper support"
@@ -543,8 +543,8 @@ config INPUT_PCF50633_PMU
 	tristate "PCF50633 PMU events"
 	depends on MFD_PCF50633
 	help
-	 Say Y to include support for delivering  PMU events via  input
-	 layer on NXP PCF50633.
+	  Say Y to include support for delivering  PMU events via  input
+	  layer on NXP PCF50633.
 
 config INPUT_PCF8574
 	tristate "PCF8574 Keypad input device"
diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
index 566a1e3..8b7a7e0 100644
--- a/drivers/input/mouse/Kconfig
+++ b/drivers/input/mouse/Kconfig
@@ -91,14 +91,14 @@ config MOUSE_PS2_SYNAPTICS_SMBUS
 	  If unsure, say Y.
 
 config MOUSE_PS2_CYPRESS
-       bool "Cypress PS/2 mouse protocol extension" if EXPERT
-       default y
-       depends on MOUSE_PS2
-       help
-         Say Y here if you have a Cypress PS/2 Trackpad connected to
-         your system.
+	bool "Cypress PS/2 mouse protocol extension" if EXPERT
+	default y
+	depends on MOUSE_PS2
+	help
+	  Say Y here if you have a Cypress PS/2 Trackpad connected to
+	  your system.
 
-         If unsure, say Y.
+	  If unsure, say Y.
 
 config MOUSE_PS2_LIFEBOOK
 	bool "Fujitsu Lifebook PS/2 mouse protocol extension" if EXPERT
@@ -285,19 +285,19 @@ config MOUSE_ELAN_I2C_I2C
 	depends on MOUSE_ELAN_I2C
 	default y
 	help
-	   Say Y here if Elan Touchpad in your system is connected to
-	   a standard I2C controller.
+	  Say Y here if Elan Touchpad in your system is connected to
+	  a standard I2C controller.
 
-	   If unsure, say Y.
+	  If unsure, say Y.
 
 config MOUSE_ELAN_I2C_SMBUS
 	bool "Enable SMbus support"
 	depends on MOUSE_ELAN_I2C
 	help
-	   Say Y here if Elan Touchpad in your system is connected to
-	   a SMbus adapter.
+	  Say Y here if Elan Touchpad in your system is connected to
+	  a SMbus adapter.
 
-	   If unsure, say Y.
+	  If unsure, say Y.
 
 config MOUSE_INPORT
 	tristate "InPort/MS/ATIXL busmouse"
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig
index c9c7224..b29cb49 100644
--- a/drivers/input/serio/Kconfig
+++ b/drivers/input/serio/Kconfig
@@ -7,7 +7,7 @@ config SERIO
 	help
 	  Say Yes here if you have any input device that uses serial I/O to
 	  communicate with the system. This includes the
-	  		* standard AT keyboard and PS/2 mouse *
+	                * standard AT keyboard and PS/2 mouse *
 	  as well as serial mice, Sun keyboards, some joysticks and 6dof
 	  devices and more.
 
diff --git a/drivers/input/tablet/Kconfig b/drivers/input/tablet/Kconfig
index a2b9f97..df427d1 100644
--- a/drivers/input/tablet/Kconfig
+++ b/drivers/input/tablet/Kconfig
@@ -38,16 +38,16 @@ config TABLET_USB_AIPTEK
 	  module will be called aiptek.
 
 config TABLET_USB_GTCO
-        tristate "GTCO CalComp/InterWrite USB Support"
-        depends on USB && INPUT
-        help
-          Say Y here if you want to use the USB version of the GTCO
-          CalComp/InterWrite Tablet.  Make sure to say Y to "Mouse support"
-          (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
-          (CONFIG_INPUT_EVDEV) as well.
-
-          To compile this driver as a module, choose M here: the
-          module will be called gtco.
+	tristate "GTCO CalComp/InterWrite USB Support"
+	depends on USB && INPUT
+	help
+	  Say Y here if you want to use the USB version of the GTCO
+	  CalComp/InterWrite Tablet.  Make sure to say Y to "Mouse support"
+	  (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
+	  (CONFIG_INPUT_EVDEV) as well.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called gtco.
 
 config TABLET_USB_HANWANG
 	tristate "Hanwang Art Master III tablet support (USB)"
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 068dbbc..11ca597 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -632,7 +632,7 @@ config TOUCHSCREEN_HP600
 	depends on SH_HP6XX && SH_ADC
 	help
 	  Say Y here if you have a HP Jornada 620/660/680/690 and want to
-          support the built-in touchscreen.
+	  support the built-in touchscreen.
 
 	  To compile this driver as a module, choose M here: the
 	  module will be called hp680_ts_input.
-- 
1.9.1

^ permalink raw reply related

* [PATCH v2] drivers: input: Kconfig: pedantic formatting
From: Enrico Weigelt, metux IT consult @ 2019-03-07  1:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: dmitry.torokhov, linux-input
In-Reply-To: <1551898105-17927-1-git-send-email-info@metux.net>

changes v2:
    - squashed the patches into one
    - fixed patch description

--mtx

^ permalink raw reply

* [PATCH v2] drivers: input: Kconfig: pedantic formatting
From: Enrico Weigelt, metux IT consult @ 2019-03-07  1:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: dmitry.torokhov, linux-input
In-Reply-To: <1551923412-7174-1-git-send-email-info@metux.net>

Formatting of Kconfig files doesn't look so pretty, so just
take damp cloth and clean it up.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/input/keyboard/Kconfig    | 16 ++++++++--------
 drivers/input/misc/Kconfig        | 26 +++++++++++++-------------
 drivers/input/mouse/Kconfig       | 26 +++++++++++++-------------
 drivers/input/serio/Kconfig       |  2 +-
 drivers/input/tablet/Kconfig      | 20 ++++++++++----------
 drivers/input/touchscreen/Kconfig |  2 +-
 6 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index a878351..ef39f5c 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -138,14 +138,14 @@ config KEYBOARD_ATKBD_RDI_KEYCODES
 	  left-hand column.
 
 config KEYBOARD_QT1070
-       tristate "Atmel AT42QT1070 Touch Sensor Chip"
-       depends on I2C
-       help
-         Say Y here if you want to use Atmel AT42QT1070 QTouch
-         Sensor chip as input device.
-
-         To compile this driver as a module, choose M here:
-         the module will be called qt1070
+	tristate "Atmel AT42QT1070 Touch Sensor Chip"
+	depends on I2C
+	help
+	  Say Y here if you want to use Atmel AT42QT1070 QTouch
+	  Sensor chip as input device.
+
+	  To compile this driver as a module, choose M here:
+	  the module will be called qt1070
 
 config KEYBOARD_QT2160
 	tristate "Atmel AT42QT2160 Touch Sensor Chip"
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index ca59a2b..0ffafc0 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -240,13 +240,13 @@ config INPUT_APANEL
 	select INPUT_POLLDEV
 	select CHECK_SIGNATURE
 	help
-	 Say Y here for support of the Application Panel buttons, used on
-	 Fujitsu Lifebook. These are attached to the mainboard through
-	 an SMBus interface managed by the I2C Intel ICH (i801) driver,
-	 which you should also build for this kernel.
+	  Say Y here for support of the Application Panel buttons, used on
+	  Fujitsu Lifebook. These are attached to the mainboard through
+	  an SMBus interface managed by the I2C Intel ICH (i801) driver,
+	  which you should also build for this kernel.
 
-	 To compile this driver as a module, choose M here: the module will
-	 be called apanel.
+	  To compile this driver as a module, choose M here: the module will
+	  be called apanel.
 
 config INPUT_GP2A
 	tristate "Sharp GP2AP002A00F I2C Proximity/Opto sensor driver"
@@ -273,12 +273,12 @@ config INPUT_GPIO_DECODER
 	depends on GPIOLIB || COMPILE_TEST
 	select INPUT_POLLDEV
 	help
-	 Say Y here if you want driver to read status of multiple GPIO
-	 lines and report the encoded value as an absolute integer to
-	 input subsystem.
+	  Say Y here if you want driver to read status of multiple GPIO
+	  lines and report the encoded value as an absolute integer to
+	  input subsystem.
 
-	 To compile this driver as a module, choose M here: the module
-	 will be called gpio_decoder.
+	  To compile this driver as a module, choose M here: the module
+	  will be called gpio_decoder.
 
 config INPUT_IXP4XX_BEEPER
 	tristate "IXP4XX Beeper support"
@@ -543,8 +543,8 @@ config INPUT_PCF50633_PMU
 	tristate "PCF50633 PMU events"
 	depends on MFD_PCF50633
 	help
-	 Say Y to include support for delivering  PMU events via  input
-	 layer on NXP PCF50633.
+	  Say Y to include support for delivering  PMU events via  input
+	  layer on NXP PCF50633.
 
 config INPUT_PCF8574
 	tristate "PCF8574 Keypad input device"
diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
index 566a1e3..8b7a7e0 100644
--- a/drivers/input/mouse/Kconfig
+++ b/drivers/input/mouse/Kconfig
@@ -91,14 +91,14 @@ config MOUSE_PS2_SYNAPTICS_SMBUS
 	  If unsure, say Y.
 
 config MOUSE_PS2_CYPRESS
-       bool "Cypress PS/2 mouse protocol extension" if EXPERT
-       default y
-       depends on MOUSE_PS2
-       help
-         Say Y here if you have a Cypress PS/2 Trackpad connected to
-         your system.
+	bool "Cypress PS/2 mouse protocol extension" if EXPERT
+	default y
+	depends on MOUSE_PS2
+	help
+	  Say Y here if you have a Cypress PS/2 Trackpad connected to
+	  your system.
 
-         If unsure, say Y.
+	  If unsure, say Y.
 
 config MOUSE_PS2_LIFEBOOK
 	bool "Fujitsu Lifebook PS/2 mouse protocol extension" if EXPERT
@@ -285,19 +285,19 @@ config MOUSE_ELAN_I2C_I2C
 	depends on MOUSE_ELAN_I2C
 	default y
 	help
-	   Say Y here if Elan Touchpad in your system is connected to
-	   a standard I2C controller.
+	  Say Y here if Elan Touchpad in your system is connected to
+	  a standard I2C controller.
 
-	   If unsure, say Y.
+	  If unsure, say Y.
 
 config MOUSE_ELAN_I2C_SMBUS
 	bool "Enable SMbus support"
 	depends on MOUSE_ELAN_I2C
 	help
-	   Say Y here if Elan Touchpad in your system is connected to
-	   a SMbus adapter.
+	  Say Y here if Elan Touchpad in your system is connected to
+	  a SMbus adapter.
 
-	   If unsure, say Y.
+	  If unsure, say Y.
 
 config MOUSE_INPORT
 	tristate "InPort/MS/ATIXL busmouse"
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig
index c9c7224..b29cb49 100644
--- a/drivers/input/serio/Kconfig
+++ b/drivers/input/serio/Kconfig
@@ -7,7 +7,7 @@ config SERIO
 	help
 	  Say Yes here if you have any input device that uses serial I/O to
 	  communicate with the system. This includes the
-	  		* standard AT keyboard and PS/2 mouse *
+	                * standard AT keyboard and PS/2 mouse *
 	  as well as serial mice, Sun keyboards, some joysticks and 6dof
 	  devices and more.
 
diff --git a/drivers/input/tablet/Kconfig b/drivers/input/tablet/Kconfig
index a2b9f97..df427d1 100644
--- a/drivers/input/tablet/Kconfig
+++ b/drivers/input/tablet/Kconfig
@@ -38,16 +38,16 @@ config TABLET_USB_AIPTEK
 	  module will be called aiptek.
 
 config TABLET_USB_GTCO
-        tristate "GTCO CalComp/InterWrite USB Support"
-        depends on USB && INPUT
-        help
-          Say Y here if you want to use the USB version of the GTCO
-          CalComp/InterWrite Tablet.  Make sure to say Y to "Mouse support"
-          (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
-          (CONFIG_INPUT_EVDEV) as well.
-
-          To compile this driver as a module, choose M here: the
-          module will be called gtco.
+	tristate "GTCO CalComp/InterWrite USB Support"
+	depends on USB && INPUT
+	help
+	  Say Y here if you want to use the USB version of the GTCO
+	  CalComp/InterWrite Tablet.  Make sure to say Y to "Mouse support"
+	  (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
+	  (CONFIG_INPUT_EVDEV) as well.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called gtco.
 
 config TABLET_USB_HANWANG
 	tristate "Hanwang Art Master III tablet support (USB)"
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 068dbbc..11ca597 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -632,7 +632,7 @@ config TOUCHSCREEN_HP600
 	depends on SH_HP6XX && SH_ADC
 	help
 	  Say Y here if you have a HP Jornada 620/660/680/690 and want to
-          support the built-in touchscreen.
+	  support the built-in touchscreen.
 
 	  To compile this driver as a module, choose M here: the
 	  module will be called hp680_ts_input.
-- 
1.9.1

^ permalink raw reply related

* Re: [RFC/RFT] HID: primax: Fix wireless keyboards descriptor
From: Nicolas Saenz Julienne @ 2019-03-07 16:20 UTC (permalink / raw)
  To: Benjamin Tissoires
  Cc: Junge, Terry, Jiri Kosina, oneukum@suse.de,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
In-Reply-To: <CAO-hwJ+9ft070W-shhEwxfTq9B5XyVB2v6Qx0b4nC4LdTiTEDg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3170 bytes --]

On Fri, 2019-03-01 at 10:48 +0100, Benjamin Tissoires wrote:
> On Thu, Feb 28, 2019 at 7:01 PM Nicolas Saenz Julienne
> <nsaenzjulienne@suse.de> wrote:
> > On Thu, 2019-02-28 at 17:02 +0000, Junge, Terry wrote:
> > > This could also be a parser error. In the HID specification section
> > > 6.2.2.8 it
> > > states that the last declared Usage Page is applied to Usages when the
> > > Main
> > > item is encountered.
> > > 
> > > "If the bSize field = 1 or 2 then the Usage is interpreted as an unsigned
> > > value
> > > that selects a Usage ID on the currently defined Usage Page. When the
> > > parser
> > > encounters a main item it concatenates the last declared Usage Page with a
> > > Usage to form a complete usage value. Extended usages can be used to
> > > override the currently defined Usage Page for individual usages."
> > > 
> > 
> > Hi Terry, thanks for the comment.
> > Just for the record the paragraph I cited on my patch is the following:
> > 
> >         6.2.2.7 Global Items
> > 
> >         [...]
> > 
> >         Usage Page: Unsigned integer specifying the current Usage Page.
> > Since a
> >         usage are 32 bit values, Usage Page items can be used to conserve
> > space
> >         in a report descriptor by setting the high order 16 bits of a
> >         subsequent usages. Any usage that follows which is defines* 16 bits
> > or
> >         less is interpreted as a Usage ID and concatenated with the Usage
> > Page
> >         to form a 32 bit Usage.
> > 
> >         * This is a spec errata, I belive it should say "defined"
> > 
> > As you can see they use the word "follows" which in my opinion contradicts
> > the
> > paragraph you pointed out. That said I may be wrong, I'm not too good at
> > reading specs :).
> 
> I think you are both right (that is some decision making skills :-P).
> 
> I never saw a case where the Usage Page was after the Usage. And I
> would lean towards Nicolas interpretation.
> However, Terry's point is valid too, and by re-reading the two
> paragraphs, one could argue that the "follows" of 6.2.2.7 could be
> applied when the Main item is processed as in 6.2.2.8.
> 
> So I am going to base my decision on the "reference" driver. How well
> behaves Windows with this particular keyboard?
> 
> If it behaves properly, then we better use the 6.2.2.8 version where
> the Usage Page is only appended when there is a Main item. This means
> we need to remember what size was the last Usage (and Min/Max), to
> know if we should concatenate the 2.
> 
> Note that for every change that involves the generic parser, I'd like
> a few tests added to `tests/test_keyboard.py in
> https://gitlab.freedesktop.org/libevdev/hid-tools
> Also note that the HID parser implementation in hid-tools follows the
> kernel, so we might need to adjust it there too if we want to add high
> level events. If you directly call `.call_input_event()` with raw
> events, it should be fine.

Thanks for the reply. I might get my hands on one of the faulty keyboards soon
so I'll be able to check windows' behaviour and test the patches.

Regards,
Nicolas


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply

* [PATCH] HID: Increase maximum report size allowed by hid_field_extract()
From: Kai-Heng Feng @ 2019-03-08  5:11 UTC (permalink / raw)
  To: jikos, benjamin.tissoires; +Cc: linux-input, linux-kernel, Kai-Heng Feng

Commit 71f6fa90a353 ("HID: increase maximum global item tag report size
to 256") increases the max report size from 128 to 256.

We also need to update the report size in hid_field_extract() otherwise
it complains and truncates now valid report size:
[ 406.165461] hid-sensor-hub 001F:8086:22D8.0002: hid_field_extract() called with n (192) > 32! (kworker/5:1)

BugLink: https://bugs.launchpad.net/bugs/1818547
Fixes: 71f6fa90a353 ("HID: increase maximum global item tag report size to 256")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/hid/hid-core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 9993b692598f..860e21ec6a49 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1301,10 +1301,10 @@ static u32 __extract(u8 *report, unsigned offset, int n)
 u32 hid_field_extract(const struct hid_device *hid, u8 *report,
 			unsigned offset, unsigned n)
 {
-	if (n > 32) {
-		hid_warn(hid, "hid_field_extract() called with n (%d) > 32! (%s)\n",
+	if (n > 256) {
+		hid_warn(hid, "hid_field_extract() called with n (%d) > 256! (%s)\n",
 			 n, current->comm);
-		n = 32;
+		n = 256;
 	}
 
 	return __extract(report, offset, n);
-- 
2.17.1

^ permalink raw reply related

* Re: [PATCH 1/2] Input: synaptics-rmi4 - clear irqs before set irqs
From: Christopher Heiny @ 2019-03-08 23:13 UTC (permalink / raw)
  To: Aaron Ma, dmitry.torokhov@gmail.com, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, Andrew Duggan,
	benjamin.tissoires@redhat.com
In-Reply-To: <20190220164200.31044-1-aaron.ma@canonical.com>

On Wed, 2019-02-20 at 17:41 +0100, Aaron Ma wrote:
> CAUTION: Email originated externally, do not click links or open
> attachments unless you recognize the sender and know the content is
> safe.
> 
> 
> rmi4 got spam data after S3 resume on some ThinkPads.
> Then TrackPoint lost when be detected by psmouse.
> Clear irqs status before set irqs will make TrackPoint back.
> 
> BugLink: 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.launchpad.net_bugs_1791427&d=DwIBAg&c=7dfBJ8cXbWjhc0BhImu8wQ&r=veOxv1_7HLXIaWG-OKLqp-qvZc3r7ucT1d-68JSWqpM&m=3nNm4ob6G1wtf502YFuxorJVkSQvdBasje2RrZLxhTM&s=Z0nHSPAKhQLzdoENAZBYuDC6QmZNOliyiE7h1OOVkBA&e=
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> ---
>  drivers/input/rmi4/rmi_driver.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/input/rmi4/rmi_driver.c
> b/drivers/input/rmi4/rmi_driver.c
> index fc3ab93b7aea..20631b272f43 100644
> --- a/drivers/input/rmi4/rmi_driver.c
> +++ b/drivers/input/rmi4/rmi_driver.c
> @@ -374,6 +374,17 @@ static int rmi_driver_set_irq_bits(struct
> rmi_device *rmi_dev,
>         struct device *dev = &rmi_dev->dev;
> 
>         mutex_lock(&data->irq_mutex);
> +
> +       /* Dummy read in order to clear irqs */
> +       error = rmi_read_block(rmi_dev,
> +                       data->f01_container->fd.data_base_addr + 1,
> +                       data->irq_status, data->num_of_irq_regs);
> +       if (error < 0) {
> +               dev_err(dev, "%s: Failed to read interrupt status!",
> +                                                       __func__);
> +               goto error_unlock;
> +       }
> +
>         bitmap_or(data->new_irq_mask,
>                   data->current_irq_mask, mask, data->irq_count);
> 
> --
> 2.17.1
> 

Sorry for the long delay in following up on this.

I'm not sure this is a safe action, due to a race condition with the
actual IRQ handler (rmi_process_interrupt_requests from rmi_driver.c). 
Remember that reading the IRQ status register clears all the IRQ bits. 
So you're faced with this possible scenario:
    - ATTN asserted, indicating new data in IRQ status register
    - rmi_driver_set_irq_bits called
    - rmi_driver_set_irq_bits reads IRQ status, clearing bits
    - rmi_process_interrupt_requests called
    - rmi_process_interrupt_request reads IRQ status, sees no
      bits set, nested IRQs are not handled
This could lead to loss of data or inconsistent system state
information.  For example, a button up or down event may be lost, with
consequent weird behavior by the user interface.

CAVEAT: I haven't had much to do with the RMI4 driver for a long while,
and am just starting to poke around with it again.  I am not very
familiar with the current IRQ handling implementation.  Perhaps there
is a guarantee in the kernel IRQ mechanism that once ATTN is asserted,
then rmi_process_interrupt_requests will be called before anyone else
gets a chance to read the IRQ status register.  If that's the case, let
me know I'm worried about nothing, and ignore this comment.

Cheers,
Chris


^ permalink raw reply

* [PATCH] hid: logitech: check the return value of create_singlethread_workqueue
From: Kangjie Lu @ 2019-03-09  4:43 UTC (permalink / raw)
  To: kjlu; +Cc: pakki001, Jiri Kosina, Benjamin Tissoires, linux-input,
	linux-kernel

create_singlethread_workqueue may fail and return NULL. The fix
checks if it is NULL to avoid NULL pointer dereference.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
---
 drivers/hid/hid-logitech-hidpp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index 15ed6177a7a3..efbc39b92aa2 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -2156,6 +2156,9 @@ static int hidpp_ff_init(struct hidpp_device *hidpp, u8 feature_index)
 
 	/* init the hardware command queue */
 	data->wq = create_singlethread_workqueue("hidpp-ff-sendqueue");
+	if (!data->wq)
+		return -ENOMEM;
+
 	atomic_set(&data->workqueue_size, 0);
 
 	/* initialize with zero autocenter to get wheel in usable state */
-- 
2.17.1

^ permalink raw reply related

* [PATCH] input: pm8xxx-vibrator: fix a potential NULL pointer dereference
From: Kangjie Lu @ 2019-03-09  5:39 UTC (permalink / raw)
  To: kjlu; +Cc: pakki001, Dmitry Torokhov, linux-input, linux-kernel

In case of_device_get_match_data fails to find the matched data,
returns -ENODEV

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
---
 drivers/input/misc/pm8xxx-vibrator.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/input/misc/pm8xxx-vibrator.c b/drivers/input/misc/pm8xxx-vibrator.c
index 7dd1c1fbe42a..740e59c11808 100644
--- a/drivers/input/misc/pm8xxx-vibrator.c
+++ b/drivers/input/misc/pm8xxx-vibrator.c
@@ -196,6 +196,8 @@ static int pm8xxx_vib_probe(struct platform_device *pdev)
 	vib->vib_input_dev = input_dev;
 
 	regs = of_device_get_match_data(&pdev->dev);
+	if (unlikely(!regs))
+		return -ENODEV;
 
 	/* operate in manual mode */
 	error = regmap_read(vib->regmap, regs->drv_addr, &val);
-- 
2.17.1

^ permalink raw reply related

* Re: [PATCH 1/2] Input: synaptics-rmi4 - clear irqs before set irqs
From: Aaron Ma @ 2019-03-09  8:37 UTC (permalink / raw)
  To: Christopher Heiny, dmitry.torokhov@gmail.com,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andrew Duggan, benjamin.tissoires@redhat.com
In-Reply-To: <17cd420ea32a9787c56ba25e36e7661541c2f65f.camel@synaptics.com>

Hi,

On 3/9/19 7:13 AM, Christopher Heiny wrote:
> I'm not sure this is a safe action, due to a race condition with the
> actual IRQ handler (rmi_process_interrupt_requests from rmi_driver.c). 
> Remember that reading the IRQ status register clears all the IRQ bits. 
> So you're faced with this possible scenario:
>     - ATTN asserted, indicating new data in IRQ status register
>     - rmi_driver_set_irq_bits called
>     - rmi_driver_set_irq_bits reads IRQ status, clearing bits
>     - rmi_process_interrupt_requests called
>     - rmi_process_interrupt_request reads IRQ status, sees no
>       bits set, nested IRQs are not handled
> This could lead to loss of data or inconsistent system state
> information.  For example, a button up or down event may be lost, with
> consequent weird behavior by the user interface.

rmi_driver_set_irq_bits is only called to config and enable specific
functions of RMI.
Reading IRQ status before set irqs is supposed to clear spam data/irq
status.
spam data make probe/detect touchpad/trackpoint fail.

rmi_smb_resume -> rmi_driver_reset_handler -> fn-config ->
clear_irq_bits -> set_irq_bits -> enable_irq -> irq_handler  ->
rmi_process_interrupt_requests

set_irq_bits will not be in interrupt context, it enables IRQ bits of RMI.

Regards,
Aaron

^ permalink raw reply

* Re: [PATCH] Input: msm-vibrator: use correct gpio header
From: Dmitry Torokhov @ 2019-03-09 23:33 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Arnd Bergmann, Brian Masney, Linux Input,
	linux-kernel@vger.kernel.org
In-Reply-To: <CACRpkdaq9YzFSSXp7HSOf+RC2PGxv0N-m+iV99tn-0xTeEZr=Q@mail.gmail.com>

On Tue, Mar 05, 2019 at 08:49:01AM +0100, Linus Walleij wrote:
> On Mon, Mar 4, 2019 at 8:57 PM Arnd Bergmann <arnd@arndb.de> wrote:
> 
> > When CONFIG_GPIOLIB is not set, we get a couple of build
> > errors during test building:
> >
> > drivers/input/misc/msm-vibrator.c: In function 'msm_vibrator_start':
> > drivers/input/misc/msm-vibrator.c:79:3: error: implicit declaration of function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_cansleep'? [-Werror=implicit-function-declaration]
> >    gpiod_set_value_cansleep(vibrator->enable_gpio, 1);
> >    ^~~~~~~~~~~~~~~~~~~~~~~~
> >    gpio_set_value_cansleep
> > drivers/input/misc/msm-vibrator.c: In function 'msm_vibrator_probe':
> > drivers/input/misc/msm-vibrator.c:176:26: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'devm_gpio_free'? [-Werror=implicit-function-declaration]
> >   vibrator->enable_gpio = devm_gpiod_get(&pdev->dev, "enable",
> >                           ^~~~~~~~~~~~~~
> >                           devm_gpio_free
> > drivers/input/misc/msm-vibrator.c:177:13: error: 'GPIOD_OUT_LOW' undeclared (first use in this function); did you mean 'GPIOF_INIT_LOW'?
> >              GPIOD_OUT_LOW);
> >              ^~~~~~~~~~~~~
> >              GPIOF_INIT_LOW
> > drivers/input/misc/msm-vibrator.c:177:13: note: each undeclared identifier is reported only once for each function it appears in
> >
> > This is easy to avoid when we use gpio/consumer.h as the documented interface.
> >
> > Fixes: 0f681d09e66e ("Input: add new vibrator driver for various MSM SOCs")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Applied, thank you.

-- 
Dmitry

^ permalink raw reply

* Re: [PATCH] Input: raspberrypi-ts: select CONFIG_INPUT_POLLDEV
From: Dmitry Torokhov @ 2019-03-09 23:34 UTC (permalink / raw)
  To: Nicolas Saenz Julienne; +Cc: Arnd Bergmann, Zhu Yi, linux-input, linux-kernel
In-Reply-To: <87a8108f573e04d5c2eaaaa23be0f3a58bd45eb1.camel@suse.de>

On Tue, Mar 05, 2019 at 11:39:42AM +0100, Nicolas Saenz Julienne wrote:
> On Mon, 2019-03-04 at 20:57 +0100, Arnd Bergmann wrote:
> > When CONFIG_INPUT_POLLDEV is disabled, we get a link error:
> > 
> > drivers/input/touchscreen/raspberrypi-ts.o: In function `rpi_ts_probe':
> > raspberrypi-ts.c:(.text+0xec): undefined reference to
> > `devm_input_allocate_polled_device'
> > raspberrypi-ts.c:(.text+0xec): relocation truncated to fit: R_AARCH64_CALL26
> > against undefined symbol `devm_input_allocate_polled_device'
> > raspberrypi-ts.c:(.text+0x19c): undefined reference to
> > `input_register_polled_device'
> > raspberrypi-ts.c:(.text+0x19c): relocation truncated to fit: R_AARCH64_CALL26
> > against undefined symbol `input_register_polled_device'
> > 
> > Select that symbol like we do from the other similar drivers.
> > 
> > Fixes: 0b9f28fed3f7 ("Input: add official Raspberry Pi's touchscreen driver")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> >  drivers/input/touchscreen/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/input/touchscreen/Kconfig
> > b/drivers/input/touchscreen/Kconfig
> > index 7c597a49c265..7a4884ad198b 100644
> > --- a/drivers/input/touchscreen/Kconfig
> > +++ b/drivers/input/touchscreen/Kconfig
> > @@ -699,6 +699,7 @@ config TOUCHSCREEN_EDT_FT5X06
> >  config TOUCHSCREEN_RASPBERRYPI_FW
> >  	tristate "Raspberry Pi's firmware base touch screen support"
> >  	depends on RASPBERRYPI_FIRMWARE || (RASPBERRYPI_FIRMWARE=n &&
> > COMPILE_TEST)
> > +	select INPUT_POLLDEV
> >  	help
> >  	  Say Y here if you have the official Raspberry Pi 7 inch screen on
> >  	  your system.
> 
> Thanks!
> Looks good to me.
> 
> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 

Applied, thank you.


-- 
Dmitry

^ permalink raw reply

* Re: [PATCH] Input: fix oops in input_to_handler
From: Dmitry Torokhov @ 2019-03-09 23:46 UTC (permalink / raw)
  To: Zhipeng Xie
  Cc: rydberg, linux-input, linux-kernel, kernel.openeuler, euleros,
	huawei.libin, yangyingliang
In-Reply-To: <1551413607-32036-1-git-send-email-xiezhipeng1@huawei.com>

Hi Zhipeng,

On Fri, Mar 01, 2019 at 12:13:27PM +0800, Zhipeng Xie wrote:
> we got the following boot crash:
> 
> 	[   36.086344] Internal error: Oops: 96000004 [#1] SMP
> 	[   36.091371] CPU: 32 PID: 0 Comm: swapper/32 Tainted: G           OE     4.19.25-vhulk1901.1.0.h111.aarch64 #1
> 	[   36.101444] Hardware name: Huawei TaiShan 2280 /BC11SPCD, BIOS 1.58 10/24/2018
> 	[   36.108860] pstate: 20000085 (nzCv daIf -PAN -UAO)
> 	[   36.113727] pc : input_to_handler+0x2c/0x148
> 	[   36.118058] lr : input_pass_values.part.2+0x148/0x168
> 	[   36.123177] sp : ffff000100103ba0
> 	[   36.126535] x29: ffff000100103ba0 x28: ffff801fb2ac5958
> 	[   36.131924] x27: ffff000009799000 x26: 0000000000000001
> 	[   36.137375] x25: 0000000000000000 x24: ffff801fb5b57c00
> 	[   36.142822] x23: 000000020987f3d0 x22: ffff801faf427e00
> 	[   36.148211] x21: 0000000000000003 x20: 0000000000000003
> 	[   36.153599] x19: ffff801faf427e00 x18: 000000000000000e
> 	[   36.158986] x17: 000000000000000e x16: 0000000000000007
> 	[   36.164374] x15: 0000000000000001 x14: 0000000000000019
> 	[   36.169762] x13: 0000000000000033 x12: 000000000000004c
> 	[   36.175150] x11: 0000000000000068 x10: ffff000008dfa290
> 	[   36.180538] x9 : 000000000000007d x8 : 0000000000000000
> 	[   36.185925] x7 : 0000000000000053 x6 : 0000000000000000
> 	[   36.191313] x5 : 0000000000000000 x4 : 0000000000000000
> 	[   36.196700] x3 : 0000000000000010 x2 : 0000000000000003
> 	[   36.202088] x1 : ffff801fb5b57c00 x0 : ffff000008a120a0
> 	[   36.207477] Process swapper/32 (pid: 0, stack limit = 0x0000000032f86b58)
> 	[   36.214361] Call trace:
> 	[   36.216840]  input_to_handler+0x2c/0x148
> 	[   36.220816]  input_pass_values.part.2+0x148/0x168
> 	[   36.225582]  input_handle_event+0x130/0x5b8
> 	[   36.229823]  i6.242013]  hid_input_report+0x128/0x1b0
> 	[   36.246076]  hid_irq_in+0x240/0x298
> 	[   36.249613]  __usb_hcd_giveback_urb+0x9c/0x130
> 	[   36.257460]  usb_giveback_urb_bh+0xf4/0x198
> 	[   36.265127]  tasklet_action_common.isra.6+0x94/0x160
> 	[   36.273458]  tasklet_hi_action+0x2c/0x38
> 	[   36.280597]  __do_softirq+0x118/0x314
> 	[   36.287494]  irq_exit+0xa4/0xe8
> 	[   36.293682]  __handle_domain_irq+0x6c/0xc0
> 	[   36.300783]  gic_handle_irq+0x6c/0x170
> 	[   36.307296]  el1_irq+0xb8/0x140
> 	[   36.313283]  arch_cpu_idle+0x38/0x1c0
> 	[   36.319776]  default_idle_call+0x24/0x44
> 	[   36.326527]  do_idle+0x1ec/0x2d0
> 	[   36.332503]  cpu_startup_entry+0x28/0x30
> 	[   36.339161]  secondary_start_kernel+0x194/0x1d8
> 
> We need to check the input_handler before referencing its members.
> 
> Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
> ---
>  drivers/input/input.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/input/input.c b/drivers/input/input.c
> index 3304aaa..b768d14 100644
> --- a/drivers/input/input.c
> +++ b/drivers/input/input.c
> @@ -100,6 +100,9 @@ static unsigned int input_to_handler(struct input_handle *handle,
>  	struct input_value *end = vals;
>  	struct input_value *v;
>  
> +	if (!handler)
> +		return 0;

No, is not a proper change. That means that someone registered an input
handle without setting handler, which is not allowed. Do you have any
custom input handlers in your system?

Thanks.

-- 
Dmitry

^ permalink raw reply

* [git pull] Input updates for v5.1-rc0
From: Dmitry Torokhov @ 2019-03-10  2:34 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-input

Hi Linus,

Please pull from:

	git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git for-linus

to receive updates for the input subsystem. You will get:

- update to ili210x touchscreen driver, refreshing the code and adding
  support for ILI251X line
- update to st1232 touchscreen driver adding support for st1633 model
- sx8654 touchscreen driver gained support for sx8650 model
- edt-ft5x06 touchscreen driver gained support for Evervision FT5726
- Goodix touchscreen driver can now support gt5688
- new vibrator driver for MSM SOCs
- miscellaneous fixes for the rest of input drivers

Thanks!

Changelog:
---------

Aditya Pakki (1):
      Input: ad7879 - add check for read errors in interrupt

Arnd Bergmann (2):
      Input: msm-vibrator - use correct gpio header
      Input: raspberrypi-ts - select CONFIG_INPUT_POLLDEV

Brian Masney (1):
      Input: add new vibrator driver for various MSM SOCs

Dan Carpenter (1):
      Input: msm-vibrator - tweak an error message

Dmitry Torokhov (5):
      Input: sx8654 - do not override interrupt trigger
      Input: ili210x - switch to using devm_device_add_group()
      Input: stmfts - acknowledge that setting brightness is a blocking call
      Input: tm2-touchkey - acknowledge that setting brightness is a blocking call
      Input: ims-pcu - switch to using brightness_set_blocking()

Florian Fainelli (1):
      Input: gpio-keys - add shutdown callback

Guido Günther (3):
      Input: goodix - support Goodix gt5688
      Input: goodix - refer to touchscreen.txt in device tree bindings
      Input: goodix - print values in case of inconsistencies

Gustavo A. R. Silva (3):
      Input: tca6416-keypad - use struct_size() in kzalloc()
      Input: mcs_touchkey - use struct_size() in kzalloc()
      Input: db9 - mark expected switch fall-through

Hans de Goede (2):
      Input: soc_button_array - add usage-page 0x01 usage-id 0xca mapping
      Input: soc_button_array - fix mapping of the 5th GPIO in a PNP0C40 device

Jason Gerecke (1):
      Input: wacom_serial4 - add support for Wacom ArtPad II tablet

Jonathan Bakker (3):
      Input: tm2-touchkey - correct initial brightness
      Input: tm2-touchkey - allow specifying custom keycodes
      Input: tm2-touchkey - add support for aries touchkey variant

Marco Felsch (3):
      Input: edt-ft5x06 - add support for Evervision FT5726
      Input: edt-ft5x06 - add support to update ev-ft5726 registers
      Input: edt-ft5x06 - add offset support for ev-ft5726

Marek Vasut (11):
      Input: ili210x - add DT binding document
      Input: ili210x - drop platform data support
      Input: ili210x - drop get_pendown_state
      Input: ili210x - convert to devm_ functions
      Input: ili210x - add reset GPIO support
      Input: ili210x - convert to devm IRQ
      Input: ili210x - rework the touchscreen sample processing
      Input: ili210x - reorder probe
      Input: ili210x - add OF match table
      Input: ili210x - add ILI251X support
      Input: ili210x - fetch touchscreen geometry from DT

Martin Kepplinger (3):
      Input: st1232 - add support for st1633
      Input: st1232 - add Martin as module author
      Input: st1232 - switch to gpiod API

Matthias Fend (1):
      Input: st1232 - handle common DT bindings

Richard Leitner (5):
      Input: sx8654 - add reset-gpio support
      Input: sx8654 - add sx8655 and sx8656 to compatibles
      Input: sx8654 - add sx8650 support
      Input: sx8654 - use common of_touchscreen functions
      Input: sx8654 - convert #defined flags to BIT(x)

Rob Herring (1):
      Input: i8042 - rework DT node name comparisons

Simon Shields (1):
      Input: tm2-touchkey - add support for midas touchkey

Sven Van Asbroeck (2):
      Input: qt2160 - remove redundant spinlock
      Input: synaptics_i2c - remove redundant spinlock

Vincent Batts (1):
      Input: elan_i2c - add id for touchpad found in Lenovo s21e-20

YueHaibing (2):
      Input: mtk-pmic-keys - remove duplicated include from mtk-pmic-keys.c
      Input: ti_am335x_tsc - remove set but not used variable 'tscadc_dev'

Diffstat:
--------

 .../bindings/input/cypress,tm2-touchkey.txt        |   9 +-
 .../devicetree/bindings/input/ilitek,ili2xxx.txt   |  25 ++
 .../devicetree/bindings/input/msm-vibrator.txt     |  36 +++
 .../bindings/input/touchscreen/edt-ft5x06.txt      |  13 +-
 .../bindings/input/touchscreen/goodix.txt          |  14 +-
 .../bindings/input/touchscreen/sitronix-st1232.txt |   8 +-
 .../bindings/input/touchscreen/sx8654.txt          |  10 +-
 drivers/input/joystick/db9.c                       |   2 +-
 drivers/input/keyboard/gpio_keys.c                 |  10 +
 drivers/input/keyboard/mcs_touchkey.c              |   5 +-
 drivers/input/keyboard/mtk-pmic-keys.c             |  13 +-
 drivers/input/keyboard/qt2160.c                    |   9 -
 drivers/input/keyboard/tca6416-keypad.c            |   4 +-
 drivers/input/keyboard/tm2-touchkey.c              | 136 ++++++---
 drivers/input/misc/Kconfig                         |  10 +
 drivers/input/misc/Makefile                        |   1 +
 drivers/input/misc/ims-pcu.c                       |  27 +-
 drivers/input/misc/msm-vibrator.c                  | 281 ++++++++++++++++++
 drivers/input/misc/soc_button_array.c              |   6 +-
 drivers/input/mouse/elan_i2c_core.c                |   1 +
 drivers/input/mouse/synaptics_i2c.c                |  22 +-
 drivers/input/serio/i8042-sparcio.h                |  21 +-
 drivers/input/tablet/wacom_serial4.c               |   2 +
 drivers/input/touchscreen/Kconfig                  |   7 +-
 drivers/input/touchscreen/ad7879.c                 |  11 +-
 drivers/input/touchscreen/edt-ft5x06.c             | 110 ++++++-
 drivers/input/touchscreen/goodix.c                 |   6 +-
 drivers/input/touchscreen/ili210x.c                | 321 +++++++++++++--------
 drivers/input/touchscreen/st1232.c                 | 154 ++++++----
 drivers/input/touchscreen/stmfts.c                 |  30 +-
 drivers/input/touchscreen/sx8654.c                 | 255 ++++++++++++++--
 drivers/input/touchscreen/ti_am335x_tsc.c          |   4 -
 include/linux/input/ili210x.h                      |  11 -
 33 files changed, 1207 insertions(+), 367 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/input/ilitek,ili2xxx.txt
 create mode 100644 Documentation/devicetree/bindings/input/msm-vibrator.txt
 create mode 100644 drivers/input/misc/msm-vibrator.c
 delete mode 100644 include/linux/input/ili210x.h

Thanks.


-- 
Dmitry

^ permalink raw reply

* Re: [PATCH v6 0/4] input: touchscreen: Add goodix GT5553 CTP support
From: Jagan Teki @ 2019-03-11 13:38 UTC (permalink / raw)
  To: Dmitry Torokhov, Bastien Nocera, Rob Herring
  Cc: Henrik Rydberg, linux-input, linux-kernel, devicetree,
	Mark Rutland, linux-amarula, Michael Trimarchi
In-Reply-To: <CAMty3ZB3o1Np7_H7rmCgpUWPk7BRqHRm7gxRpgAq_YyeCUKgaw@mail.gmail.com>

On Wed, Mar 6, 2019 at 10:47 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> Hi Dmitry,
>
> On Tue, Feb 26, 2019 at 11:43 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> >
> > Hi Dmitry,
> >
> > On Tue, Feb 19, 2019 at 3:46 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > >
> > > This is v6 patchset for supporting goodix GT5553 CTP. Here is the
> > > previous version[1]
> > >
> > > Changes for v5:
> > > - document bindings for required regulators, which are need during
> > >   power-on sequence
> > > - enable, disable required regulators as described in power-on sequence
> > >   using normal regulator calls
> > > - update the proper commi messages
> > > Changes for v4:
> > > - document AVDD22, DVDD12, VDDIO as optional properties
> > > - use regulator bulk calls, for get, enable and disable functionalities
> > > Changes for v4:
> > > - devm_add_action_or_reset for disabling regulator
> > > Changes for v3:
> > > - add cover-letter
> > > - s/ADVV28/AVDD28 on commit head
> > > - fix few typo
> > > Changes for v2:
> > > - Rename vcc-supply with AVDD28-supply
> > > - disable regulator in remove
> > > - fix to setup regulator in probe code
> > > - add chipdata
> > > - drop example node in dt-bindings
> > >
> > > [1] https://patchwork.kernel.org/cover/10816901/
> > >
> > > Jagan Teki (4):
> > >   dt-bindings: input: touchscreen: goodix: Document regulator properties
> > >   Input: goodix - Add regulators suppot
> > >   dt-bindings: input: touchscreen: goodix: Add GT5663 compatible
> > >   Input: goodix - Add GT5663 CTP support
> > >
> > >  .../bindings/input/touchscreen/goodix.txt     |  3 +
> > >  drivers/input/touchscreen/goodix.c            | 60 +++++++++++++++++++
> > >  2 files changed, 63 insertions(+)
> >
> > Let me know if you have any further comments on regulator patch, fyi
> > Rob reviewed it already.
>
> Would you comment on this? few dts changes are pending for this to support.

Gentle remainder.

^ permalink raw reply

* Re: [PATCH][next] HID: uclogic: remove redudant duplicated null check on ver_ptr
From: Benjamin Tissoires @ 2019-03-11 14:55 UTC (permalink / raw)
  To: Colin King; +Cc: Jiri Kosina, open list:HID CORE LAYER, kernel-janitors, lkml
In-Reply-To: <20190302222338.8023-1-colin.king@canonical.com>

On Sat, Mar 2, 2019 at 11:23 PM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently ver_ptr is being null checked twice, once before calling
> usb_string and once afterwards.  The second null check is redundant
> and can be removed, remove it.
>
> Detected by CoverityScan, CID#1477308 ("Logically dead code")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---

Applied to for-5.1/upstream-fixes

Cheers,
Benjamin

>  drivers/hid/hid-uclogic-params.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c
> index 7710d9f957da..0187c9f8fc22 100644
> --- a/drivers/hid/hid-uclogic-params.c
> +++ b/drivers/hid/hid-uclogic-params.c
> @@ -735,10 +735,6 @@ static int uclogic_params_huion_init(struct uclogic_params *params,
>                 goto cleanup;
>         }
>         rc = usb_string(udev, 201, ver_ptr, ver_len);
> -       if (ver_ptr == NULL) {
> -               rc = -ENOMEM;
> -               goto cleanup;
> -       }
>         if (rc == -EPIPE) {
>                 *ver_ptr = '\0';
>         } else if (rc < 0) {
> --
> 2.20.1
>

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox