Linux Input/HID development
 help / color / mirror / Atom feed
* 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

* 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 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] 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 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 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  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:30 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: <20181212222937.GL19816@piout.net>

Hi Alexandre,

On 12/12/18 23:29, Alexandre Belloni wrote:
> On 11/12/2018 20:09:52+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>
> 
> You definitively don't need my ack to get that applied but anyway:
> > Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> 

Thanks for the ack.

> 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.

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: Lee Jones @ 2018-12-13  9:22 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, Sebastian Reichel, linux-input,
	Dmitry Torokhov, Jonathan Cameron, Peter Meerwald-Stadler,
	devicetree, Thierry Reding, linux-pm, MyungJoo Ham,
	Hartmut Knaack, Rob Herring, Lars-Pet
In-Reply-To: <20181211190953.13626-1-enric.balletbo@collabora.com>

On Tue, 11 Dec 2018, 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>
> ---
> 
> 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/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/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:	Documentation/devicetree/bindings/mfd/cros-ec.txt
> +F:	drivers/mfd/cros_ec*
> +F:	include/linux/mfd/cros_ec*

Acked-by: Lee Jones <lee.jones@linaro.org>

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

^ permalink raw reply

* [PATCH AUTOSEL 3.18 11/16] Input: omap-keypad - fix keyboard debounce configuration
From: Sasha Levin @ 2018-12-13  4:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Tony Lindgren, Dmitry Torokhov, Sasha Levin, linux-input
In-Reply-To: <20181213043343.76896-1-sashal@kernel.org>

From: Tony Lindgren <tony@atomide.com>

[ Upstream commit 6c3516fed7b61a3527459ccfa67fab130d910610 ]

I noticed that the Android v3.0.8 kernel on droid4 is using different
keypad values from the mainline kernel and does not have issues with
keys occasionally being stuck until pressed again. Turns out there was
an earlier patch posted to fix this as "Input: omap-keypad: errata i689:
Correct debounce time", but it was never reposted to fix use macros
for timing calculations.

This updated version is using macros, and also fixes the use of the
input clock rate to use 32768KiHz instead of 32000KiHz. And we want to
use the known good Android kernel values of 3 and 6 instead of 2 and 6
in the earlier patch.

Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/input/keyboard/omap4-keypad.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index 3ab045369c0c..1739221aa5fa 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -60,8 +60,18 @@
 
 /* OMAP4 values */
 #define OMAP4_VAL_IRQDISABLE		0x0
-#define OMAP4_VAL_DEBOUNCINGTIME	0x7
-#define OMAP4_VAL_PVT			0x7
+
+/*
+ * Errata i689: If a key is released for a time shorter than debounce time,
+ * the keyboard will idle and never detect the key release. The workaround
+ * is to use at least a 12ms debounce time. See omap5432 TRM chapter
+ * "26.4.6.2 Keyboard Controller Timer" for more information.
+ */
+#define OMAP4_KEYPAD_PTV_DIV_128        0x6
+#define OMAP4_KEYPAD_DEBOUNCINGTIME_MS(dbms, ptv)     \
+	((((dbms) * 1000) / ((1 << ((ptv) + 1)) * (1000000 / 32768))) - 1)
+#define OMAP4_VAL_DEBOUNCINGTIME_16MS					\
+	OMAP4_KEYPAD_DEBOUNCINGTIME_MS(16, OMAP4_KEYPAD_PTV_DIV_128)
 
 enum {
 	KBD_REVISION_OMAP4 = 0,
@@ -181,9 +191,9 @@ static int omap4_keypad_open(struct input_dev *input)
 
 	kbd_writel(keypad_data, OMAP4_KBD_CTRL,
 			OMAP4_DEF_CTRL_NOSOFTMODE |
-			(OMAP4_VAL_PVT << OMAP4_DEF_CTRL_PTV_SHIFT));
+			(OMAP4_KEYPAD_PTV_DIV_128 << OMAP4_DEF_CTRL_PTV_SHIFT));
 	kbd_writel(keypad_data, OMAP4_KBD_DEBOUNCINGTIME,
-			OMAP4_VAL_DEBOUNCINGTIME);
+			OMAP4_VAL_DEBOUNCINGTIME_16MS);
 	/* clear pending interrupts */
 	kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
 			 kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
-- 
2.19.1

^ permalink raw reply related

* [PATCH AUTOSEL 4.4 15/23] Input: omap-keypad - fix keyboard debounce configuration
From: Sasha Levin @ 2018-12-13  4:32 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Tony Lindgren, Dmitry Torokhov, Sasha Levin, linux-input
In-Reply-To: <20181213043259.76643-1-sashal@kernel.org>

From: Tony Lindgren <tony@atomide.com>

[ Upstream commit 6c3516fed7b61a3527459ccfa67fab130d910610 ]

I noticed that the Android v3.0.8 kernel on droid4 is using different
keypad values from the mainline kernel and does not have issues with
keys occasionally being stuck until pressed again. Turns out there was
an earlier patch posted to fix this as "Input: omap-keypad: errata i689:
Correct debounce time", but it was never reposted to fix use macros
for timing calculations.

This updated version is using macros, and also fixes the use of the
input clock rate to use 32768KiHz instead of 32000KiHz. And we want to
use the known good Android kernel values of 3 and 6 instead of 2 and 6
in the earlier patch.

Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/input/keyboard/omap4-keypad.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index 6639b2b8528a..f78c464899db 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -60,8 +60,18 @@
 
 /* OMAP4 values */
 #define OMAP4_VAL_IRQDISABLE		0x0
-#define OMAP4_VAL_DEBOUNCINGTIME	0x7
-#define OMAP4_VAL_PVT			0x7
+
+/*
+ * Errata i689: If a key is released for a time shorter than debounce time,
+ * the keyboard will idle and never detect the key release. The workaround
+ * is to use at least a 12ms debounce time. See omap5432 TRM chapter
+ * "26.4.6.2 Keyboard Controller Timer" for more information.
+ */
+#define OMAP4_KEYPAD_PTV_DIV_128        0x6
+#define OMAP4_KEYPAD_DEBOUNCINGTIME_MS(dbms, ptv)     \
+	((((dbms) * 1000) / ((1 << ((ptv) + 1)) * (1000000 / 32768))) - 1)
+#define OMAP4_VAL_DEBOUNCINGTIME_16MS					\
+	OMAP4_KEYPAD_DEBOUNCINGTIME_MS(16, OMAP4_KEYPAD_PTV_DIV_128)
 
 enum {
 	KBD_REVISION_OMAP4 = 0,
@@ -181,9 +191,9 @@ static int omap4_keypad_open(struct input_dev *input)
 
 	kbd_writel(keypad_data, OMAP4_KBD_CTRL,
 			OMAP4_DEF_CTRL_NOSOFTMODE |
-			(OMAP4_VAL_PVT << OMAP4_DEF_CTRL_PTV_SHIFT));
+			(OMAP4_KEYPAD_PTV_DIV_128 << OMAP4_DEF_CTRL_PTV_SHIFT));
 	kbd_writel(keypad_data, OMAP4_KBD_DEBOUNCINGTIME,
-			OMAP4_VAL_DEBOUNCINGTIME);
+			OMAP4_VAL_DEBOUNCINGTIME_16MS);
 	/* clear pending interrupts */
 	kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
 			 kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
-- 
2.19.1

^ permalink raw reply related

* [PATCH AUTOSEL 4.9 17/34] Input: omap-keypad - fix keyboard debounce configuration
From: Sasha Levin @ 2018-12-13  4:31 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Tony Lindgren, Dmitry Torokhov, Sasha Levin, linux-input
In-Reply-To: <20181213043200.76295-1-sashal@kernel.org>

From: Tony Lindgren <tony@atomide.com>

[ Upstream commit 6c3516fed7b61a3527459ccfa67fab130d910610 ]

I noticed that the Android v3.0.8 kernel on droid4 is using different
keypad values from the mainline kernel and does not have issues with
keys occasionally being stuck until pressed again. Turns out there was
an earlier patch posted to fix this as "Input: omap-keypad: errata i689:
Correct debounce time", but it was never reposted to fix use macros
for timing calculations.

This updated version is using macros, and also fixes the use of the
input clock rate to use 32768KiHz instead of 32000KiHz. And we want to
use the known good Android kernel values of 3 and 6 instead of 2 and 6
in the earlier patch.

Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/input/keyboard/omap4-keypad.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index 6639b2b8528a..f78c464899db 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -60,8 +60,18 @@
 
 /* OMAP4 values */
 #define OMAP4_VAL_IRQDISABLE		0x0
-#define OMAP4_VAL_DEBOUNCINGTIME	0x7
-#define OMAP4_VAL_PVT			0x7
+
+/*
+ * Errata i689: If a key is released for a time shorter than debounce time,
+ * the keyboard will idle and never detect the key release. The workaround
+ * is to use at least a 12ms debounce time. See omap5432 TRM chapter
+ * "26.4.6.2 Keyboard Controller Timer" for more information.
+ */
+#define OMAP4_KEYPAD_PTV_DIV_128        0x6
+#define OMAP4_KEYPAD_DEBOUNCINGTIME_MS(dbms, ptv)     \
+	((((dbms) * 1000) / ((1 << ((ptv) + 1)) * (1000000 / 32768))) - 1)
+#define OMAP4_VAL_DEBOUNCINGTIME_16MS					\
+	OMAP4_KEYPAD_DEBOUNCINGTIME_MS(16, OMAP4_KEYPAD_PTV_DIV_128)
 
 enum {
 	KBD_REVISION_OMAP4 = 0,
@@ -181,9 +191,9 @@ static int omap4_keypad_open(struct input_dev *input)
 
 	kbd_writel(keypad_data, OMAP4_KBD_CTRL,
 			OMAP4_DEF_CTRL_NOSOFTMODE |
-			(OMAP4_VAL_PVT << OMAP4_DEF_CTRL_PTV_SHIFT));
+			(OMAP4_KEYPAD_PTV_DIV_128 << OMAP4_DEF_CTRL_PTV_SHIFT));
 	kbd_writel(keypad_data, OMAP4_KBD_DEBOUNCINGTIME,
-			OMAP4_VAL_DEBOUNCINGTIME);
+			OMAP4_VAL_DEBOUNCINGTIME_16MS);
 	/* clear pending interrupts */
 	kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
 			 kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
-- 
2.19.1

^ permalink raw reply related

* [PATCH AUTOSEL 4.14 21/41] Input: omap-keypad - fix keyboard debounce configuration
From: Sasha Levin @ 2018-12-13  4:30 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Tony Lindgren, Dmitry Torokhov, Sasha Levin, linux-input
In-Reply-To: <20181213043054.75891-1-sashal@kernel.org>

From: Tony Lindgren <tony@atomide.com>

[ Upstream commit 6c3516fed7b61a3527459ccfa67fab130d910610 ]

I noticed that the Android v3.0.8 kernel on droid4 is using different
keypad values from the mainline kernel and does not have issues with
keys occasionally being stuck until pressed again. Turns out there was
an earlier patch posted to fix this as "Input: omap-keypad: errata i689:
Correct debounce time", but it was never reposted to fix use macros
for timing calculations.

This updated version is using macros, and also fixes the use of the
input clock rate to use 32768KiHz instead of 32000KiHz. And we want to
use the known good Android kernel values of 3 and 6 instead of 2 and 6
in the earlier patch.

Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/input/keyboard/omap4-keypad.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index 940d38b08e6b..ce8e2baf31bb 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -60,8 +60,18 @@
 
 /* OMAP4 values */
 #define OMAP4_VAL_IRQDISABLE		0x0
-#define OMAP4_VAL_DEBOUNCINGTIME	0x7
-#define OMAP4_VAL_PVT			0x7
+
+/*
+ * Errata i689: If a key is released for a time shorter than debounce time,
+ * the keyboard will idle and never detect the key release. The workaround
+ * is to use at least a 12ms debounce time. See omap5432 TRM chapter
+ * "26.4.6.2 Keyboard Controller Timer" for more information.
+ */
+#define OMAP4_KEYPAD_PTV_DIV_128        0x6
+#define OMAP4_KEYPAD_DEBOUNCINGTIME_MS(dbms, ptv)     \
+	((((dbms) * 1000) / ((1 << ((ptv) + 1)) * (1000000 / 32768))) - 1)
+#define OMAP4_VAL_DEBOUNCINGTIME_16MS					\
+	OMAP4_KEYPAD_DEBOUNCINGTIME_MS(16, OMAP4_KEYPAD_PTV_DIV_128)
 
 enum {
 	KBD_REVISION_OMAP4 = 0,
@@ -181,9 +191,9 @@ static int omap4_keypad_open(struct input_dev *input)
 
 	kbd_writel(keypad_data, OMAP4_KBD_CTRL,
 			OMAP4_DEF_CTRL_NOSOFTMODE |
-			(OMAP4_VAL_PVT << OMAP4_DEF_CTRL_PTV_SHIFT));
+			(OMAP4_KEYPAD_PTV_DIV_128 << OMAP4_DEF_CTRL_PTV_SHIFT));
 	kbd_writel(keypad_data, OMAP4_KBD_DEBOUNCINGTIME,
-			OMAP4_VAL_DEBOUNCINGTIME);
+			OMAP4_VAL_DEBOUNCINGTIME_16MS);
 	/* clear pending interrupts */
 	kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
 			 kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
-- 
2.19.1

^ permalink raw reply related

* [PATCH AUTOSEL 4.14 20/41] Input: synaptics - enable SMBus for HP 15-ay000
From: Sasha Levin @ 2018-12-13  4:30 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Teika Kazura, Dmitry Torokhov, Sasha Levin, linux-input
In-Reply-To: <20181213043054.75891-1-sashal@kernel.org>

From: Teika Kazura <teika@gmx.com>

[ Upstream commit 5a6dab15f7a79817cab4af612ddd99eda793fce6 ]

SMBus works fine for the touchpad with id SYN3221, used in the HP 15-ay000
series,

This device has been reported in these messages in the "linux-input"
mailing list:
* https://marc.info/?l=linux-input&m=152016683003369&w=2
* https://www.spinics.net/lists/linux-input/msg52525.html

Reported-by: Nitesh Debnath <niteshkd1999@gmail.com>
Reported-by: Teika Kazura <teika@gmx.com>
Signed-off-by: Teika Kazura <teika@gmx.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/input/mouse/synaptics.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 65c9095eb517..54f0d037b5b6 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -178,6 +178,7 @@ static const char * const smbus_pnp_ids[] = {
 	"LEN0096", /* X280 */
 	"LEN0097", /* X280 -> ALPS trackpoint */
 	"LEN200f", /* T450s */
+	"SYN3221", /* HP 15-ay000 */
 	NULL
 };
 
-- 
2.19.1

^ permalink raw reply related

* [PATCH AUTOSEL 4.14 02/41] Input: hyper-v - fix wakeup from suspend-to-idle
From: Sasha Levin @ 2018-12-13  4:30 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Sasha Levin, devel, Vitaly Kuznetsov, Dmitry Torokhov,
	linux-input
In-Reply-To: <20181213043054.75891-1-sashal@kernel.org>

From: Vitaly Kuznetsov <vkuznets@redhat.com>

[ Upstream commit 10f91c73cc41ceead210a905dbd196398e99c7d2 ]

It makes little sense but still possible to put Hyper-V guests into
suspend-to-idle state. To wake them up two wakeup sources were registered
in the past: hyperv-keyboard and hid-hyperv. However, since
commit eed4d47efe95 ("ACPI / sleep: Ignore spurious SCI wakeups from
suspend-to-idle") pm_wakeup_event() from these devices is ignored. Switch
to pm_wakeup_hard_event() API as these devices are actually the only
possible way to wakeup Hyper-V guests.

Fixes: eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle)
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hid/hid-hyperv.c              | 2 +-
 drivers/input/serio/hyperv-keyboard.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
index 6039f071fab1..5f1de24206ab 100644
--- a/drivers/hid/hid-hyperv.c
+++ b/drivers/hid/hid-hyperv.c
@@ -309,7 +309,7 @@ static void mousevsc_on_receive(struct hv_device *device,
 		hid_input_report(input_dev->hid_device, HID_INPUT_REPORT,
 				 input_dev->input_buf, len, 1);
 
-		pm_wakeup_event(&input_dev->device->device, 0);
+		pm_wakeup_hard_event(&input_dev->device->device);
 
 		break;
 	default:
diff --git a/drivers/input/serio/hyperv-keyboard.c b/drivers/input/serio/hyperv-keyboard.c
index 25151d9214e0..55288a026e4e 100644
--- a/drivers/input/serio/hyperv-keyboard.c
+++ b/drivers/input/serio/hyperv-keyboard.c
@@ -177,7 +177,7 @@ static void hv_kbd_on_receive(struct hv_device *hv_dev,
 		 * state because the Enter-UP can trigger a wakeup at once.
 		 */
 		if (!(info & IS_BREAK))
-			pm_wakeup_event(&hv_dev->device, 0);
+			pm_wakeup_hard_event(&hv_dev->device);
 
 		break;
 
-- 
2.19.1

^ permalink raw reply related

* [PATCH AUTOSEL 4.19 40/73] Input: omap-keypad - fix keyboard debounce configuration
From: Sasha Levin @ 2018-12-13  4:28 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Tony Lindgren, Dmitry Torokhov, Sasha Levin, linux-input
In-Reply-To: <20181213042838.75160-1-sashal@kernel.org>

From: Tony Lindgren <tony@atomide.com>

[ Upstream commit 6c3516fed7b61a3527459ccfa67fab130d910610 ]

I noticed that the Android v3.0.8 kernel on droid4 is using different
keypad values from the mainline kernel and does not have issues with
keys occasionally being stuck until pressed again. Turns out there was
an earlier patch posted to fix this as "Input: omap-keypad: errata i689:
Correct debounce time", but it was never reposted to fix use macros
for timing calculations.

This updated version is using macros, and also fixes the use of the
input clock rate to use 32768KiHz instead of 32000KiHz. And we want to
use the known good Android kernel values of 3 and 6 instead of 2 and 6
in the earlier patch.

Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/input/keyboard/omap4-keypad.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index 46406345742b..a7dc286f406c 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -60,8 +60,18 @@
 
 /* OMAP4 values */
 #define OMAP4_VAL_IRQDISABLE		0x0
-#define OMAP4_VAL_DEBOUNCINGTIME	0x7
-#define OMAP4_VAL_PVT			0x7
+
+/*
+ * Errata i689: If a key is released for a time shorter than debounce time,
+ * the keyboard will idle and never detect the key release. The workaround
+ * is to use at least a 12ms debounce time. See omap5432 TRM chapter
+ * "26.4.6.2 Keyboard Controller Timer" for more information.
+ */
+#define OMAP4_KEYPAD_PTV_DIV_128        0x6
+#define OMAP4_KEYPAD_DEBOUNCINGTIME_MS(dbms, ptv)     \
+	((((dbms) * 1000) / ((1 << ((ptv) + 1)) * (1000000 / 32768))) - 1)
+#define OMAP4_VAL_DEBOUNCINGTIME_16MS					\
+	OMAP4_KEYPAD_DEBOUNCINGTIME_MS(16, OMAP4_KEYPAD_PTV_DIV_128)
 
 enum {
 	KBD_REVISION_OMAP4 = 0,
@@ -181,9 +191,9 @@ static int omap4_keypad_open(struct input_dev *input)
 
 	kbd_writel(keypad_data, OMAP4_KBD_CTRL,
 			OMAP4_DEF_CTRL_NOSOFTMODE |
-			(OMAP4_VAL_PVT << OMAP4_DEF_CTRL_PTV_SHIFT));
+			(OMAP4_KEYPAD_PTV_DIV_128 << OMAP4_DEF_CTRL_PTV_SHIFT));
 	kbd_writel(keypad_data, OMAP4_KBD_DEBOUNCINGTIME,
-			OMAP4_VAL_DEBOUNCINGTIME);
+			OMAP4_VAL_DEBOUNCINGTIME_16MS);
 	/* clear pending interrupts */
 	kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
 			 kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
-- 
2.19.1

^ permalink raw reply related

* [PATCH AUTOSEL 4.19 39/73] Input: synaptics - enable SMBus for HP 15-ay000
From: Sasha Levin @ 2018-12-13  4:28 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Teika Kazura, Dmitry Torokhov, Sasha Levin, linux-input
In-Reply-To: <20181213042838.75160-1-sashal@kernel.org>

From: Teika Kazura <teika@gmx.com>

[ Upstream commit 5a6dab15f7a79817cab4af612ddd99eda793fce6 ]

SMBus works fine for the touchpad with id SYN3221, used in the HP 15-ay000
series,

This device has been reported in these messages in the "linux-input"
mailing list:
* https://marc.info/?l=linux-input&m=152016683003369&w=2
* https://www.spinics.net/lists/linux-input/msg52525.html

Reported-by: Nitesh Debnath <niteshkd1999@gmail.com>
Reported-by: Teika Kazura <teika@gmx.com>
Signed-off-by: Teika Kazura <teika@gmx.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/input/mouse/synaptics.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index c42813d50591..2bd5bb11c8ba 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -178,6 +178,7 @@ static const char * const smbus_pnp_ids[] = {
 	"LEN0096", /* X280 */
 	"LEN0097", /* X280 -> ALPS trackpoint */
 	"LEN200f", /* T450s */
+	"SYN3221", /* HP 15-ay000 */
 	NULL
 };
 
-- 
2.19.1

^ permalink raw reply related

* [PATCH AUTOSEL 4.19 02/73] Input: hyper-v - fix wakeup from suspend-to-idle
From: Sasha Levin @ 2018-12-13  4:27 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Sasha Levin, devel, Vitaly Kuznetsov, Dmitry Torokhov,
	linux-input
In-Reply-To: <20181213042838.75160-1-sashal@kernel.org>

From: Vitaly Kuznetsov <vkuznets@redhat.com>

[ Upstream commit 10f91c73cc41ceead210a905dbd196398e99c7d2 ]

It makes little sense but still possible to put Hyper-V guests into
suspend-to-idle state. To wake them up two wakeup sources were registered
in the past: hyperv-keyboard and hid-hyperv. However, since
commit eed4d47efe95 ("ACPI / sleep: Ignore spurious SCI wakeups from
suspend-to-idle") pm_wakeup_event() from these devices is ignored. Switch
to pm_wakeup_hard_event() API as these devices are actually the only
possible way to wakeup Hyper-V guests.

Fixes: eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle)
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hid/hid-hyperv.c              | 2 +-
 drivers/input/serio/hyperv-keyboard.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
index b372854cf38d..704049e62d58 100644
--- a/drivers/hid/hid-hyperv.c
+++ b/drivers/hid/hid-hyperv.c
@@ -309,7 +309,7 @@ static void mousevsc_on_receive(struct hv_device *device,
 		hid_input_report(input_dev->hid_device, HID_INPUT_REPORT,
 				 input_dev->input_buf, len, 1);
 
-		pm_wakeup_event(&input_dev->device->device, 0);
+		pm_wakeup_hard_event(&input_dev->device->device);
 
 		break;
 	default:
diff --git a/drivers/input/serio/hyperv-keyboard.c b/drivers/input/serio/hyperv-keyboard.c
index 47a0e81a2989..a8b9be3e28db 100644
--- a/drivers/input/serio/hyperv-keyboard.c
+++ b/drivers/input/serio/hyperv-keyboard.c
@@ -177,7 +177,7 @@ static void hv_kbd_on_receive(struct hv_device *hv_dev,
 		 * state because the Enter-UP can trigger a wakeup at once.
 		 */
 		if (!(info & IS_BREAK))
-			pm_wakeup_event(&hv_dev->device, 0);
+			pm_wakeup_hard_event(&hv_dev->device);
 
 		break;
 
-- 
2.19.1

^ permalink raw reply related

* [PATCH] Documentation: hid: fix wrong data structure reference for UHID_OUTPUT
From: Peter Hutterer @ 2018-12-13  1:28 UTC (permalink / raw)
  To: Benjamin Tissoires, Jiri Kosina; +Cc: linux-input, linux-kernel

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
 Documentation/hid/uhid.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/hid/uhid.txt b/Documentation/hid/uhid.txt
index c8656dd029a9..958fff945304 100644
--- a/Documentation/hid/uhid.txt
+++ b/Documentation/hid/uhid.txt
@@ -160,7 +160,7 @@ them but you should handle them according to your needs.
   UHID_OUTPUT:
   This is sent if the HID device driver wants to send raw data to the I/O
   device on the interrupt channel. You should read the payload and forward it to
-  the device. The payload is of type "struct uhid_data_req".
+  the device. The payload is of type "struct uhid_output_req".
   This may be received even though you haven't received UHID_OPEN, yet.
 
   UHID_GET_REPORT:
-- 
2.19.2

^ permalink raw reply related

* Re: [PATCH v2] MAINTAINERS: add maintainers for ChromeOS EC sub-drivers
From: Alexandre Belloni @ 2018-12-12 22:29 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: <20181211190953.13626-1-enric.balletbo@collabora.com>

On 11/12/2018 20:09:52+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>

You definitively don't need my ack to get that applied but anyway:

Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

However, you should probably indicate which tree do you expect that to
go through ;)

> ---
> 
> 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: Benson Leung @ 2018-12-12 18:21 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, Sebastian Reichel, linux-input,
	Dmitry Torokhov, Jonathan Cameron, Peter Meerwald-Stadler,
	devicetree, Thierry Reding, linux-pm, MyungJoo Ham, Lee Jones,
	Hartmut Knaack, Rob
In-Reply-To: <20181211190953.13626-1-enric.balletbo@collabora.com>

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

On Tue, Dec 11, 2018 at 08:09:52PM +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>

Thanks for sending this, 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
> 

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@google.com
Chromium OS Project
bleung@chromium.org

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

^ permalink raw reply

* Re: [PATCH v2] MAINTAINERS: add maintainers for ChromeOS EC sub-drivers
From: Jonathan Cameron @ 2018-12-12 17:06 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, Sebastian Reichel, linux-input,
	Dmitry Torokhov, Peter Meerwald-Stadler, devicetree,
	Thierry Reding, linux-pm, MyungJoo Ham, Lee Jones, Hartmut Knaack,
	Rob Herring, Lars-Peter
In-Reply-To: <20181211190953.13626-1-enric.balletbo@collabora.com>

On Tue, 11 Dec 2018 20:09:52 +0100
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>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> for iio parts.
> ---
> 
> 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>

^ permalink raw reply

* Re: [PATCH v3] Input: i8042 add i8042_is_mr_coffee() helper to avoid refconut leak
From: Frank Lee @ 2018-12-12 16:37 UTC (permalink / raw)
  To: lkp; +Cc: kbuild-all, Dmitry Torokhov, linux-input, linux-kernel
In-Reply-To: <201812110132.w5WK8nap%fengguang.wu@intel.com>

The newer has been sent.

Thanks,
Yangtao

^ permalink raw reply

* [PATCH v4] Input: i8042 add i8042_is_mr_coffee() helper to avoid refconut leak
From: Yangtao Li @ 2018-12-12 16:35 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: linux-input, linux-kernel, Yangtao Li

of_find_node_by_path() acquires a reference to the node returned by
it and that reference needs to be dropped by its caller. Add
i8042_is_mr_coffee() helper to avoid refconut leak.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
changes in v4:
-fix typo

changes in v3:
-add i8042_is_mr_coffee
---
 drivers/input/serio/i8042-sparcio.h | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h
index 796289846204..28aa154d9c81 100644
--- a/drivers/input/serio/i8042-sparcio.h
+++ b/drivers/input/serio/i8042-sparcio.h
@@ -106,11 +106,23 @@ static struct platform_driver sparc_i8042_driver = {
 	.remove		= sparc_i8042_remove,
 };
 
+static inline bool i8042_is_mr_coffee(void)
+{
+	struct device_node *root;
+	bool is_mr_coffee;
+
+	root = of_find_node_by_path("/");
+	is_mr_coffree = !strcmp(root->name, "SUNW,JavaStation-1");
+	of_node_put(root);
+
+	return is_mr_coffee;
+}
+
 static int __init i8042_platform_init(void)
 {
-	struct device_node *root = of_find_node_by_path("/");
+	bool match = i8042_is_mr_coffee();
 
-	if (!strcmp(root->name, "SUNW,JavaStation-1")) {
+	if (match) {
 		/* Hardcoded values for MrCoffee.  */
 		i8042_kbd_irq = i8042_aux_irq = 13 | 0x20;
 		kbd_iobase = ioremap(0x71300060, 8);
@@ -138,9 +150,9 @@ static int __init i8042_platform_init(void)
 
 static inline void i8042_platform_exit(void)
 {
-	struct device_node *root = of_find_node_by_path("/");
+	bool match = i8042_is_mr_coffee();
 
-	if (strcmp(root->name, "SUNW,JavaStation-1"))
+	if (!match)
 		platform_driver_unregister(&sparc_i8042_driver);
 }
 
-- 
2.17.0

^ permalink raw reply related

* [PATCH] Input: elantech - Disable elan-i2c for P52 and P72
From: Benjamin Tissoires @ 2018-12-12 15:42 UTC (permalink / raw)
  To: Dmitry Torokhov, kt.liao, Aaron Ma, Kai Heng Feng
  Cc: linux-input, linux-kernel, Benjamin Tissoires, stable

The current implementation of elan_i2c is known to not support those
2 laptops.

A proper fix is to tweak both elantech and elan_i2c to transmit the
correct information from PS/2, which would make a bad candidate for
stable.

So to give us some time for fixing the root of the problem, disable
elan_i2c for the devices we know are not behaving properly.

Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1803600
Link: https://bugs.archlinux.org/task/59714
Fixes: df077237cf55 Input: elantech - detect new ICs and setup Host Notify for them

Cc: stable@vger.kernel.org  # v4.18+
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
 drivers/input/mouse/elantech.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 2d95e8d93cc7..830ae9f07045 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1767,6 +1767,18 @@ static int elantech_smbus = IS_ENABLED(CONFIG_MOUSE_ELAN_I2C_SMBUS) ?
 module_param_named(elantech_smbus, elantech_smbus, int, 0644);
 MODULE_PARM_DESC(elantech_smbus, "Use a secondary bus for the Elantech device.");
 
+static const char * const i2c_blacklist_pnp_ids[] = {
+	/*
+	 * these are known to not be working properly as bits are missing
+	 * in elan_i2c
+	 */
+	"LEN2131", /* ThinkPad P52 w/ NFC */
+	"LEN2132", /* ThinkPad P52 */
+	"LEN2133", /* ThinkPad P72 w/ NFC */
+	"LEN2134", /* ThinkPad P72 */
+	NULL
+};
+
 static int elantech_create_smbus(struct psmouse *psmouse,
 				 struct elantech_device_info *info,
 				 bool leave_breadcrumbs)
@@ -1802,10 +1814,12 @@ static int elantech_setup_smbus(struct psmouse *psmouse,
 
 	if (elantech_smbus == ELANTECH_SMBUS_NOT_SET) {
 		/*
-		 * New ICs are enabled by default.
+		 * New ICs are enabled by default, unless mentioned in
+		 * i2c_blacklist_pnp_ids.
 		 * Old ICs are up to the user to decide.
 		 */
-		if (!ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version))
+		if (!ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version) ||
+		    psmouse_matches_pnp_id(psmouse, i2c_blacklist_pnp_ids))
 			return -ENXIO;
 	}
 
-- 
2.19.2

^ permalink raw reply related


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