Linux Input/HID development
 help / color / mirror / Atom feed
* Re: [PATCH v2] MAINTAINERS: add maintainers for ChromeOS EC sub-drivers
From: Alexandre Belloni @ 2018-12-13  9:50 UTC (permalink / raw)
  To: Enric Balletbo i Serra
  Cc: linux-kernel, Alessandro Zummo, linux-pwm, linux-iio, linux-i2c,
	groeck, kernel, linux-rtc, Chanwoo Choi, Benson Leung,
	Sebastian Reichel, linux-input, Dmitry Torokhov, Jonathan Cameron,
	Peter Meerwald-Stadler, devicetree, Thierry Reding, linux-pm,
	MyungJoo Ham, Lee Jones, Hartmut Knaack, Rob Herring,
	Lars-Peter Clausen <lars@
In-Reply-To: <6f688bfe-2ebe-1934-0375-016ae859dcfb@collabora.com>

On 13/12/2018 10:30:16+0100, Enric Balletbo i Serra wrote:
> > However, you should probably indicate which tree do you expect that to
> > go through ;)
> > 
> 
> Well, these are sub-drivers for different subsystems but are related to the main
> ChromeOS EC. I expect all go through their specific subsystem and their
> maintainer. I.e the rtc driver go through your tree, the mfd go through Lee's
> tree, iio drivers through Jonathan's tree, etc. This is the reason I did not add
> the tree. Main purpose here as that Benson and I are aware when someone sends a
> change on one of the sub-drivers and we can review these patches.
> 

Sure, sorry I was not clear but I was asking about this particular
patch because as it is, you will get acks from all the maintainers but I
think they all think someone else will apply it ;)

> Thanks,
>  Enric
> 
> >> ---
> >>
> >> Changes in v2:
> >> - Fix typo in Benson email address.
> >>
> >>  MAINTAINERS | 24 ++++++++++++++++++++++++
> >>  1 file changed, 24 insertions(+)
> >>
> >> diff --git a/MAINTAINERS b/MAINTAINERS
> >> index a24129b0b043..bbe7180e2851 100644
> >> --- a/MAINTAINERS
> >> +++ b/MAINTAINERS
> >> @@ -3625,6 +3625,30 @@ S:	Maintained
> >>  T:	git git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform.git
> >>  F:	drivers/platform/chrome/
> >>  
> >> +CHROMEOS EC SUBDRIVERS
> >> +M:	Benson Leung <bleung@chromium.org>
> >> +M:	Enric Balletbo i Serra <enric.balletbo@collabora.com>
> >> +S:	Maintained
> >> +F:	Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.txt
> >> +F:	Documentation/devicetree/bindings/input/cros-ec-keyb.txt
> >> +F:	Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.txt
> >> +F:	Documentation/devicetree/bindings/i2c/i2c-cros-ec-tunnel.txt
> >> +F:	Documentation/devicetree/bindings/mfd/cros-ec.txt
> >> +F:	Documentation/ABI/testing/sysfs-bus-iio-cros-ec
> >> +F:	drivers/extcon/extcon-usbc-cros-ec.c
> >> +F:	drivers/i2c/busses/i2c-cros-ec-tunnel.c
> >> +F:	drivers/iio/accel/cros_ec*
> >> +F:	drivers/iio/common/cros_ec_sensors/
> >> +F:	drivers/iio/light/cros_ec*
> >> +F:	drivers/iio/pressure/cros_ec*
> >> +F:	drivers/input/keyboard/cros_ec*
> >> +F:	drivers/mfd/cros_ec*
> >> +F:	drivers/power/supply/cros_usbpd-charger.c
> >> +F:	drivers/pwm/pwm-cros-ec.c
> >> +F:	drivers/rtc/rtc-cros-ec.c
> >> +F:	include/linux/iio/common/cros_ec_sensors_core.h
> >> +F:	include/linux/mfd/cros_ec*
> >> +
> >>  CIRRUS LOGIC AUDIO CODEC DRIVERS
> >>  M:	Brian Austin <brian.austin@cirrus.com>
> >>  M:	Paul Handrigan <Paul.Handrigan@cirrus.com>
> >> -- 
> >> 2.19.2
> >>
> > 

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: [PATCH v2] MAINTAINERS: add maintainers for ChromeOS EC sub-drivers
From: Enric Balletbo i Serra @ 2018-12-13  9:55 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: linux-kernel, Alessandro Zummo, linux-pwm, linux-iio, linux-i2c,
	groeck, kernel, linux-rtc, Chanwoo Choi, Benson Leung,
	Sebastian Reichel, linux-input, Dmitry Torokhov, Jonathan Cameron,
	Peter Meerwald-Stadler, devicetree, Thierry Reding, linux-pm,
	MyungJoo Ham, Lee Jones, Hartmut Knaack, Rob Herring,
	Lars-Peter Clausen <lars@
In-Reply-To: <20181213095050.GM19816@piout.net>



On 13/12/18 10:50, Alexandre Belloni wrote:
> On 13/12/2018 10:30:16+0100, Enric Balletbo i Serra wrote:
>>> However, you should probably indicate which tree do you expect that to
>>> go through ;)
>>>
>>
>> Well, these are sub-drivers for different subsystems but are related to the main
>> ChromeOS EC. I expect all go through their specific subsystem and their
>> maintainer. I.e the rtc driver go through your tree, the mfd go through Lee's
>> tree, iio drivers through Jonathan's tree, etc. This is the reason I did not add
>> the tree. Main purpose here as that Benson and I are aware when someone sends a
>> change on one of the sub-drivers and we can review these patches.
>>
> 
> Sure, sorry I was not clear but I was asking about this particular
> patch because as it is, you will get acks from all the maintainers but I
> think they all think someone else will apply it ;)
> 

Ah, ok, I didn't got it :)

If nobody complains and we have all the acks I think that this can go through
the Benson's tree (chrome-platform). The reason is that he already has a couple
of patches related to this (remove Olof as a chrome-platform maintainer and
adding me)

>> Thanks,
>>  Enric
>>
>>>> ---
>>>>
>>>> Changes in v2:
>>>> - Fix typo in Benson email address.
>>>>
>>>>  MAINTAINERS | 24 ++++++++++++++++++++++++
>>>>  1 file changed, 24 insertions(+)
>>>>
>>>> diff --git a/MAINTAINERS b/MAINTAINERS
>>>> index a24129b0b043..bbe7180e2851 100644
>>>> --- a/MAINTAINERS
>>>> +++ b/MAINTAINERS
>>>> @@ -3625,6 +3625,30 @@ S:	Maintained
>>>>  T:	git git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform.git
>>>>  F:	drivers/platform/chrome/
>>>>  
>>>> +CHROMEOS EC SUBDRIVERS
>>>> +M:	Benson Leung <bleung@chromium.org>
>>>> +M:	Enric Balletbo i Serra <enric.balletbo@collabora.com>
>>>> +S:	Maintained
>>>> +F:	Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.txt
>>>> +F:	Documentation/devicetree/bindings/input/cros-ec-keyb.txt
>>>> +F:	Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.txt
>>>> +F:	Documentation/devicetree/bindings/i2c/i2c-cros-ec-tunnel.txt
>>>> +F:	Documentation/devicetree/bindings/mfd/cros-ec.txt
>>>> +F:	Documentation/ABI/testing/sysfs-bus-iio-cros-ec
>>>> +F:	drivers/extcon/extcon-usbc-cros-ec.c
>>>> +F:	drivers/i2c/busses/i2c-cros-ec-tunnel.c
>>>> +F:	drivers/iio/accel/cros_ec*
>>>> +F:	drivers/iio/common/cros_ec_sensors/
>>>> +F:	drivers/iio/light/cros_ec*
>>>> +F:	drivers/iio/pressure/cros_ec*
>>>> +F:	drivers/input/keyboard/cros_ec*
>>>> +F:	drivers/mfd/cros_ec*
>>>> +F:	drivers/power/supply/cros_usbpd-charger.c
>>>> +F:	drivers/pwm/pwm-cros-ec.c
>>>> +F:	drivers/rtc/rtc-cros-ec.c
>>>> +F:	include/linux/iio/common/cros_ec_sensors_core.h
>>>> +F:	include/linux/mfd/cros_ec*
>>>> +
>>>>  CIRRUS LOGIC AUDIO CODEC DRIVERS
>>>>  M:	Brian Austin <brian.austin@cirrus.com>
>>>>  M:	Paul Handrigan <Paul.Handrigan@cirrus.com>
>>>> -- 
>>>> 2.19.2
>>>>
>>>
> 

^ permalink raw reply

* Re: [PATCH v2] MAINTAINERS: add maintainers for ChromeOS EC sub-drivers
From: Alexandre Belloni @ 2018-12-13 10:59 UTC (permalink / raw)
  To: Enric Balletbo i Serra
  Cc: linux-kernel, Alessandro Zummo, linux-pwm, linux-iio, linux-i2c,
	groeck, kernel, linux-rtc, Chanwoo Choi, Benson Leung,
	Sebastian Reichel, linux-input, Dmitry Torokhov, Jonathan Cameron,
	Peter Meerwald-Stadler, devicetree, Thierry Reding, linux-pm,
	MyungJoo Ham, Lee Jones, Hartmut Knaack, Rob Herring,
	Lars-Peter Clausen <lars@
In-Reply-To: <d603fcb9-c1f1-a622-5774-10fac45fc7a5@collabora.com>

On 13/12/2018 10:55:29+0100, Enric Balletbo i Serra wrote:
> 
> 
> On 13/12/18 10:50, Alexandre Belloni wrote:
> > On 13/12/2018 10:30:16+0100, Enric Balletbo i Serra wrote:
> >>> However, you should probably indicate which tree do you expect that to
> >>> go through ;)
> >>>
> >>
> >> Well, these are sub-drivers for different subsystems but are related to the main
> >> ChromeOS EC. I expect all go through their specific subsystem and their
> >> maintainer. I.e the rtc driver go through your tree, the mfd go through Lee's
> >> tree, iio drivers through Jonathan's tree, etc. This is the reason I did not add
> >> the tree. Main purpose here as that Benson and I are aware when someone sends a
> >> change on one of the sub-drivers and we can review these patches.
> >>
> > 
> > Sure, sorry I was not clear but I was asking about this particular
> > patch because as it is, you will get acks from all the maintainers but I
> > think they all think someone else will apply it ;)
> > 
> 
> Ah, ok, I didn't got it :)
> 
> If nobody complains and we have all the acks I think that this can go through
> the Benson's tree (chrome-platform). The reason is that he already has a couple
> of patches related to this (remove Olof as a chrome-platform maintainer and
> adding me)
> 

Ok, great.


-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: [PATCH] MAINTAINERS: add maintainers for ChromeOS EC sub-drivers
From: Guenter Roeck @ 2018-12-13 14:43 UTC (permalink / raw)
  To: Enric Balletbo i Serra
  Cc: linux-kernel, a.zummo, linux-pwm, linux-iio, alexandre.belloni,
	linux-i2c, Guenter Roeck, kernel, linux-rtc, Chanwoo Choi,
	Sebastian Reichel, linux-input, Dmitry Torokhov, Jonathan Cameron,
	Peter Meerwald-Stadler,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE, thierry.reding,
	linux-pm, bleung, MyungJoo Ham, Lee Jones, Hartmut Knaack, Rob
In-Reply-To: <20181211190053.9997-1-enric.balletbo@collabora.com>

Enric,

On Tue, Dec 11, 2018 at 11:01 AM Enric Balletbo i Serra
<enric.balletbo@collabora.com> wrote:
>
> There are multiple ChromeOS EC sub-drivers spread in different
> subsystems, as all of them are related to the Chrome stuff add
> Benson and myself as a maintainers for all these sub-drivers.
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---
>
>  MAINTAINERS | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index a24129b0b043..2f24f5c977ca 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -3625,6 +3625,30 @@ S:       Maintained
>  T:     git git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform.git
>  F:     drivers/platform/chrome/
>
> +CHROMEOS EC SUBDRIVERS
> +M:     Benson Leung <bleung@chromiumg.org>
> +M:     Enric Balletbo i Serra <enric.balletbo@collabora.com>

It might possibly make sense to add

R: Guenter Roeck <groeck@chromium.org>

since it looks like I am doing a lot of the actual reviewing anyway.

Thanks,
Guenter

> +S:     Maintained
> +F:     Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.txt
> +F:     Documentation/devicetree/bindings/input/cros-ec-keyb.txt
> +F:     Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.txt
> +F:     Documentation/devicetree/bindings/i2c/i2c-cros-ec-tunnel.txt
> +F:     Documentation/devicetree/bindings/mfd/cros-ec.txt
> +F:     Documentation/ABI/testing/sysfs-bus-iio-cros-ec
> +F:     drivers/extcon/extcon-usbc-cros-ec.c
> +F:     drivers/i2c/busses/i2c-cros-ec-tunnel.c
> +F:     drivers/iio/accel/cros_ec*
> +F:     drivers/iio/common/cros_ec_sensors/
> +F:     drivers/iio/light/cros_ec*
> +F:     drivers/iio/pressure/cros_ec*
> +F:     drivers/input/keyboard/cros_ec*
> +F:     drivers/mfd/cros_ec*
> +F:     drivers/power/supply/cros_usbpd-charger.c
> +F:     drivers/pwm/pwm-cros-ec.c
> +F:     drivers/rtc/rtc-cros-ec.c
> +F:     include/linux/iio/common/cros_ec_sensors_core.h
> +F:     include/linux/mfd/cros_ec*
> +
>  CIRRUS LOGIC AUDIO CODEC DRIVERS
>  M:     Brian Austin <brian.austin@cirrus.com>
>  M:     Paul Handrigan <Paul.Handrigan@cirrus.com>
> --
> 2.19.2
>

^ permalink raw reply

* Re: [PATCH v4] Input: i8042 add i8042_is_mr_coffee() helper to avoid refconut leak
From: kbuild test robot @ 2018-12-14  2:27 UTC (permalink / raw)
  Cc: kbuild-all, dmitry.torokhov, linux-input, linux-kernel,
	Yangtao Li
In-Reply-To: <20181212163548.23723-1-tiny.windzz@gmail.com>

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

Hi Yangtao,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on input/next]
[also build test ERROR on v4.20-rc6 next-20181213]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Yangtao-Li/Input-i8042-add-i8042_is_mr_coffee-helper-to-avoid-refconut-leak/20181214-043211
base:   https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=sparc64 

All errors (new ones prefixed by >>):

   In file included from drivers/input/serio/i8042.h:26:0,
                    from drivers/input/serio/i8042.c:132:
   drivers/input/serio/i8042-sparcio.h: In function 'i8042_is_mr_coffee':
>> drivers/input/serio/i8042-sparcio.h:115:2: error: 'is_mr_coffree' undeclared (first use in this function); did you mean 'is_mr_coffee'?
     is_mr_coffree = !strcmp(root->name, "SUNW,JavaStation-1");
     ^~~~~~~~~~~~~
     is_mr_coffee
   drivers/input/serio/i8042-sparcio.h:115:2: note: each undeclared identifier is reported only once for each function it appears in

vim +115 drivers/input/serio/i8042-sparcio.h

   108	
   109	static inline bool i8042_is_mr_coffee(void)
   110	{
   111		struct device_node *root;
   112		bool is_mr_coffee;
   113	
   114		root = of_find_node_by_path("/");
 > 115		is_mr_coffree = !strcmp(root->name, "SUNW,JavaStation-1");
   116		of_node_put(root);
   117	
   118		return is_mr_coffee;
   119	}
   120	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 53105 bytes --]

^ permalink raw reply

* Re: [PATCH] HID: asus: Add support for the ASUS T101HA keyboard dock
From: Aleix Roca Nonell @ 2018-12-14  8:07 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires; +Cc: linux-input, linux-kernel, mbrugger
In-Reply-To: <20181201190153.GB4995@arks.localdomain>

Kind remminder ping :)

I'm also adding my fellow Matthias in CC

On Sat, Dec 01, 2018 at 08:01:53PM +0100, Aleix Roca Nonell wrote:
> The ASUS T101HA keyboard dock generates HID events using the ASUS vendor
> specific UsagePage 0xff31. In consequence, some multimedia keys such as
> brightness up and down are not working with hid-generic.
> 
> This commit adds the T101HA dock into the supported device list of the
> hid-asus driver. It also prevents the dock's integrated touchpad to be
> bound with hid-asus given that it is already working fine with
> hid-multitouch.
> 
> Signed-off-by: Aleix Roca Nonell <kernelrocks@gmail.com>
> ---
> 
> This is my very first kernel patch done in my free time (be aware of the
> newbie!!) so please, let me know if I can improve anything and I will
> happily do it :)
> 
>  drivers/hid/hid-asus.c | 12 ++++++++++++
>  drivers/hid/hid-ids.h  |  1 +
>  2 files changed, 13 insertions(+)
> 
> diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
> index ab8bd40a77ed..d8b55dca97c6 100644
> --- a/drivers/hid/hid-asus.c
> +++ b/drivers/hid/hid-asus.c
> @@ -42,6 +42,7 @@ MODULE_AUTHOR("Frederik Wenigwieser <frederik.wenigwieser@gmail.com>");
>  MODULE_DESCRIPTION("Asus HID Keyboard and TouchPad");
>  
>  #define T100_TPAD_INTF 2
> +#define T101HA_TPAD_INTF 2
>  
>  #define T100CHI_MOUSE_REPORT_ID 0x06
>  #define FEATURE_REPORT_ID 0x0d
> @@ -70,6 +71,7 @@ MODULE_DESCRIPTION("Asus HID Keyboard and TouchPad");
>  #define QUIRK_T100_KEYBOARD		BIT(6)
>  #define QUIRK_T100CHI			BIT(7)
>  #define QUIRK_G752_KEYBOARD		BIT(8)
> +#define QUIRK_T101HA_DOCK		BIT(9)
>  
>  #define I2C_KEYBOARD_QUIRKS			(QUIRK_FIX_NOTEBOOK_REPORT | \
>  						 QUIRK_NO_INIT_REPORTS | \
> @@ -649,6 +651,14 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
>  	int ret;
>  	struct asus_drvdata *drvdata;
>  
> +	if (id->driver_data & QUIRK_T101HA_DOCK) {
> +		struct usb_interface *intf = to_usb_interface(hdev->dev.parent);
> +
> +		/* use hid-multitouch for T101HA touchpad */
> +		if (intf->altsetting->desc.bInterfaceNumber == T101HA_TPAD_INTF)
> +			return -ENODEV;
> +	}
> +
>  	drvdata = devm_kzalloc(&hdev->dev, sizeof(*drvdata), GFP_KERNEL);
>  	if (drvdata == NULL) {
>  		hid_err(hdev, "Can't alloc Asus descriptor\n");
> @@ -830,6 +840,8 @@ static const struct hid_device_id asus_devices[] = {
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
>  		USB_DEVICE_ID_ASUSTEK_T100TAF_KEYBOARD),
>  	  QUIRK_T100_KEYBOARD | QUIRK_NO_CONSUMER_USAGES },
> +	{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
> +		USB_DEVICE_ID_ASUSTEK_T101HA_KEYBOARD), QUIRK_T101HA_DOCK },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_ASUS_AK1D) },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_ASUS_MD_5110) },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_ASUS_MD_5112) },
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index 4206428c0ba2..f1eee2778b70 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -184,6 +184,7 @@
>  #define USB_DEVICE_ID_ASUSTEK_T100TA_KEYBOARD	0x17e0
>  #define USB_DEVICE_ID_ASUSTEK_T100TAF_KEYBOARD	0x1807
>  #define USB_DEVICE_ID_ASUSTEK_T100CHI_KEYBOARD	0x8502
> +#define USB_DEVICE_ID_ASUSTEK_T101HA_KEYBOARD	0x183d
>  #define USB_DEVICE_ID_ASUSTEK_T304_KEYBOARD	0x184a
>  #define USB_DEVICE_ID_ASUSTEK_I2C_KEYBOARD	0x8585
>  #define USB_DEVICE_ID_ASUSTEK_I2C_TOUCHPAD	0x0101
> -- 
> 2.19.2
> 

^ permalink raw reply

* Re: [PATCH] HID: asus: Add support for the ASUS T101HA keyboard dock
From: Benjamin Tissoires @ 2018-12-14  8:25 UTC (permalink / raw)
  To: kernelrocks; +Cc: Jiri Kosina, open list:HID CORE LAYER, lkml, mbrugger
In-Reply-To: <20181214080700.GA4189@rocks>

Hi Aleix,

On Fri, Dec 14, 2018 at 9:07 AM Aleix Roca Nonell <kernelrocks@gmail.com> wrote:
>
> Kind remminder ping :)

Hehe, I have seen the patch floating by and realized I would need more
than 2 minutes to answer it so it fell a little bit behind in my TODO
list.

Let's try to work on this now.

>
> I'm also adding my fellow Matthias in CC
>
> On Sat, Dec 01, 2018 at 08:01:53PM +0100, Aleix Roca Nonell wrote:
> > The ASUS T101HA keyboard dock generates HID events using the ASUS vendor
> > specific UsagePage 0xff31. In consequence, some multimedia keys such as
> > brightness up and down are not working with hid-generic.
> >
> > This commit adds the T101HA dock into the supported device list of the
> > hid-asus driver. It also prevents the dock's integrated touchpad to be
> > bound with hid-asus given that it is already working fine with
> > hid-multitouch.
> >
> > Signed-off-by: Aleix Roca Nonell <kernelrocks@gmail.com>
> > ---
> >
> > This is my very first kernel patch done in my free time (be aware of the
> > newbie!!) so please, let me know if I can improve anything and I will
> > happily do it :)
> >
> >  drivers/hid/hid-asus.c | 12 ++++++++++++
> >  drivers/hid/hid-ids.h  |  1 +
> >  2 files changed, 13 insertions(+)
> >
> > diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
> > index ab8bd40a77ed..d8b55dca97c6 100644
> > --- a/drivers/hid/hid-asus.c
> > +++ b/drivers/hid/hid-asus.c
> > @@ -42,6 +42,7 @@ MODULE_AUTHOR("Frederik Wenigwieser <frederik.wenigwieser@gmail.com>");
> >  MODULE_DESCRIPTION("Asus HID Keyboard and TouchPad");
> >
> >  #define T100_TPAD_INTF 2
> > +#define T101HA_TPAD_INTF 2
> >
> >  #define T100CHI_MOUSE_REPORT_ID 0x06
> >  #define FEATURE_REPORT_ID 0x0d
> > @@ -70,6 +71,7 @@ MODULE_DESCRIPTION("Asus HID Keyboard and TouchPad");
> >  #define QUIRK_T100_KEYBOARD          BIT(6)
> >  #define QUIRK_T100CHI                        BIT(7)
> >  #define QUIRK_G752_KEYBOARD          BIT(8)
> > +#define QUIRK_T101HA_DOCK            BIT(9)
> >
> >  #define I2C_KEYBOARD_QUIRKS                  (QUIRK_FIX_NOTEBOOK_REPORT | \
> >                                                QUIRK_NO_INIT_REPORTS | \
> > @@ -649,6 +651,14 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
> >       int ret;
> >       struct asus_drvdata *drvdata;
> >
> > +     if (id->driver_data & QUIRK_T101HA_DOCK) {
> > +             struct usb_interface *intf = to_usb_interface(hdev->dev.parent);

I know the hid-asus driver already does this for the other devices,
but it would be nice not to. USB is part of the low level transport
and HID drivers should have no reasons to assume the USB driver is
used and that it will stay forever.

What I ask when we have such a case is to check on the report
descriptor to see if there is anything we could use in it (usually the
application) to skip this HID interface.

Besides that, there is not much more to say.

For having a look at the report descriptor, you can either use printk
in the kernel, or use hid-recorder as root in
https://gitlab.freedesktop.org/libevdev/hid-tools.

Cheers,
Benjamin

> > +
> > +             /* use hid-multitouch for T101HA touchpad */
> > +             if (intf->altsetting->desc.bInterfaceNumber == T101HA_TPAD_INTF)
> > +                     return -ENODEV;
> > +     }
> > +
> >       drvdata = devm_kzalloc(&hdev->dev, sizeof(*drvdata), GFP_KERNEL);
> >       if (drvdata == NULL) {
> >               hid_err(hdev, "Can't alloc Asus descriptor\n");
> > @@ -830,6 +840,8 @@ static const struct hid_device_id asus_devices[] = {
> >       { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
> >               USB_DEVICE_ID_ASUSTEK_T100TAF_KEYBOARD),
> >         QUIRK_T100_KEYBOARD | QUIRK_NO_CONSUMER_USAGES },
> > +     { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
> > +             USB_DEVICE_ID_ASUSTEK_T101HA_KEYBOARD), QUIRK_T101HA_DOCK },
> >       { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_ASUS_AK1D) },
> >       { HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_ASUS_MD_5110) },
> >       { HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_ASUS_MD_5112) },
> > diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> > index 4206428c0ba2..f1eee2778b70 100644
> > --- a/drivers/hid/hid-ids.h
> > +++ b/drivers/hid/hid-ids.h
> > @@ -184,6 +184,7 @@
> >  #define USB_DEVICE_ID_ASUSTEK_T100TA_KEYBOARD        0x17e0
> >  #define USB_DEVICE_ID_ASUSTEK_T100TAF_KEYBOARD       0x1807
> >  #define USB_DEVICE_ID_ASUSTEK_T100CHI_KEYBOARD       0x8502
> > +#define USB_DEVICE_ID_ASUSTEK_T101HA_KEYBOARD        0x183d
> >  #define USB_DEVICE_ID_ASUSTEK_T304_KEYBOARD  0x184a
> >  #define USB_DEVICE_ID_ASUSTEK_I2C_KEYBOARD   0x8585
> >  #define USB_DEVICE_ID_ASUSTEK_I2C_TOUCHPAD   0x0101
> > --
> > 2.19.2
> >

^ permalink raw reply

* [PATCH] HID: i2c-hid: Ignore input report if there's no data present on Elan touchpanels
From: Kai-Heng Feng @ 2018-12-14  9:09 UTC (permalink / raw)
  To: jikos, benjamin.tissoires; +Cc: linux-input, linux-kernel, Kai-Heng Feng

While using Elan touchpads, the message floods:
[  136.138487] i2c_hid i2c-DELL08D6:00: i2c_hid_get_input: incomplete report (14/65535)

Though the message flood is annoying, the device it self works without
any issue. I suspect that the device in question takes too much time to
pull the IRQ back to high after I2C host has done reading its data.

Since the host receives all useful data, let's ignore the input report
when there's no data.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/hid/i2c-hid/i2c-hid-core.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
index 8555ce7e737b..1776afa6d69c 100644
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -50,6 +50,7 @@
 #define I2C_HID_QUIRK_NO_IRQ_AFTER_RESET	BIT(1)
 #define I2C_HID_QUIRK_NO_RUNTIME_PM		BIT(2)
 #define I2C_HID_QUIRK_DELAY_AFTER_SLEEP		BIT(3)
+#define I2C_HID_QUIRK_BOGUS_IRQ			BIT(4)
 
 /* flags */
 #define I2C_HID_STARTED		0
@@ -179,6 +180,8 @@ static const struct i2c_hid_quirks {
 		I2C_HID_QUIRK_DELAY_AFTER_SLEEP },
 	{ USB_VENDOR_ID_LG, I2C_DEVICE_ID_LG_8001,
 		I2C_HID_QUIRK_NO_RUNTIME_PM },
+	{ USB_VENDOR_ID_ELAN, HID_ANY_ID,
+		 I2C_HID_QUIRK_BOGUS_IRQ },
 	{ 0, 0 }
 };
 
@@ -503,6 +506,12 @@ static void i2c_hid_get_input(struct i2c_hid *ihid)
 		return;
 	}
 
+	if (ihid->quirks & I2C_HID_QUIRK_BOGUS_IRQ && ret_size == 0xffff) {
+		dev_dbg(&ihid->client->dev,
+			"%s: IRQ triggered but there's no data\n", __func__);
+		return;
+	}
+
 	if ((ret_size > size) || (ret_size < 2)) {
 		dev_err(&ihid->client->dev, "%s: incomplete report (%d/%d)\n",
 			__func__, size, ret_size);
-- 
2.17.1

^ permalink raw reply related

* [PATCH v3] MAINTAINERS: add maintainers for ChromeOS EC sub-drivers
From: Enric Balletbo i Serra @ 2018-12-14 11:48 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alessandro Zummo, linux-pwm, linux-iio, Alexandre Belloni,
	linux-i2c, groeck, kernel, linux-rtc, Chanwoo Choi, Benson Leung,
	Sebastian Reichel, linux-input, Dmitry Torokhov, Jonathan Cameron,
	Peter Meerwald-Stadler, devicetree, Thierry Reding, linux-pm,
	MyungJoo Ham, Lee Jones, Hartmut Knaack, Rob Herring, Lars

There are multiple ChromeOS EC sub-drivers spread in different
subsystems, as all of them are related to the Chrome stuff add
Benson and myself as a maintainers for all these sub-drivers.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Benson Leung <bleung@chromium.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> for iio parts.
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
---

Changes in v3:
- Add collected acks
- Use a cros[-_]ec pattern instead of list all the files.
- Add Guenter as a reviewer.

Changes in v2:
- Fix typo in Benson email address.

 MAINTAINERS | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index e7260191301b..437e036435d5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3629,6 +3629,14 @@ S:	Maintained
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform.git
 F:	drivers/platform/chrome/
 
+CHROMEOS EC SUBDRIVERS
+M:	Benson Leung <bleung@chromium.org>
+M:	Enric Balletbo i Serra <enric.balletbo@collabora.com>
+R:	Guenter Roeck <groeck@chromium.org>
+S:	Maintained
+N:	cros[-_]ec
+F:	drivers/power/supply/cros_usbpd-charger.c
+
 CIRRUS LOGIC AUDIO CODEC DRIVERS
 M:	Brian Austin <brian.austin@cirrus.com>
 M:	Paul Handrigan <Paul.Handrigan@cirrus.com>
-- 
2.19.2

^ permalink raw reply related

* Re: [PATCH v3] MAINTAINERS: add maintainers for ChromeOS EC sub-drivers
From: Enric Balletbo i Serra @ 2018-12-14 11:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alessandro Zummo, linux-pwm, linux-iio, Alexandre Belloni,
	linux-i2c, groeck, kernel, linux-rtc, Chanwoo Choi, Benson Leung,
	Sebastian Reichel, linux-input, Dmitry Torokhov, Jonathan Cameron,
	Peter Meerwald-Stadler, devicetree, Thierry Reding, linux-pm,
	MyungJoo Ham, Lee Jones, Hartmut Knaack, Rob Herring, Lars
In-Reply-To: <20181214114858.21231-1-enric.balletbo@collabora.com>



On 14/12/18 12:48, Enric Balletbo i Serra wrote:
> There are multiple ChromeOS EC sub-drivers spread in different
> subsystems, as all of them are related to the Chrome stuff add
> Benson and myself as a maintainers for all these sub-drivers.
> 
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Signed-off-by: Benson Leung <bleung@chromium.org>
> Acked-by: Wolfram Sang <wsa@the-dreams.de>
> Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> for iio parts.

Ok, I resend the patch too quickly and I forget to remove the `for iio parts`.I
will wait a bit more for if I receive more acks and send a v4 to fix this.

> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Acked-by: Lee Jones <lee.jones@linaro.org>
> ---
> 
> Changes in v3:
> - Add collected acks
> - Use a cros[-_]ec pattern instead of list all the files.
> - Add Guenter as a reviewer.
> 
> Changes in v2:
> - Fix typo in Benson email address.
> 
>  MAINTAINERS | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index e7260191301b..437e036435d5 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -3629,6 +3629,14 @@ S:	Maintained
>  T:	git git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform.git
>  F:	drivers/platform/chrome/
>  
> +CHROMEOS EC SUBDRIVERS
> +M:	Benson Leung <bleung@chromium.org>
> +M:	Enric Balletbo i Serra <enric.balletbo@collabora.com>
> +R:	Guenter Roeck <groeck@chromium.org>
> +S:	Maintained
> +N:	cros[-_]ec
> +F:	drivers/power/supply/cros_usbpd-charger.c
> +
>  CIRRUS LOGIC AUDIO CODEC DRIVERS
>  M:	Brian Austin <brian.austin@cirrus.com>
>  M:	Paul Handrigan <Paul.Handrigan@cirrus.com>
> 

^ permalink raw reply

* Re: [PATCH v7 0/7] Introduce STPMIC1 PMIC Driver
From: Lee Jones @ 2018-12-14 12:47 UTC (permalink / raw)
  To: Pascal PAILLET-LME
  Cc: dmitry.torokhov@gmail.com, robh+dt@kernel.org,
	mark.rutland@arm.com, lgirdwood@gmail.com, broonie@kernel.org,
	wim@linux-watchdog.org, linux@roeck-us.net,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org,
	benjamin.gaignard@linaro.org, eballetbo@gmail.com,
	axel.lin@ingics.com
In-Reply-To: <1543571742-17995-1-git-send-email-p.paillet@st.com>

On Fri, 30 Nov 2018, Pascal PAILLET-LME wrote:

> The goal of this patch-set is to propose a driver for the STPMIC1 PMIC from 
> STMicroelectronics. 
> The STPMIC1 regulators supply power to an application processor as well as 
> to external system peripherals such as DDR, Flash memories and system
> devices. It also features onkey button input and an hardware watchdog.
> The STPMIC1 is controlled via I2C. 
> 
> Main driver is drivers/mfd/stpmic1 that handle I2C regmap configuration and
> irqchip. stpmic1_regulator, stpmic1_onkey and stpmic1_wdt need stpmic1 mfd
> as parent.
> 
> STPMIC1 MFD and regulator drivers maybe mandatory at boot time.
> 
> Pascal Paillet (7):
> changes in v7:
> * rebase on regul/for-next
> 
>   dt-bindings: mfd: document stpmic1
>   mfd: stpmic1: add stpmic1 driver
>   dt-bindings: input: document stpmic1 pmic onkey
>   input: stpmic1: add stpmic1 onkey driver
>   dt-bindings: watchdog: document stpmic1 pmic watchdog
>   watchdog: stpmic1: add stpmic1 watchdog driver
>   regulator: stpmic1: fix regulator_lock usage

Could you please remove any patches which have been applied and
[RESEND]?

Also, is Dmitry planning on Acking:

  dt-bindings: input: document stpmic1 pmic onkey

... or is Rob's Ack enough?

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply

* Re: [PATCH v3] MAINTAINERS: add maintainers for ChromeOS EC sub-drivers
From: Sebastian Reichel @ 2018-12-14 13:17 UTC (permalink / raw)
  To: Enric Balletbo i Serra
  Cc: linux-kernel, Alessandro Zummo, linux-pwm, linux-iio,
	Alexandre Belloni, linux-i2c, groeck, kernel, linux-rtc,
	Chanwoo Choi, Benson Leung, linux-input, Dmitry Torokhov,
	Jonathan Cameron, Peter Meerwald-Stadler, devicetree,
	Thierry Reding, linux-pm, MyungJoo Ham, Lee Jones, Hartmut Knaack,
	Rob Herring, Lars-Peter
In-Reply-To: <20181214114858.21231-1-enric.balletbo@collabora.com>

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

Hi,

On Fri, Dec 14, 2018 at 12:48:58PM +0100, Enric Balletbo i Serra wrote:
> There are multiple ChromeOS EC sub-drivers spread in different
> subsystems, as all of them are related to the Chrome stuff add
> Benson and myself as a maintainers for all these sub-drivers.
> 
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Signed-off-by: Benson Leung <bleung@chromium.org>
> Acked-by: Wolfram Sang <wsa@the-dreams.de>
> Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> for iio parts.
> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Acked-by: Lee Jones <lee.jones@linaro.org>
> ---

Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>

-- Sebastian

> 
> Changes in v3:
> - Add collected acks
> - Use a cros[-_]ec pattern instead of list all the files.
> - Add Guenter as a reviewer.
> 
> Changes in v2:
> - Fix typo in Benson email address.
> 
>  MAINTAINERS | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index e7260191301b..437e036435d5 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -3629,6 +3629,14 @@ S:	Maintained
>  T:	git git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform.git
>  F:	drivers/platform/chrome/
>  
> +CHROMEOS EC SUBDRIVERS
> +M:	Benson Leung <bleung@chromium.org>
> +M:	Enric Balletbo i Serra <enric.balletbo@collabora.com>
> +R:	Guenter Roeck <groeck@chromium.org>
> +S:	Maintained
> +N:	cros[-_]ec
> +F:	drivers/power/supply/cros_usbpd-charger.c
> +
>  CIRRUS LOGIC AUDIO CODEC DRIVERS
>  M:	Brian Austin <brian.austin@cirrus.com>
>  M:	Paul Handrigan <Paul.Handrigan@cirrus.com>
> -- 
> 2.19.2
> 
> 
> -- 
> To unsubscribe, send mail to kernel-unsubscribe@lists.collabora.co.uk.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply

* Re: [PATCH] HID: asus: Add support for the ASUS T101HA keyboard dock
From: Aleix Roca Nonell @ 2018-12-14 13:34 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: Jiri Kosina, open list:HID CORE LAYER, lkml, mbrugger
In-Reply-To: <CAO-hwJJRuBbHKCmW4vcmjdDkNEF0==wuLC5ymSkw8mOHnkdwwQ@mail.gmail.com>

Hi Benjamin! :D

On Fri, Dec 14, 2018 at 09:25:20AM +0100, Benjamin Tissoires wrote:
> Hi Aleix,
> 
> On Fri, Dec 14, 2018 at 9:07 AM Aleix Roca Nonell <kernelrocks@gmail.com> wrote:
> >
> > Kind remminder ping :)
> 
> Hehe, I have seen the patch floating by and realized I would need more
> than 2 minutes to answer it so it fell a little bit behind in my TODO
> list.
> 
> Let's try to work on this now.
> 
> >
> > I'm also adding my fellow Matthias in CC
> >
> > On Sat, Dec 01, 2018 at 08:01:53PM +0100, Aleix Roca Nonell wrote:
> > > The ASUS T101HA keyboard dock generates HID events using the ASUS vendor
> > > specific UsagePage 0xff31. In consequence, some multimedia keys such as
> > > brightness up and down are not working with hid-generic.
> > >
> > > This commit adds the T101HA dock into the supported device list of the
> > > hid-asus driver. It also prevents the dock's integrated touchpad to be
> > > bound with hid-asus given that it is already working fine with
> > > hid-multitouch.
> > >
> > > Signed-off-by: Aleix Roca Nonell <kernelrocks@gmail.com>
> > > ---
> > >
> > > This is my very first kernel patch done in my free time (be aware of the
> > > newbie!!) so please, let me know if I can improve anything and I will
> > > happily do it :)
> > >
> > >  drivers/hid/hid-asus.c | 12 ++++++++++++
> > >  drivers/hid/hid-ids.h  |  1 +
> > >  2 files changed, 13 insertions(+)
> > >
> > > diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
> > > index ab8bd40a77ed..d8b55dca97c6 100644
> > > --- a/drivers/hid/hid-asus.c
> > > +++ b/drivers/hid/hid-asus.c
> > > @@ -42,6 +42,7 @@ MODULE_AUTHOR("Frederik Wenigwieser <frederik.wenigwieser@gmail.com>");
> > >  MODULE_DESCRIPTION("Asus HID Keyboard and TouchPad");
> > >
> > >  #define T100_TPAD_INTF 2
> > > +#define T101HA_TPAD_INTF 2
> > >
> > >  #define T100CHI_MOUSE_REPORT_ID 0x06
> > >  #define FEATURE_REPORT_ID 0x0d
> > > @@ -70,6 +71,7 @@ MODULE_DESCRIPTION("Asus HID Keyboard and TouchPad");
> > >  #define QUIRK_T100_KEYBOARD          BIT(6)
> > >  #define QUIRK_T100CHI                        BIT(7)
> > >  #define QUIRK_G752_KEYBOARD          BIT(8)
> > > +#define QUIRK_T101HA_DOCK            BIT(9)
> > >
> > >  #define I2C_KEYBOARD_QUIRKS                  (QUIRK_FIX_NOTEBOOK_REPORT | \
> > >                                                QUIRK_NO_INIT_REPORTS | \
> > > @@ -649,6 +651,14 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
> > >       int ret;
> > >       struct asus_drvdata *drvdata;
> > >
> > > +     if (id->driver_data & QUIRK_T101HA_DOCK) {
> > > +             struct usb_interface *intf = to_usb_interface(hdev->dev.parent);
> 
> I know the hid-asus driver already does this for the other devices,
> but it would be nice not to. USB is part of the low level transport
> and HID drivers should have no reasons to assume the USB driver is
> used and that it will stay forever.
> 
> What I ask when we have such a case is to check on the report
> descriptor to see if there is anything we could use in it (usually the
> application) to skip this HID interface.
> 
> Besides that, there is not much more to say.

Great I will do that!

> For having a look at the report descriptor, you can either use printk
> in the kernel, or use hid-recorder as root in
> https://gitlab.freedesktop.org/libevdev/hid-tools.

Regarding the descriptor, shouldn't be ok to check
/sys/kernel/debug/hid/<dev>/rdesc ?

Thank you!

> 
> Cheers,
> Benjamin
> 
> > > +
> > > +             /* use hid-multitouch for T101HA touchpad */
> > > +             if (intf->altsetting->desc.bInterfaceNumber == T101HA_TPAD_INTF)
> > > +                     return -ENODEV;
> > > +     }
> > > +
> > >       drvdata = devm_kzalloc(&hdev->dev, sizeof(*drvdata), GFP_KERNEL);
> > >       if (drvdata == NULL) {
> > >               hid_err(hdev, "Can't alloc Asus descriptor\n");
> > > @@ -830,6 +840,8 @@ static const struct hid_device_id asus_devices[] = {
> > >       { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
> > >               USB_DEVICE_ID_ASUSTEK_T100TAF_KEYBOARD),
> > >         QUIRK_T100_KEYBOARD | QUIRK_NO_CONSUMER_USAGES },
> > > +     { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
> > > +             USB_DEVICE_ID_ASUSTEK_T101HA_KEYBOARD), QUIRK_T101HA_DOCK },
> > >       { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_ASUS_AK1D) },
> > >       { HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_ASUS_MD_5110) },
> > >       { HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_ASUS_MD_5112) },
> > > diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> > > index 4206428c0ba2..f1eee2778b70 100644
> > > --- a/drivers/hid/hid-ids.h
> > > +++ b/drivers/hid/hid-ids.h
> > > @@ -184,6 +184,7 @@
> > >  #define USB_DEVICE_ID_ASUSTEK_T100TA_KEYBOARD        0x17e0
> > >  #define USB_DEVICE_ID_ASUSTEK_T100TAF_KEYBOARD       0x1807
> > >  #define USB_DEVICE_ID_ASUSTEK_T100CHI_KEYBOARD       0x8502
> > > +#define USB_DEVICE_ID_ASUSTEK_T101HA_KEYBOARD        0x183d
> > >  #define USB_DEVICE_ID_ASUSTEK_T304_KEYBOARD  0x184a
> > >  #define USB_DEVICE_ID_ASUSTEK_I2C_KEYBOARD   0x8585
> > >  #define USB_DEVICE_ID_ASUSTEK_I2C_TOUCHPAD   0x0101
> > > --
> > > 2.19.2
> > >

^ permalink raw reply

* Re: [PATCH] HID: asus: Add support for the ASUS T101HA keyboard dock
From: Benjamin Tissoires @ 2018-12-14 13:37 UTC (permalink / raw)
  To: kernelrocks; +Cc: Jiri Kosina, open list:HID CORE LAYER, lkml, mbrugger
In-Reply-To: <20181214133409.GB4189@rocks>

On Fri, Dec 14, 2018 at 2:34 PM Aleix Roca Nonell <kernelrocks@gmail.com> wrote:
>
> Hi Benjamin! :D
>
> On Fri, Dec 14, 2018 at 09:25:20AM +0100, Benjamin Tissoires wrote:
> > Hi Aleix,
> >
> > On Fri, Dec 14, 2018 at 9:07 AM Aleix Roca Nonell <kernelrocks@gmail.com> wrote:
> > >
> > > Kind remminder ping :)
> >
> > Hehe, I have seen the patch floating by and realized I would need more
> > than 2 minutes to answer it so it fell a little bit behind in my TODO
> > list.
> >
> > Let's try to work on this now.
> >
> > >
> > > I'm also adding my fellow Matthias in CC
> > >
> > > On Sat, Dec 01, 2018 at 08:01:53PM +0100, Aleix Roca Nonell wrote:
> > > > The ASUS T101HA keyboard dock generates HID events using the ASUS vendor
> > > > specific UsagePage 0xff31. In consequence, some multimedia keys such as
> > > > brightness up and down are not working with hid-generic.
> > > >
> > > > This commit adds the T101HA dock into the supported device list of the
> > > > hid-asus driver. It also prevents the dock's integrated touchpad to be
> > > > bound with hid-asus given that it is already working fine with
> > > > hid-multitouch.
> > > >
> > > > Signed-off-by: Aleix Roca Nonell <kernelrocks@gmail.com>
> > > > ---
> > > >
> > > > This is my very first kernel patch done in my free time (be aware of the
> > > > newbie!!) so please, let me know if I can improve anything and I will
> > > > happily do it :)
> > > >
> > > >  drivers/hid/hid-asus.c | 12 ++++++++++++
> > > >  drivers/hid/hid-ids.h  |  1 +
> > > >  2 files changed, 13 insertions(+)
> > > >
> > > > diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
> > > > index ab8bd40a77ed..d8b55dca97c6 100644
> > > > --- a/drivers/hid/hid-asus.c
> > > > +++ b/drivers/hid/hid-asus.c
> > > > @@ -42,6 +42,7 @@ MODULE_AUTHOR("Frederik Wenigwieser <frederik.wenigwieser@gmail.com>");
> > > >  MODULE_DESCRIPTION("Asus HID Keyboard and TouchPad");
> > > >
> > > >  #define T100_TPAD_INTF 2
> > > > +#define T101HA_TPAD_INTF 2
> > > >
> > > >  #define T100CHI_MOUSE_REPORT_ID 0x06
> > > >  #define FEATURE_REPORT_ID 0x0d
> > > > @@ -70,6 +71,7 @@ MODULE_DESCRIPTION("Asus HID Keyboard and TouchPad");
> > > >  #define QUIRK_T100_KEYBOARD          BIT(6)
> > > >  #define QUIRK_T100CHI                        BIT(7)
> > > >  #define QUIRK_G752_KEYBOARD          BIT(8)
> > > > +#define QUIRK_T101HA_DOCK            BIT(9)
> > > >
> > > >  #define I2C_KEYBOARD_QUIRKS                  (QUIRK_FIX_NOTEBOOK_REPORT | \
> > > >                                                QUIRK_NO_INIT_REPORTS | \
> > > > @@ -649,6 +651,14 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
> > > >       int ret;
> > > >       struct asus_drvdata *drvdata;
> > > >
> > > > +     if (id->driver_data & QUIRK_T101HA_DOCK) {
> > > > +             struct usb_interface *intf = to_usb_interface(hdev->dev.parent);
> >
> > I know the hid-asus driver already does this for the other devices,
> > but it would be nice not to. USB is part of the low level transport
> > and HID drivers should have no reasons to assume the USB driver is
> > used and that it will stay forever.
> >
> > What I ask when we have such a case is to check on the report
> > descriptor to see if there is anything we could use in it (usually the
> > application) to skip this HID interface.
> >
> > Besides that, there is not much more to say.
>
> Great I will do that!
>
> > For having a look at the report descriptor, you can either use printk
> > in the kernel, or use hid-recorder as root in
> > https://gitlab.freedesktop.org/libevdev/hid-tools.
>
> Regarding the descriptor, shouldn't be ok to check
> /sys/kernel/debug/hid/<dev>/rdesc ?

Yep, that works too. I knew there was an other way from the kernel but
couldn't remember it :)

I am more used to hid-recorder as it agregates everything in a more
compact way and you can then replay the traces with hid-replay.

Cheers,
Benjamin

>
> Thank you!
>
> >
> > Cheers,
> > Benjamin
> >
> > > > +
> > > > +             /* use hid-multitouch for T101HA touchpad */
> > > > +             if (intf->altsetting->desc.bInterfaceNumber == T101HA_TPAD_INTF)
> > > > +                     return -ENODEV;
> > > > +     }
> > > > +
> > > >       drvdata = devm_kzalloc(&hdev->dev, sizeof(*drvdata), GFP_KERNEL);
> > > >       if (drvdata == NULL) {
> > > >               hid_err(hdev, "Can't alloc Asus descriptor\n");
> > > > @@ -830,6 +840,8 @@ static const struct hid_device_id asus_devices[] = {
> > > >       { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
> > > >               USB_DEVICE_ID_ASUSTEK_T100TAF_KEYBOARD),
> > > >         QUIRK_T100_KEYBOARD | QUIRK_NO_CONSUMER_USAGES },
> > > > +     { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
> > > > +             USB_DEVICE_ID_ASUSTEK_T101HA_KEYBOARD), QUIRK_T101HA_DOCK },
> > > >       { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_ASUS_AK1D) },
> > > >       { HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_ASUS_MD_5110) },
> > > >       { HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_ASUS_MD_5112) },
> > > > diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> > > > index 4206428c0ba2..f1eee2778b70 100644
> > > > --- a/drivers/hid/hid-ids.h
> > > > +++ b/drivers/hid/hid-ids.h
> > > > @@ -184,6 +184,7 @@
> > > >  #define USB_DEVICE_ID_ASUSTEK_T100TA_KEYBOARD        0x17e0
> > > >  #define USB_DEVICE_ID_ASUSTEK_T100TAF_KEYBOARD       0x1807
> > > >  #define USB_DEVICE_ID_ASUSTEK_T100CHI_KEYBOARD       0x8502
> > > > +#define USB_DEVICE_ID_ASUSTEK_T101HA_KEYBOARD        0x183d
> > > >  #define USB_DEVICE_ID_ASUSTEK_T304_KEYBOARD  0x184a
> > > >  #define USB_DEVICE_ID_ASUSTEK_I2C_KEYBOARD   0x8585
> > > >  #define USB_DEVICE_ID_ASUSTEK_I2C_TOUCHPAD   0x0101
> > > > --
> > > > 2.19.2
> > > >

^ permalink raw reply

* Re: [PATCH v3 7/8] HID: logitech: Enable high-resolution scrolling on Logitech mice
From: Clément VUCHENER @ 2018-12-14 13:46 UTC (permalink / raw)
  To: Peter Hutterer
  Cc: linux-input, Dmitry Torokhov, Jiri Kosina, Harry Cutts, torvalds,
	Nestor Lopez Casado, lkml, Benjamin Tissoires
In-Reply-To: <20181205004228.10714-8-peter.hutterer@who-t.net>

Le mer. 5 déc. 2018 à 01:44, Peter Hutterer <peter.hutterer@who-t.net> a écrit :
>
> From: Harry Cutts <hcutts@chromium.org>
>
> There are three features used by various Logitech mice for
> high-resolution scrolling: the scrolling acceleration bit in HID++ 1.0,
> and the x2120 and x2121 features in HID++ 2.0 and above. This patch
> supports all three, and uses the multiplier reported by the mouse for
> the HID++ 2.0+ features.

Hi, The G500s (and the G500 too, I think) does support the "scrolling
acceleration" bit. If I set it, I get around 8 events for each wheel
"click", this is what this driver expects, right? If I understood
correctly, I should try this patch with the
HIDPP_QUIRK_HI_RES_SCROLL_1P0 quirk set for my mouse.

^ permalink raw reply

* Re: [PATCH v3] MAINTAINERS: add maintainers for ChromeOS EC sub-drivers
From: Guenter Roeck @ 2018-12-14 14:29 UTC (permalink / raw)
  To: Enric Balletbo i Serra
  Cc: linux-kernel, Alessandro Zummo, linux-pwm, linux-iio,
	alexandre.belloni, linux-i2c, Guenter Roeck, kernel, linux-rtc,
	Chanwoo Choi, Benson Leung, Sebastian Reichel, linux-input,
	Dmitry Torokhov, Jonathan Cameron, Peter Meerwald-Stadler,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE, Thierry Reding,
	linux-pm, MyungJoo Ham, Lee Jones
In-Reply-To: <20181214114858.21231-1-enric.balletbo@collabora.com>

On Fri, Dec 14, 2018 at 3:49 AM Enric Balletbo i Serra
<enric.balletbo@collabora.com> wrote:
>
> There are multiple ChromeOS EC sub-drivers spread in different
> subsystems, as all of them are related to the Chrome stuff add
> Benson and myself as a maintainers for all these sub-drivers.
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Signed-off-by: Benson Leung <bleung@chromium.org>
> Acked-by: Wolfram Sang <wsa@the-dreams.de>
> Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> for iio parts.
> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Acked-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Guenter Roeck <groeck@chromium.org>

> ---
>
> Changes in v3:
> - Add collected acks
> - Use a cros[-_]ec pattern instead of list all the files.
> - Add Guenter as a reviewer.
>
> Changes in v2:
> - Fix typo in Benson email address.
>
>  MAINTAINERS | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index e7260191301b..437e036435d5 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -3629,6 +3629,14 @@ S:       Maintained
>  T:     git git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform.git
>  F:     drivers/platform/chrome/
>
> +CHROMEOS EC SUBDRIVERS
> +M:     Benson Leung <bleung@chromium.org>
> +M:     Enric Balletbo i Serra <enric.balletbo@collabora.com>
> +R:     Guenter Roeck <groeck@chromium.org>
> +S:     Maintained
> +N:     cros[-_]ec
> +F:     drivers/power/supply/cros_usbpd-charger.c
> +
>  CIRRUS LOGIC AUDIO CODEC DRIVERS
>  M:     Brian Austin <brian.austin@cirrus.com>
>  M:     Paul Handrigan <Paul.Handrigan@cirrus.com>
> --
> 2.19.2
>

^ permalink raw reply

* Re: [PATCH v7 0/7] Introduce STPMIC1 PMIC Driver
From: Pascal PAILLET-LME @ 2018-12-14 14:36 UTC (permalink / raw)
  To: Lee Jones
  Cc: dmitry.torokhov@gmail.com, robh+dt@kernel.org,
	mark.rutland@arm.com, lgirdwood@gmail.com, broonie@kernel.org,
	wim@linux-watchdog.org, linux@roeck-us.net,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org,
	benjamin.gaignard@linaro.org, eballetbo@gmail.com,
	axel.lin@ingics.com
In-Reply-To: <20181214124701.GZ4497@dell>

Hello Lee,

Le 12/14/2018 01:47 PM, Lee Jones a écrit :
> changes in v7:
> * rebase on regul/for-next
>
>    dt-bindings: mfd: document stpmic1
>    mfd: stpmic1: add stpmic1 driver
>    dt-bindings: input: document stpmic1 pmic onkey
>    input: stpmic1: add stpmic1 onkey driver
>    dt-bindings: watchdog: document stpmic1 pmic watchdog
>    watchdog: stpmic1: add stpmic1 watchdog driver
>    regulator: stpmic1: fix regulator_lock usage
> Could you please remove any patches which have been applied and
> [RESEND]?
DONE, I have resent a V8 without  the regulator patch.

> Also, is Dmitry planning on Acking:
>
>    dt-bindings: input: document stpmic1 pmic onkey
>
> ... or is Rob's Ack enough?
>


thank you,
pascal

^ permalink raw reply

* Re: [PATCH v4 1/3] Input: atmel_mxt_ts: Add support for  optional regulators
From: Paweł Chmiel @ 2018-12-14 15:11 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: nick, robh+dt, mark.rutland, nicolas.ferre, alexandre.belloni,
	linux-input, devicetree, linux-arm-kernel, linux-kernel
In-Reply-To: <20181209042612.GD211094@dtor-ws>

Dnia niedziela, 9 grudnia 2018 05:26:12 CET Dmitry Torokhov pisze:
> On Fri, Dec 07, 2018 at 03:28:55PM +0100, Paweł Chmiel wrote:
> > This patch adds optional regulators, which can be used to power
> > up touchscreen. After enabling regulators, we need to wait 150msec.
> > This value is taken from official driver.
> > 
> > It was tested on Samsung Galaxy i9000 (based on Samsung S5PV210 SOC).
> > 
> > Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
> > ---
> > Changes from v3:
> >   - Fix checkpatch issues
> >   - Drop sentence punctuation from subject of one of patches
> > 
> > Changes from v2:
> >   - Move code enabling regulators into separate method,
> >     to make code more readable.
> > 
> > Changes from v1:
> >   - Enable regulators only if reset_gpio is present.
> >   - Switch from devm_regulator_get_optional to devm_regulator_get
> > ---
> >  drivers/input/touchscreen/atmel_mxt_ts.c | 65 +++++++++++++++++++++---
> >  1 file changed, 59 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
> > index d3aacd534e9c..1dc8ad0da5af 100644
> > --- a/drivers/input/touchscreen/atmel_mxt_ts.c
> > +++ b/drivers/input/touchscreen/atmel_mxt_ts.c
> > @@ -27,6 +27,7 @@
> >  #include <linux/interrupt.h>
> >  #include <linux/of.h>
> >  #include <linux/property.h>
> > +#include <linux/regulator/consumer.h>
> >  #include <linux/slab.h>
> >  #include <linux/gpio/consumer.h>
> >  #include <asm/unaligned.h>
> > @@ -194,10 +195,10 @@ enum t100_type {
> >  
> >  /* Delay times */
> >  #define MXT_BACKUP_TIME		50	/* msec */
> > -#define MXT_RESET_GPIO_TIME	20	/* msec */
> >  #define MXT_RESET_INVALID_CHG	100	/* msec */
> >  #define MXT_RESET_TIME		200	/* msec */
> >  #define MXT_RESET_TIMEOUT	3000	/* msec */
> > +#define MXT_REGULATOR_DELAY	150	/* msec */
> >  #define MXT_CRC_TIMEOUT		1000	/* msec */
> >  #define MXT_FW_RESET_TIME	3000	/* msec */
> >  #define MXT_FW_CHG_TIMEOUT	300	/* msec */
> > @@ -323,6 +324,8 @@ struct mxt_data {
> >  	struct t7_config t7_cfg;
> >  	struct mxt_dbg dbg;
> >  	struct gpio_desc *reset_gpio;
> > +	struct regulator *vdd_reg;
> > +	struct regulator *avdd_reg;
> >  
> >  	/* Cached parameters from object table */
> >  	u16 T5_address;
> > @@ -3038,6 +3041,38 @@ static const struct dmi_system_id chromebook_T9_suspend_dmi[] = {
> >  	{ }
> >  };
> >  
> > +static int mxt_regulator_enable(struct mxt_data *data)
> > +{
> > +	int error;
> > +
> > +	if (data->reset_gpio) {
> > +		error = regulator_enable(data->vdd_reg);
> > +		if (error) {
> > +			dev_err(&data->client->dev,
> > +				"Failed to enable vdd regulator: %d\n", error);
> > +			return error;
> > +		}
> > +
> > +		error = regulator_enable(data->avdd_reg);
> > +		if (error) {
> > +			dev_err(&data->client->dev,
> > +				"Failed to enable avdd regulator: %d\n", error);
> 
> This leaves vdd regulator enabled.
Will be fixed in v5 version (will be today)
Thanks for review.
> 
> Thanks.
> 
> 

^ permalink raw reply

* [PATCH v5 0/3] Input: atmel_mxt_ts: Add support for optional regulators
From: Paweł Chmiel @ 2018-12-14 15:12 UTC (permalink / raw)
  To: nick
  Cc: dmitry.torokhov, robh+dt, mark.rutland, nicolas.ferre,
	alexandre.belloni, linux-input, devicetree, linux-arm-kernel,
	linux-kernel, Paweł Chmiel

This patch series adds optional regulator support to atmel_mxt_ts.
First patch adds regulators to driver.
Second patch ensures that device is ready for communication.
Third patch updates documentation.

Changes from v4:
  - Add missing regulator_disable for vdd in case of error,
    when enabling avdd regulator

Changes from v3:
  - Checkpatch fixes
  - Drop punctuation from subject of one of patches

Changes from v2:
  - Add reviewed-by to one patch
  - Move code for enabling regulators into separate method,
    to make code more readable.
  - Add wait code, to ensure that device is ready for communication.

Changes from v1:
  - Enable regulators only if reset_gpio is present.
  - Switch from devm_regulator_get_optional to devm_regulator_get.

Paweł Chmiel (3):
  Input: atmel_mxt_ts: Add support for  optional regulators
  Input: atmel_mxt_ts: Wait for device be ready for communication
  Input: atmel_mxt_ts: Document optional voltage regulators

 .../bindings/input/atmel,maxtouch.txt         |  8 ++
 drivers/input/touchscreen/atmel_mxt_ts.c      | 78 +++++++++++++++++--
 2 files changed, 80 insertions(+), 6 deletions(-)

-- 
2.17.1

^ permalink raw reply

* [PATCH v5 1/3] Input: atmel_mxt_ts: Add support for  optional regulators
From: Paweł Chmiel @ 2018-12-14 15:12 UTC (permalink / raw)
  To: nick
  Cc: dmitry.torokhov, robh+dt, mark.rutland, nicolas.ferre,
	alexandre.belloni, linux-input, devicetree, linux-arm-kernel,
	linux-kernel, Paweł Chmiel
In-Reply-To: <20181214151214.5391-1-pawel.mikolaj.chmiel@gmail.com>

This patch adds optional regulators, which can be used to power
up touchscreen. After enabling regulators, we need to wait 150msec.
This value is taken from official driver.

It was tested on Samsung Galaxy i9000 (based on Samsung S5PV210 SOC).

Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
---
Changes from v4:
  - Add missing regulator_disable for vdd in case of error,
    when enabling avdd regulator

Changes from v3:
  - Fix checkpatch issues
  - Drop sentence punctuation from patch subject

Changes from v2:
  - Move code enabling regulators into separate method,
    to make code more readable.

Changes from v1:
  - Enable regulators only if reset_gpio is present.
  - Switch from devm_regulator_get_optional to devm_regulator_get
---
 drivers/input/touchscreen/atmel_mxt_ts.c | 67 +++++++++++++++++++++---
 1 file changed, 61 insertions(+), 6 deletions(-)

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index d3aacd534e9c..55a107fc1b73 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -27,6 +27,7 @@
 #include <linux/interrupt.h>
 #include <linux/of.h>
 #include <linux/property.h>
+#include <linux/regulator/consumer.h>
 #include <linux/slab.h>
 #include <linux/gpio/consumer.h>
 #include <asm/unaligned.h>
@@ -194,10 +195,10 @@ enum t100_type {
 
 /* Delay times */
 #define MXT_BACKUP_TIME		50	/* msec */
-#define MXT_RESET_GPIO_TIME	20	/* msec */
 #define MXT_RESET_INVALID_CHG	100	/* msec */
 #define MXT_RESET_TIME		200	/* msec */
 #define MXT_RESET_TIMEOUT	3000	/* msec */
+#define MXT_REGULATOR_DELAY	150	/* msec */
 #define MXT_CRC_TIMEOUT		1000	/* msec */
 #define MXT_FW_RESET_TIME	3000	/* msec */
 #define MXT_FW_CHG_TIMEOUT	300	/* msec */
@@ -323,6 +324,8 @@ struct mxt_data {
 	struct t7_config t7_cfg;
 	struct mxt_dbg dbg;
 	struct gpio_desc *reset_gpio;
+	struct regulator *vdd_reg;
+	struct regulator *avdd_reg;
 
 	/* Cached parameters from object table */
 	u16 T5_address;
@@ -3038,6 +3041,40 @@ static const struct dmi_system_id chromebook_T9_suspend_dmi[] = {
 	{ }
 };
 
+static int mxt_regulator_enable(struct mxt_data *data)
+{
+	int error;
+
+	if (data->reset_gpio) {
+		error = regulator_enable(data->vdd_reg);
+		if (error) {
+			dev_err(&data->client->dev,
+				"Failed to enable vdd regulator: %d\n", error);
+			return error;
+		}
+
+		error = regulator_enable(data->avdd_reg);
+		if (error) {
+			regulator_disable(data->vdd_reg);
+
+			dev_err(&data->client->dev,
+				"Failed to enable avdd regulator: %d\n", error);
+			return error;
+		}
+
+		/*
+		 * According to maXTouch power sequencing specification,
+		 * RESET line must be kept low until some time
+		 * after regulators come up to voltage
+		 */
+		msleep(MXT_REGULATOR_DELAY);
+		gpiod_set_value(data->reset_gpio, 1);
+		msleep(MXT_RESET_INVALID_CHG);
+	}
+
+	return 0;
+}
+
 static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id)
 {
 	struct mxt_data *data;
@@ -3098,6 +3135,22 @@ static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id)
 		return error;
 	}
 
+	data->vdd_reg = devm_regulator_get(&client->dev, "vdd");
+	if (IS_ERR(data->vdd_reg)) {
+		error = PTR_ERR(data->vdd_reg);
+		dev_err(&client->dev, "Failed to get vdd regulator: %d\n",
+			error);
+		return error;
+	}
+
+	data->avdd_reg = devm_regulator_get(&client->dev, "avdd");
+	if (IS_ERR(data->avdd_reg)) {
+		error = PTR_ERR(data->avdd_reg);
+		dev_err(&client->dev, "Failed to get avdd regulator: %d\n",
+			error);
+		return error;
+	}
+
 	error = devm_request_threaded_irq(&client->dev, client->irq,
 					  NULL, mxt_interrupt, IRQF_ONESHOT,
 					  client->name, data);
@@ -3108,11 +3161,9 @@ static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id)
 
 	disable_irq(client->irq);
 
-	if (data->reset_gpio) {
-		msleep(MXT_RESET_GPIO_TIME);
-		gpiod_set_value(data->reset_gpio, 1);
-		msleep(MXT_RESET_INVALID_CHG);
-	}
+	error = mxt_regulator_enable(data);
+	if (error)
+		return error;
 
 	error = mxt_initialize(data);
 	if (error)
@@ -3138,6 +3189,10 @@ static int mxt_remove(struct i2c_client *client)
 	struct mxt_data *data = i2c_get_clientdata(client);
 
 	disable_irq(data->irq);
+	if (data->reset_gpio) {
+		regulator_disable(data->avdd_reg);
+		regulator_disable(data->vdd_reg);
+	}
 	sysfs_remove_group(&client->dev.kobj, &mxt_attr_group);
 	mxt_free_input_device(data);
 	mxt_free_object_table(data);
-- 
2.17.1

^ permalink raw reply related

* [PATCH v5 2/3] Input: atmel_mxt_ts: Wait for device be ready for communication
From: Paweł Chmiel @ 2018-12-14 15:12 UTC (permalink / raw)
  To: nick
  Cc: dmitry.torokhov, robh+dt, mark.rutland, nicolas.ferre,
	alexandre.belloni, linux-input, devicetree, linux-arm-kernel,
	linux-kernel, Paweł Chmiel
In-Reply-To: <20181214151214.5391-1-pawel.mikolaj.chmiel@gmail.com>

According to documentation, device isn't ready for communication,
until firmware asserts the CHG line. Add missing wait for this.

Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
---
Changes from v1:
  - Fix checkpatch issues
---
 drivers/input/touchscreen/atmel_mxt_ts.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 55a107fc1b73..e8949c6ceafa 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -202,6 +202,7 @@ enum t100_type {
 #define MXT_CRC_TIMEOUT		1000	/* msec */
 #define MXT_FW_RESET_TIME	3000	/* msec */
 #define MXT_FW_CHG_TIMEOUT	300	/* msec */
+#define MXT_POWERON_DELAY	150	/* msec */
 
 /* Command to unlock bootloader */
 #define MXT_UNLOCK_CMD_MSB	0xaa
@@ -3070,6 +3071,16 @@ static int mxt_regulator_enable(struct mxt_data *data)
 		msleep(MXT_REGULATOR_DELAY);
 		gpiod_set_value(data->reset_gpio, 1);
 		msleep(MXT_RESET_INVALID_CHG);
+
+retry_wait:
+		reinit_completion(&data->bl_completion);
+		data->in_bootloader = true;
+		error = mxt_wait_for_completion(data, &data->bl_completion,
+						MXT_POWERON_DELAY);
+		if (error == -EINTR)
+			goto retry_wait;
+
+		data->in_bootloader = false;
 	}
 
 	return 0;
-- 
2.17.1

^ permalink raw reply related

* [PATCH v5 3/3] Input: atmel_mxt_ts: Document optional voltage regulators
From: Paweł Chmiel @ 2018-12-14 15:12 UTC (permalink / raw)
  To: nick
  Cc: dmitry.torokhov, robh+dt, mark.rutland, nicolas.ferre,
	alexandre.belloni, linux-input, devicetree, linux-arm-kernel,
	linux-kernel, Paweł Chmiel
In-Reply-To: <20181214151214.5391-1-pawel.mikolaj.chmiel@gmail.com>

Document new optional voltage regulators, which can be used
to power down/up touchscreen.

Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changes from v1:
  - Added reviewed-by
---
 .../devicetree/bindings/input/atmel,maxtouch.txt          | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
index c88919480d37..17930ecadad3 100644
--- a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
+++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
@@ -31,6 +31,12 @@ Optional properties for main touchpad device:
 
 - reset-gpios: GPIO specifier for the touchscreen's reset pin (active low)
 
+- avdd-supply: Analog power supply. It powers up the analog channel block
+    of the controller to detect the touches.
+
+- vdd-supply: Digital power supply. It powers up the digital block
+    of the controller to enable i2c communication.
+
 Example:
 
 	touch@4b {
@@ -38,4 +44,6 @@ Example:
 		reg = <0x4b>;
 		interrupt-parent = <&gpio>;
 		interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_LOW>;
+		avdd-supply = <&atsp_reg>;
+		vdd-supply = <&tsp_reg>;
 	};
-- 
2.17.1

^ permalink raw reply related

* Re: [PATCH] HID: asus: Add support for the ASUS T101HA keyboard dock
From: Aleix Roca Nonell @ 2018-12-14 15:41 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: Jiri Kosina, open list:HID CORE LAYER, lkml, mbrugger
In-Reply-To: <CAO-hwJJsE0eFqYb8A9qFqohy6vXj4EB9qJ3myB_PPzbDa=Jo3Q@mail.gmail.com>

On Fri, Dec 14, 2018 at 02:37:52PM +0100, Benjamin Tissoires wrote:
> On Fri, Dec 14, 2018 at 2:34 PM Aleix Roca Nonell <kernelrocks@gmail.com> wrote:
> >
> > Hi Benjamin! :D
> >
> > On Fri, Dec 14, 2018 at 09:25:20AM +0100, Benjamin Tissoires wrote:
> > > Hi Aleix,
> > >
> > > On Fri, Dec 14, 2018 at 9:07 AM Aleix Roca Nonell <kernelrocks@gmail.com> wrote:
> > > >
> > > > Kind remminder ping :)
> > >
> > > Hehe, I have seen the patch floating by and realized I would need more
> > > than 2 minutes to answer it so it fell a little bit behind in my TODO
> > > list.
> > >
> > > Let's try to work on this now.
> > >
> > > >
> > > > I'm also adding my fellow Matthias in CC
> > > >
> > > > On Sat, Dec 01, 2018 at 08:01:53PM +0100, Aleix Roca Nonell wrote:
> > > > > The ASUS T101HA keyboard dock generates HID events using the ASUS vendor
> > > > > specific UsagePage 0xff31. In consequence, some multimedia keys such as
> > > > > brightness up and down are not working with hid-generic.
> > > > >
> > > > > This commit adds the T101HA dock into the supported device list of the
> > > > > hid-asus driver. It also prevents the dock's integrated touchpad to be
> > > > > bound with hid-asus given that it is already working fine with
> > > > > hid-multitouch.
> > > > >
> > > > > Signed-off-by: Aleix Roca Nonell <kernelrocks@gmail.com>
> > > > > ---
> > > > >
> > > > > This is my very first kernel patch done in my free time (be aware of the
> > > > > newbie!!) so please, let me know if I can improve anything and I will
> > > > > happily do it :)
> > > > >
> > > > >  drivers/hid/hid-asus.c | 12 ++++++++++++
> > > > >  drivers/hid/hid-ids.h  |  1 +
> > > > >  2 files changed, 13 insertions(+)
> > > > >
> > > > > diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
> > > > > index ab8bd40a77ed..d8b55dca97c6 100644
> > > > > --- a/drivers/hid/hid-asus.c
> > > > > +++ b/drivers/hid/hid-asus.c
> > > > > @@ -42,6 +42,7 @@ MODULE_AUTHOR("Frederik Wenigwieser <frederik.wenigwieser@gmail.com>");
> > > > >  MODULE_DESCRIPTION("Asus HID Keyboard and TouchPad");
> > > > >
> > > > >  #define T100_TPAD_INTF 2
> > > > > +#define T101HA_TPAD_INTF 2
> > > > >
> > > > >  #define T100CHI_MOUSE_REPORT_ID 0x06
> > > > >  #define FEATURE_REPORT_ID 0x0d
> > > > > @@ -70,6 +71,7 @@ MODULE_DESCRIPTION("Asus HID Keyboard and TouchPad");
> > > > >  #define QUIRK_T100_KEYBOARD          BIT(6)
> > > > >  #define QUIRK_T100CHI                        BIT(7)
> > > > >  #define QUIRK_G752_KEYBOARD          BIT(8)
> > > > > +#define QUIRK_T101HA_DOCK            BIT(9)
> > > > >
> > > > >  #define I2C_KEYBOARD_QUIRKS                  (QUIRK_FIX_NOTEBOOK_REPORT | \
> > > > >                                                QUIRK_NO_INIT_REPORTS | \
> > > > > @@ -649,6 +651,14 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
> > > > >       int ret;
> > > > >       struct asus_drvdata *drvdata;
> > > > >
> > > > > +     if (id->driver_data & QUIRK_T101HA_DOCK) {
> > > > > +             struct usb_interface *intf = to_usb_interface(hdev->dev.parent);
> > >
> > > I know the hid-asus driver already does this for the other devices,
> > > but it would be nice not to. USB is part of the low level transport
> > > and HID drivers should have no reasons to assume the USB driver is
> > > used and that it will stay forever.
> > >
> > > What I ask when we have such a case is to check on the report
> > > descriptor to see if there is anything we could use in it (usually the
> > > application) to skip this HID interface.
> > >
> > > Besides that, there is not much more to say.
> >
> > Great I will do that!
> >
> > > For having a look at the report descriptor, you can either use printk
> > > in the kernel, or use hid-recorder as root in
> > > https://gitlab.freedesktop.org/libevdev/hid-tools.
> >
> > Regarding the descriptor, shouldn't be ok to check
> > /sys/kernel/debug/hid/<dev>/rdesc ?
> 
> Yep, that works too. I knew there was an other way from the kernel but
> couldn't remember it :)
> 
> I am more used to hid-recorder as it agregates everything in a more
> compact way and you can then replay the traces with hid-replay.

Oh right! I recall now from your slides! Thank you Benjamin! :)

> Cheers,
> Benjamin
> 
> >
> > Thank you!
> >
> > >
> > > Cheers,
> > > Benjamin
> > >
> > > > > +
> > > > > +             /* use hid-multitouch for T101HA touchpad */
> > > > > +             if (intf->altsetting->desc.bInterfaceNumber == T101HA_TPAD_INTF)
> > > > > +                     return -ENODEV;
> > > > > +     }
> > > > > +
> > > > >       drvdata = devm_kzalloc(&hdev->dev, sizeof(*drvdata), GFP_KERNEL);
> > > > >       if (drvdata == NULL) {
> > > > >               hid_err(hdev, "Can't alloc Asus descriptor\n");
> > > > > @@ -830,6 +840,8 @@ static const struct hid_device_id asus_devices[] = {
> > > > >       { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
> > > > >               USB_DEVICE_ID_ASUSTEK_T100TAF_KEYBOARD),
> > > > >         QUIRK_T100_KEYBOARD | QUIRK_NO_CONSUMER_USAGES },
> > > > > +     { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
> > > > > +             USB_DEVICE_ID_ASUSTEK_T101HA_KEYBOARD), QUIRK_T101HA_DOCK },
> > > > >       { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_ASUS_AK1D) },
> > > > >       { HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_ASUS_MD_5110) },
> > > > >       { HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_ASUS_MD_5112) },
> > > > > diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> > > > > index 4206428c0ba2..f1eee2778b70 100644
> > > > > --- a/drivers/hid/hid-ids.h
> > > > > +++ b/drivers/hid/hid-ids.h
> > > > > @@ -184,6 +184,7 @@
> > > > >  #define USB_DEVICE_ID_ASUSTEK_T100TA_KEYBOARD        0x17e0
> > > > >  #define USB_DEVICE_ID_ASUSTEK_T100TAF_KEYBOARD       0x1807
> > > > >  #define USB_DEVICE_ID_ASUSTEK_T100CHI_KEYBOARD       0x8502
> > > > > +#define USB_DEVICE_ID_ASUSTEK_T101HA_KEYBOARD        0x183d
> > > > >  #define USB_DEVICE_ID_ASUSTEK_T304_KEYBOARD  0x184a
> > > > >  #define USB_DEVICE_ID_ASUSTEK_I2C_KEYBOARD   0x8585
> > > > >  #define USB_DEVICE_ID_ASUSTEK_I2C_TOUCHPAD   0x0101
> > > > > --
> > > > > 2.19.2
> > > > >

^ permalink raw reply

* Re: [PATCH v3] MAINTAINERS: add maintainers for ChromeOS EC sub-drivers
From: Joe Perches @ 2018-12-14 17:24 UTC (permalink / raw)
  To: Enric Balletbo i Serra, linux-kernel
  Cc: Alessandro Zummo, linux-pwm, linux-iio, Alexandre Belloni,
	linux-i2c, groeck, kernel, linux-rtc, Chanwoo Choi, Benson Leung,
	Sebastian Reichel, linux-input, Dmitry Torokhov, Jonathan Cameron,
	Peter Meerwald-Stadler, devicetree, Thierry Reding, linux-pm,
	MyungJoo Ham, Lee Jones, Hartmut Knaack, Rob Herring, Lars
In-Reply-To: <20181214114858.21231-1-enric.balletbo@collabora.com>

On Fri, 2018-12-14 at 12:48 +0100, Enric Balletbo i Serra wrote:
> There are multiple ChromeOS EC sub-drivers spread in different
> subsystems, as all of them are related to the Chrome stuff add
> Benson and myself as a maintainers for all these sub-drivers.

[]
> Changes in v3:
> - Use a cros[-_]ec pattern instead of list all the files.
[]
> diff --git a/MAINTAINERS b/MAINTAINERS
[]
> @@ -3629,6 +3629,14 @@ S:	Maintained
>  T:	git git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform.git
>  F:	drivers/platform/chrome/
>  
> +CHROMEOS EC SUBDRIVERS
> +M:	Benson Leung <bleung@chromium.org>
> +M:	Enric Balletbo i Serra <enric.balletbo@collabora.com>
> +R:	Guenter Roeck <groeck@chromium.org>
> +S:	Maintained
> +N:	cros[-_]ec

For linux scripts/, it is unconventional to use a hyphen first
in a character class pattern so perhaps this is clearer using
two N: patterns

N:	cros_
N:	cros-

^ permalink raw reply

* Re: [PATCH v3 7/8] HID: logitech: Enable high-resolution scrolling on Logitech mice
From: Harry Cutts @ 2018-12-14 18:37 UTC (permalink / raw)
  To: Clément VUCHENER
  Cc: Peter Hutterer, linux-input, Dmitry Torokhov, Jiri Kosina,
	torvalds, Nestor Lopez Casado, lkml, Benjamin Tissoires
In-Reply-To: <CAM4jgCqAh9Pck-9i8F5tO4-Kzpu+SjH-mQnGYThadSf-3b1ikw@mail.gmail.com>

Hi Clement,

On Fri, 14 Dec 2018 at 05:47, Clément VUCHENER
<clement.vuchener@gmail.com> wrote:
> Hi, The G500s (and the G500 too, I think) does support the "scrolling
> acceleration" bit. If I set it, I get around 8 events for each wheel
> "click", this is what this driver expects, right? If I understood
> correctly, I should try this patch with the
> HIDPP_QUIRK_HI_RES_SCROLL_1P0 quirk set for my mouse.

Thanks for the info! Yes, that should work.

Harry Cutts
Chrome OS Touch/Input team

^ 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