Linux Input/HID development
 help / color / mirror / Atom feed
* Re: [PATCH] HID: add keyboard input assist hid usages
From: Olivier Gay @ 2014-10-18 15:55 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, Jiri Kosina, Mathieu Meisser
In-Reply-To: <20141017235937.GB22238@dtor-ws>

Hi Dmitry,

a potential consumer could be Android and Android IMEs, this would add
the ability for a HID device to select and control the suggested words
in the word prediction system when typing.

Olivier

On Fri, Oct 17, 2014 at 4:59 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Sat, Oct 18, 2014 at 01:53:39AM +0200, Olivier Gay wrote:
>> Add keyboard input assist controls usages from approved
>> hid usage table request HUTTR42:
>> http://www.usb.org/developers/hidpage/HUTRR42c.pdf
>>
>> Signed-off-by: Olivier Gay <ogay@logitech.com>
>> ---
>>
>> Hi all,
>>
>> this patch adds some currently missing hid usages to the
>> hid system.
>
> Who is going to be using these codes? Do we have userspace consumers?
>
> Thanks.
>
> --
> Dmitry

^ permalink raw reply

* Re: [PATCH 1/3] input: alps: Reset mouse before identifying it
From: Pali Rohár @ 2014-10-19 11:07 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Tommy Will, Hans de Goede, Yunkang Tang, linux-input,
	linux-kernel
In-Reply-To: <20141015182256.GE8625@dtor-ws>

[-- Attachment #1: Type: Text/Plain, Size: 4251 bytes --]

On Wednesday 15 October 2014 20:22:56 Dmitry Torokhov wrote:
> On Wed, Oct 15, 2014 at 08:10:39PM +0200, Pali Rohár wrote:
> > On Wednesday 15 October 2014 20:00:11 Dmitry Torokhov wrote:
> > > On Wed, Oct 15, 2014 at 07:57:37PM +0200, Pali Rohár wrote:
> > > > On Wednesday 15 October 2014 19:43:15 Dmitry Torokhov 
wrote:
> > > > > On Wed, Oct 15, 2014 at 02:53:11PM +0200, Pali Rohár 
wrote:
> > > > > > On Tuesday 14 October 2014 08:08:34 Dmitry Torokhov
> > 
> > wrote:
> > > > > > > On Fri, Oct 03, 2014 at 11:47:59AM +0200, Hans de
> > > > > > > Goede
> > > > 
> > > > wrote:
> > > > > > > > Hi,
> > > > > > > > 
> > > > > > > > Thanks for working on this!
> > > > > > > > 
> > > > > > > > On 10/03/2014 11:43 AM, Pali Rohár wrote:
> > > > > > > > > On some systems after starting computer
> > > > > > > > > function alps_identify() does not detect dual
> > > > > > > > > ALPS touchpad+trackstick device correctly and
> > > > > > > > > detect only touchpad.
> > > > > > > > > 
> > > > > > > > > Resetting ALPS device before identifiying it
> > > > > > > > > fixing this problem and both parts touchpad
> > > > > > > > > and trackstick are detected.
> > > > > > > > > 
> > > > > > > > > Signed-off-by: Pali Rohár
> > > > > > > > > <pali.rohar@gmail.com> Tested-by: Pali Rohár
> > > > > > > > > <pali.rohar@gmail.com>
> > > > > > > > 
> > > > > > > > Looks good and seems sensible:
> > > > > > > > 
> > > > > > > > Acked-by: Hans de Goede <hdegoede@redhat.com>
> > > > > > > 
> > > > > > > *sigh* I am not really happy about this, as we
> > > > > > > making boot longer and longer for people without
> > > > > > > ALPS touchpads. It would be better if we only
> > > > > > > reset the mouse when we knew we are dealing with
> > > > > > > ALPS, and even better if we only reset it when we
> > > > > > > suspected that we missed trackstick. Any chance
> > > > > > > of doing this?
> > > > > > > 
> > > > > > > Thanks.
> > > > > > 
> > > > > > Dmitry, problem is that function check which
> > > > > > detecting trackstick does not working when I start
> > > > > > my laptop from power-off state and do not reset
> > > > > > PS/2 device. But detecting ALPS touchpad looks like
> > > > > > working. So if do not like this idea, what about
> > > > > > doing something like this in alps_dectect function?
> > > > > > 
> > > > > > int alps_detect(...)
> > > > > > {
> > > > > > ...
> > > > > > /* detect if device is ALPS */
> > > > > > if (alps_identify(...) < 0)
> > > > > > return -1;
> > > > > > /* now we know that device is ALPS */
> > > > > > if (!(flags & ALPS_DUALPOINT)) {
> > > > > > /* reset it and identify again, maybe there is
> > > > > > trackstick */ psmouse_reset(...);
> > > > > > alps_identify(...);
> > > > > > }
> > > > > > ...
> > > > > > }
> > > > > > 
> > > > > > It will does not affect non ALPS devices (because
> > > > > > first identify call will fail), but will affect
> > > > > > ALPS devices without trackstick (because identify
> > > > > > will be called twice and reset too).
> > > > > 
> > > > > I think this is a step in right direction. Do you know
> > > > > what exactly fails in alps_identify() on your box if
> > > > > you do not call psmouse_reset?
> > > > > 
> > > > > Thanks.
> > > > 
> > > > Yes, I know. It is failing in
> > > > alps_probe_trackstick_v3(). It calls
> > > > alps_command_mode_read_reg(...) and it returns 0 which
> > > > means trackstick is not there.
> > > 
> > > OK, so can we try sticking psmouse_reset() there? This
> > > will limit the exposure of the new delay.
> > > 
> > > Thanks.
> > 
> > Sorry, but I think this is not safe. Function psmouse_reset
> > will reset device (set it to relative mode, etc...) and
> > before and after alps_probe_trackstick_v3() are called
> > other functions. So it could break something else.
> 
> We might need to repeat bits of alps_identify() after
> resetting the mouse, you are right. It should still be doable
> though.

What about checking "E6 report" and if that pass reset device and 
do full alps_identify? With check for "E6 report" we can filter 
probably all PS/2 devices which are not ALPS.

-- 
Pali Rohár
pali.rohar@gmail.com

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

^ permalink raw reply

* RE: [PATCH 00/13] input: cyapa: intruction of cyapa patches
From: Dudley Du @ 2014-10-20  1:15 UTC (permalink / raw)
  To: Dudley Du, dmitry.torokhov@gmail.com, rydberg@euromail.se
  Cc: bleung@google.com, patrikf@google.com,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
In-Reply-To: <1413357567-26177-1-git-send-email-dudl@cypress.com>

Hi Dmitry,

Is there any update the v8 patchs for input cyapa trackpad drivers?

Thanks,
Dudley

> -----Original Message-----
> From: Dudley Du [mailto:dudley.dulixin@gmail.com]
> Sent: 2014?10?15? 15:19
> To: dmitry.torokhov@gmail.com; rydberg@euromail.se
> Cc: Dudley Du; bleung@google.com; patrikf@google.com;
> linux-input@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH 00/13] input: cyapa: intruction of cyapa patches
>
> Based on Dmitry's comments, I made v8 patches of cyapa trackpad device
> with below updates compared with v7 patches:
> 1) [PATCH v8 01/13] - Remove the async thread for device detect in
>    proble routine, now the device detect process is completly done within
>    the device proble routine.
> 2) [PATCH v8 01/13] - Split the irq cmd hander function to separated
>    function cyapa_default_irq_cmd_handler() and set it to interface
>    cyapa_default_ops.irq_cmd_handler.
> 3) [PATCH v8 06/13] - Add cyapa->gen check in cyapa_gen3_irq_cmd_handler()
>    to avoid miss-enter when device protocol is still in detecting.
>
>
> V7 patches have below updates compared with v6 patches:
> 1) [PATCH v7 01/13] - Split the irq cmd hander function to separated
>    function cyapa_default_irq_cmd_handler() and set it to interface
>    cyapa_default_ops.irq_cmd_handler.
> 2) [PATCH v7 06/13] - Add cyapa->gen check in cyapa_gen3_irq_cmd_handler()
>    to avoid miss-enter when device protocol is still in detecting.
>
>
> V6 patches have below updates compared with v5 patches:
> 1) Remove patch 14 of the lid filtering from the cyapa driver.
>
> V5 patches have below updates compared with v4 patches:
> 1) Uses get_device()/put_device() instead of kobject_get()/kobject_put();
> 2) Fix memories freed before debugfs entries issue;
> 3) Make cyapa_debugs_root valid in driver module level
>    in module_init()/moudle_exit() ;
> 4) Fix i2c_transfer() may return partial transfer issues.
> 5) Add cyapa->removed flag to avoid detecting thread may still running
>    when driver module is removed.
> 6) Fix the meanings of some comments and return error code not clear issue.
>
> This patch set is aimed to re-architecture the cyapa driver to support
> old gen3 trackpad device and new gen5 trackpad device in one
> cyapa driver for easily productions support based on
> customers' requirements, and add sysfs functions and interfaces
> supported that required by users and customers.
> Because the earlier gen3 and the latest gen5 trackpad devies using
> two different chipsets, and have different protocol and interfaces.
> If supported these two trackpad devices in two different drivers, then
> it will be difficult to manage productions and later firmware updates.
> it will cause customer don't know which one to use and update
> because these two trackpad devices have been used and integrated
> in same one productions at a time, so must to support these two trackpad
> devices in same on driver.
>
> The new architecture is made of:
> cyapa.c - the core of the architecture, supply interfaces and
> functions to system and read trackpad devices.
> cyapa.h - header file including macros and data structure definitions.
> cyapa_gen3.c - functions support for gen3 trackpad devices,
> cyapa_gen5.c - functions support for gen5 trackpad devices.
>
> Beside this introduction patch, it has 14 patches listed as below.
> For these patches each one is patched based on previous one.
>
> patch 1/13: re-architecture cyapa driver with core functions,
> and applying the device detecting function in async thread to speed
> up system boot time.
>
> patch 2/13: add cyapa driver power management interfaces support.
>
> patch 3/13: add cyapa driver runtime power management interfaces support.
>
> patch 4/13: add cyapa key function interfaces in sysfs system.
> Including read firmware version, get production ID, read baseline,
> re-calibrate trackpad baselines and do trackpad firmware update.
>
> patch 5/13: add read firmware image and read raw trackpad device'
> sensors' raw data interface in debugfs system.
>
> patch 6/13: add gen3 trackpad device basic functions support.
>
> patch 7/13: add gen3 trackpad device firmware update function support.
>
> patch 8/13: add gen3 trackpad device report baseline and do force
> re-calibrate functions support.
>
> patch 9/13: add gen3 trackpad device read firmware image function support.
>
> patch 10/13: add gen5 trackpad device basic functions support.
>
> patch 11/13: add gen5 trackpad device firmware update function support.
>
> patch 12/13: add gen5 trackpad device report baseline and do force
> re-calibrate functions support.
>
> patch 13/13: add gen5 trackpad device read firmware image and report
> sensors' raw data values functions support.
>
> This message and any attachments may contain Cypress (or its subsidiaries)
> confidential information. If it has been received in error, please advise the sender
> and immediately delete this message.

This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.

^ permalink raw reply

* Re: [PATCH 2/3] input: stmpe: enforce device tree only mode
From: Lee Jones @ 2014-10-20  6:43 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Samuel Ortiz, Dmitry Torokhov, linux-kernel, linux-input
In-Reply-To: <1413636989-3286-1-git-send-email-linus.walleij@linaro.org>

On Sat, 18 Oct 2014, Linus Walleij wrote:

> The STMPE keypad controller is only used with device tree
> configured systems, so force the configuration to come from
> device tree only, and now actually get the rows and cols from
> the device tree too.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  .../devicetree/bindings/input/stmpe-keypad.txt     |   2 +
>  drivers/input/keyboard/Kconfig                     |   1 +
>  drivers/input/keyboard/stmpe-keypad.c              | 104 +++++++++------------
>  include/linux/mfd/stmpe.h                          |  20 ----
>  4 files changed, 48 insertions(+), 79 deletions(-)

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

> diff --git a/Documentation/devicetree/bindings/input/stmpe-keypad.txt b/Documentation/devicetree/bindings/input/stmpe-keypad.txt
> index 1b97222e8a0b..12bb771d66d4 100644
> --- a/Documentation/devicetree/bindings/input/stmpe-keypad.txt
> +++ b/Documentation/devicetree/bindings/input/stmpe-keypad.txt
> @@ -8,6 +8,8 @@ Optional properties:
>   - debounce-interval        : Debouncing interval time in milliseconds
>   - st,scan-count            : Scanning cycles elapsed before key data is updated
>   - st,no-autorepeat         : If specified device will not autorepeat
> + - keypad,num-rows          : See ./matrix-keymap.txt
> + - keypad,num-columns       : See ./matrix-keymap.txt
>  
>  Example:
>  
> diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
> index a3958c63d7d5..753d61c0a3a9 100644
> --- a/drivers/input/keyboard/Kconfig
> +++ b/drivers/input/keyboard/Kconfig
> @@ -559,6 +559,7 @@ config KEYBOARD_SH_KEYSC
>  config KEYBOARD_STMPE
>  	tristate "STMPE keypad support"
>  	depends on MFD_STMPE
> +	depends on OF
>  	select INPUT_MATRIXKMAP
>  	help
>  	  Say Y here if you want to use the keypad controller on STMPE I/O
> diff --git a/drivers/input/keyboard/stmpe-keypad.c b/drivers/input/keyboard/stmpe-keypad.c
> index ef5e67fb567e..d46391f48310 100644
> --- a/drivers/input/keyboard/stmpe-keypad.c
> +++ b/drivers/input/keyboard/stmpe-keypad.c
> @@ -45,7 +45,7 @@
>  #define STMPE_KEYPAD_MAX_ROWS		8
>  #define STMPE_KEYPAD_MAX_COLS		8
>  #define STMPE_KEYPAD_ROW_SHIFT		3
> -#define STMPE_KEYPAD_KEYMAP_SIZE	\
> +#define STMPE_KEYPAD_KEYMAP_MAX_SIZE \
>  	(STMPE_KEYPAD_MAX_ROWS * STMPE_KEYPAD_MAX_COLS)
>  
>  /**
> @@ -99,16 +99,30 @@ static const struct stmpe_keypad_variant stmpe_keypad_variants[] = {
>  	},
>  };
>  
> +/**
> + * struct stmpe_keypad - STMPE keypad state container
> + * @stmpe: pointer to parent STMPE device
> + * @input: spawned input device
> + * @variant: STMPE variant
> + * @debounce_ms: debounce interval, in ms.  Maximum is
> + *		 %STMPE_KEYPAD_MAX_DEBOUNCE.
> + * @scan_count: number of key scanning cycles to confirm key data.
> + *		Maximum is %STMPE_KEYPAD_MAX_SCAN_COUNT.
> + * @no_autorepeat: disable key autorepeat
> + * @rows: bitmask for the rows
> + * @cols: bitmask for the columns
> + * @keymap: the keymap
> + */
>  struct stmpe_keypad {
>  	struct stmpe *stmpe;
>  	struct input_dev *input;
>  	const struct stmpe_keypad_variant *variant;
> -	const struct stmpe_keypad_platform_data *plat;
> -
> +	unsigned int debounce_ms;
> +	unsigned int scan_count;
> +	bool no_autorepeat;
>  	unsigned int rows;
>  	unsigned int cols;
> -
> -	unsigned short keymap[STMPE_KEYPAD_KEYMAP_SIZE];
> +	unsigned short keymap[STMPE_KEYPAD_KEYMAP_MAX_SIZE];
>  };
>  
>  static int stmpe_keypad_read_data(struct stmpe_keypad *keypad, u8 *data)
> @@ -208,15 +222,14 @@ static int stmpe_keypad_altfunc_init(struct stmpe_keypad *keypad)
>  
>  static int stmpe_keypad_chip_init(struct stmpe_keypad *keypad)
>  {
> -	const struct stmpe_keypad_platform_data *plat = keypad->plat;
>  	const struct stmpe_keypad_variant *variant = keypad->variant;
>  	struct stmpe *stmpe = keypad->stmpe;
>  	int ret;
>  
> -	if (plat->debounce_ms > STMPE_KEYPAD_MAX_DEBOUNCE)
> +	if (keypad->debounce_ms > STMPE_KEYPAD_MAX_DEBOUNCE)
>  		return -EINVAL;
>  
> -	if (plat->scan_count > STMPE_KEYPAD_MAX_SCAN_COUNT)
> +	if (keypad->scan_count > STMPE_KEYPAD_MAX_SCAN_COUNT)
>  		return -EINVAL;
>  
>  	ret = stmpe_enable(stmpe, STMPE_BLOCK_KEYPAD);
> @@ -245,7 +258,7 @@ static int stmpe_keypad_chip_init(struct stmpe_keypad *keypad)
>  
>  	ret = stmpe_set_bits(stmpe, STMPE_KPC_CTRL_MSB,
>  			     STMPE_KPC_CTRL_MSB_SCAN_COUNT,
> -			     plat->scan_count << 4);
> +			     keypad->scan_count << 4);
>  	if (ret < 0)
>  		return ret;
>  
> @@ -253,17 +266,18 @@ static int stmpe_keypad_chip_init(struct stmpe_keypad *keypad)
>  			      STMPE_KPC_CTRL_LSB_SCAN |
>  			      STMPE_KPC_CTRL_LSB_DEBOUNCE,
>  			      STMPE_KPC_CTRL_LSB_SCAN |
> -			      (plat->debounce_ms << 1));
> +			      (keypad->debounce_ms << 1));
>  }
>  
> -static void stmpe_keypad_fill_used_pins(struct stmpe_keypad *keypad)
> +static void stmpe_keypad_fill_used_pins(struct stmpe_keypad *keypad,
> +					u32 used_rows, u32 used_cols)
>  {
>  	int row, col;
>  
> -	for (row = 0; row < STMPE_KEYPAD_MAX_ROWS; row++) {
> -		for (col = 0; col < STMPE_KEYPAD_MAX_COLS; col++) {
> +	for (row = 0; row < used_rows; row++) {
> +		for (col = 0; col < used_cols; col++) {
>  			int code = MATRIX_SCAN_CODE(row, col,
> -						STMPE_KEYPAD_ROW_SHIFT);
> +						    STMPE_KEYPAD_ROW_SHIFT);
>  			if (keypad->keymap[code] != KEY_RESERVED) {
>  				keypad->rows |= 1 << row;
>  				keypad->cols |= 1 << col;
> @@ -272,51 +286,17 @@ static void stmpe_keypad_fill_used_pins(struct stmpe_keypad *keypad)
>  	}
>  }
>  
> -#ifdef CONFIG_OF
> -static const struct stmpe_keypad_platform_data *
> -stmpe_keypad_of_probe(struct device *dev)
> -{
> -	struct device_node *np = dev->of_node;
> -	struct stmpe_keypad_platform_data *plat;
> -
> -	if (!np)
> -		return ERR_PTR(-ENODEV);
> -
> -	plat = devm_kzalloc(dev, sizeof(*plat), GFP_KERNEL);
> -	if (!plat)
> -		return ERR_PTR(-ENOMEM);
> -
> -	of_property_read_u32(np, "debounce-interval", &plat->debounce_ms);
> -	of_property_read_u32(np, "st,scan-count", &plat->scan_count);
> -
> -	plat->no_autorepeat = of_property_read_bool(np, "st,no-autorepeat");
> -
> -	return plat;
> -}
> -#else
> -static inline const struct stmpe_keypad_platform_data *
> -stmpe_keypad_of_probe(struct device *dev)
> -{
> -	return ERR_PTR(-EINVAL);
> -}
> -#endif
> -
>  static int stmpe_keypad_probe(struct platform_device *pdev)
>  {
>  	struct stmpe *stmpe = dev_get_drvdata(pdev->dev.parent);
> -	const struct stmpe_keypad_platform_data *plat;
> +	struct device_node *np = pdev->dev.of_node;
>  	struct stmpe_keypad *keypad;
>  	struct input_dev *input;
> +	u32 rows;
> +	u32 cols;
>  	int error;
>  	int irq;
>  
> -	plat = stmpe->pdata->keypad;
> -	if (!plat) {
> -		plat = stmpe_keypad_of_probe(&pdev->dev);
> -		if (IS_ERR(plat))
> -			return PTR_ERR(plat);
> -	}
> -
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0)
>  		return irq;
> @@ -326,6 +306,13 @@ static int stmpe_keypad_probe(struct platform_device *pdev)
>  	if (!keypad)
>  		return -ENOMEM;
>  
> +	keypad->stmpe = stmpe;
> +	keypad->variant = &stmpe_keypad_variants[stmpe->partnum];
> +
> +	of_property_read_u32(np, "debounce-interval", &keypad->debounce_ms);
> +	of_property_read_u32(np, "st,scan-count", &keypad->scan_count);
> +	keypad->no_autorepeat = of_property_read_bool(np, "st,no-autorepeat");
> +
>  	input = devm_input_allocate_device(&pdev->dev);
>  	if (!input)
>  		return -ENOMEM;
> @@ -334,23 +321,22 @@ static int stmpe_keypad_probe(struct platform_device *pdev)
>  	input->id.bustype = BUS_I2C;
>  	input->dev.parent = &pdev->dev;
>  
> -	error = matrix_keypad_build_keymap(plat->keymap_data, NULL,
> -					   STMPE_KEYPAD_MAX_ROWS,
> -					   STMPE_KEYPAD_MAX_COLS,
> +	error = matrix_keypad_parse_of_params(&pdev->dev, &rows, &cols);
> +	if (error)
> +		return error;
> +
> +	error = matrix_keypad_build_keymap(NULL, NULL, rows, cols,
>  					   keypad->keymap, input);
>  	if (error)
>  		return error;
>  
>  	input_set_capability(input, EV_MSC, MSC_SCAN);
> -	if (!plat->no_autorepeat)
> +	if (!keypad->no_autorepeat)
>  		__set_bit(EV_REP, input->evbit);
>  
> -	stmpe_keypad_fill_used_pins(keypad);
> +	stmpe_keypad_fill_used_pins(keypad, rows, cols);
>  
> -	keypad->stmpe = stmpe;
> -	keypad->plat = plat;
>  	keypad->input = input;
> -	keypad->variant = &stmpe_keypad_variants[stmpe->partnum];
>  
>  	error = stmpe_keypad_chip_init(keypad);
>  	if (error < 0)
> diff --git a/include/linux/mfd/stmpe.h b/include/linux/mfd/stmpe.h
> index 976e1a390177..dd908fea8c5b 100644
> --- a/include/linux/mfd/stmpe.h
> +++ b/include/linux/mfd/stmpe.h
> @@ -116,24 +116,6 @@ extern int stmpe_set_altfunc(struct stmpe *stmpe, u32 pins,
>  extern int stmpe_enable(struct stmpe *stmpe, unsigned int blocks);
>  extern int stmpe_disable(struct stmpe *stmpe, unsigned int blocks);
>  
> -struct matrix_keymap_data;
> -
> -/**
> - * struct stmpe_keypad_platform_data - STMPE keypad platform data
> - * @keymap_data: key map table and size
> - * @debounce_ms: debounce interval, in ms.  Maximum is
> - *		 %STMPE_KEYPAD_MAX_DEBOUNCE.
> - * @scan_count: number of key scanning cycles to confirm key data.
> - *		Maximum is %STMPE_KEYPAD_MAX_SCAN_COUNT.
> - * @no_autorepeat: disable key autorepeat
> - */
> -struct stmpe_keypad_platform_data {
> -	const struct matrix_keymap_data *keymap_data;
> -	unsigned int debounce_ms;
> -	unsigned int scan_count;
> -	bool no_autorepeat;
> -};
> -
>  #define STMPE_GPIO_NOREQ_811_TOUCH	(0xf0)
>  
>  /**
> @@ -202,7 +184,6 @@ struct stmpe_ts_platform_data {
>   * @irq_gpio: gpio number over which irq will be requested (significant only if
>   *	      irq_over_gpio is true)
>   * @gpio: GPIO-specific platform data
> - * @keypad: keypad-specific platform data
>   * @ts: touchscreen-specific platform data
>   */
>  struct stmpe_platform_data {
> @@ -215,7 +196,6 @@ struct stmpe_platform_data {
>  	int autosleep_timeout;
>  
>  	struct stmpe_gpio_platform_data *gpio;
> -	struct stmpe_keypad_platform_data *keypad;
>  	struct stmpe_ts_platform_data *ts;
>  };
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply

* Re: [PATCH 1/3] mfd: stmpe: add pull up/down register offsets for STMPE
From: Lee Jones @ 2014-10-20  6:46 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Samuel Ortiz, Dmitry Torokhov, linux-kernel, linux-input
In-Reply-To: <1413636974-3244-1-git-send-email-linus.walleij@linaro.org>

On Sat, 18 Oct 2014, Linus Walleij wrote:

> This adds the register offsets for pull up/down for the STMPE
> 1601, 1801 and 24xx expanders. This is used to bias GPIO lines
> and keypad lines.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> Hi Sam, Lee: I think you should just ACK this so Dmitry can take the
> patch series through the input tree, where the registers need to be
> used to enable the keypad on the STMPE2401.
> ---
>  drivers/mfd/stmpe.c       | 4 ++++
>  drivers/mfd/stmpe.h       | 3 +++
>  include/linux/mfd/stmpe.h | 2 ++
>  3 files changed, 9 insertions(+)

Does this need to go in with the other patches in the set?

I'm _guessing_ that, as you've sent them separately, they can be
applied separately?

This needs to go in via MFD, but for my own reference:

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

> diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
> index 3004d5ba0b82..497505bad4c4 100644
> --- a/drivers/mfd/stmpe.c
> +++ b/drivers/mfd/stmpe.c
> @@ -547,6 +547,7 @@ static const u8 stmpe1601_regs[] = {
>  	[STMPE_IDX_GPDR_LSB]	= STMPE1601_REG_GPIO_SET_DIR_LSB,
>  	[STMPE_IDX_GPRER_LSB]	= STMPE1601_REG_GPIO_RE_LSB,
>  	[STMPE_IDX_GPFER_LSB]	= STMPE1601_REG_GPIO_FE_LSB,
> +	[STMPE_IDX_GPPUR_LSB]	= STMPE1601_REG_GPIO_PU_LSB,
>  	[STMPE_IDX_GPAFR_U_MSB]	= STMPE1601_REG_GPIO_AF_U_MSB,
>  	[STMPE_IDX_IEGPIOR_LSB]	= STMPE1601_REG_INT_EN_GPIO_MASK_LSB,
>  	[STMPE_IDX_ISGPIOR_MSB]	= STMPE1601_REG_INT_STA_GPIO_MSB,
> @@ -695,6 +696,7 @@ static const u8 stmpe1801_regs[] = {
>  	[STMPE_IDX_GPDR_LSB]	= STMPE1801_REG_GPIO_SET_DIR_LOW,
>  	[STMPE_IDX_GPRER_LSB]	= STMPE1801_REG_GPIO_RE_LOW,
>  	[STMPE_IDX_GPFER_LSB]	= STMPE1801_REG_GPIO_FE_LOW,
> +	[STMPE_IDX_GPPUR_LSB]	= STMPE1801_REG_GPIO_PULL_UP_LOW,
>  	[STMPE_IDX_IEGPIOR_LSB]	= STMPE1801_REG_INT_EN_GPIO_MASK_LOW,
>  	[STMPE_IDX_ISGPIOR_LSB]	= STMPE1801_REG_INT_STA_GPIO_LOW,
>  };
> @@ -778,6 +780,8 @@ static const u8 stmpe24xx_regs[] = {
>  	[STMPE_IDX_GPDR_LSB]	= STMPE24XX_REG_GPDR_LSB,
>  	[STMPE_IDX_GPRER_LSB]	= STMPE24XX_REG_GPRER_LSB,
>  	[STMPE_IDX_GPFER_LSB]	= STMPE24XX_REG_GPFER_LSB,
> +	[STMPE_IDX_GPPUR_LSB]	= STMPE24XX_REG_GPPUR_LSB,
> +	[STMPE_IDX_GPPDR_LSB]	= STMPE24XX_REG_GPPDR_LSB,
>  	[STMPE_IDX_GPAFR_U_MSB]	= STMPE24XX_REG_GPAFR_U_MSB,
>  	[STMPE_IDX_IEGPIOR_LSB]	= STMPE24XX_REG_IEGPIOR_LSB,
>  	[STMPE_IDX_ISGPIOR_MSB]	= STMPE24XX_REG_ISGPIOR_MSB,
> diff --git a/drivers/mfd/stmpe.h b/drivers/mfd/stmpe.h
> index bee0abf82040..84adb46b3e2f 100644
> --- a/drivers/mfd/stmpe.h
> +++ b/drivers/mfd/stmpe.h
> @@ -188,6 +188,7 @@ int stmpe_remove(struct stmpe *stmpe);
>  #define STMPE1601_REG_GPIO_ED_MSB		0x8A
>  #define STMPE1601_REG_GPIO_RE_LSB		0x8D
>  #define STMPE1601_REG_GPIO_FE_LSB		0x8F
> +#define STMPE1601_REG_GPIO_PU_LSB		0x91
>  #define STMPE1601_REG_GPIO_AF_U_MSB		0x92
>  
>  #define STMPE1601_SYS_CTRL_ENABLE_GPIO		(1 << 3)
> @@ -276,6 +277,8 @@ int stmpe_remove(struct stmpe *stmpe);
>  #define STMPE24XX_REG_GPEDR_MSB		0x8C
>  #define STMPE24XX_REG_GPRER_LSB		0x91
>  #define STMPE24XX_REG_GPFER_LSB		0x94
> +#define STMPE24XX_REG_GPPUR_LSB		0x97
> +#define STMPE24XX_REG_GPPDR_LSB		0x9a
>  #define STMPE24XX_REG_GPAFR_U_MSB	0x9B
>  
>  #define STMPE24XX_SYS_CTRL_ENABLE_GPIO		(1 << 3)
> diff --git a/include/linux/mfd/stmpe.h b/include/linux/mfd/stmpe.h
> index af9e1b07a630..976e1a390177 100644
> --- a/include/linux/mfd/stmpe.h
> +++ b/include/linux/mfd/stmpe.h
> @@ -50,6 +50,8 @@ enum {
>  	STMPE_IDX_GPEDR_MSB,
>  	STMPE_IDX_GPRER_LSB,
>  	STMPE_IDX_GPFER_LSB,
> +	STMPE_IDX_GPPUR_LSB,
> +	STMPE_IDX_GPPDR_LSB,
>  	STMPE_IDX_GPAFR_U_MSB,
>  	STMPE_IDX_IEGPIOR_LSB,
>  	STMPE_IDX_ISGPIOR_LSB,

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH] HID: add keyboard input assist hid usages
From: Jiri Kosina @ 2014-10-20  9:28 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Olivier Gay, linux-input, Mathieu Meisser
In-Reply-To: <20141017235937.GB22238@dtor-ws>

On Fri, 17 Oct 2014, Dmitry Torokhov wrote:

> > Add keyboard input assist controls usages from approved
> > hid usage table request HUTTR42:
> > http://www.usb.org/developers/hidpage/HUTRR42c.pdf
> > 
> > Signed-off-by: Olivier Gay <ogay@logitech.com>
> > ---
> > 
> > Hi all,
> > 
> > this patch adds some currently missing hid usages to the
> > hid system.
> 
> Who is going to be using these codes? Do we have userspace consumers?

As review request #42 has been approved, I don't really have strong 
objections to adding this, as it means certain level of standardization by 
he USB Device Working Group HID Committee.

Dmitry, given your question, I am not applying the patch yet and waiting 
for your consideration/Ack.

Thanks,

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply

* Re: ASUS N550JK Touchpad recognized wrongly as PS/2 mouse
From: Benjamin Tissoires @ 2014-10-20 15:38 UTC (permalink / raw)
  To: Carla Rosenfield, Hans de Goede; +Cc: linux-input
In-Reply-To: <CAJ_4JbZWLXVRGwwuYnzoVvTOM-fUE4vb9jeZLQJ2LUD+fOhs-Q@mail.gmail.com>

Hi Carla,

just FYI, I have the same laptop model than you, and can reproduce
your bug report in the same way. I'll work on that to make it working
properly.

Hans, (unfortunately,) this laptop has a ETD0105 touchpad from Elan.
That means that we do not have the X550 touchpad in house, but also
means that we should be able to get in working faster than the X550
one :)

Cheers,
Benjamin


On Tue, Oct 7, 2014 at 10:52 PM, Carla Rosenfield
<c.rosenfield@gmail.com> wrote:
> [1]
> [ASUS N550JK] Touchpad recognized wrongly as PS/2 mouse
>
> [2]
> The touchpad on my ASUS N550JK laptop is being recognized as a PS/2
> Logitech Wheel mouse, rather than as a touchpad. As such, I have not
> been able to turn on edge-scrolling or two-finger-scrolling. The
> touchpad does function as a simple mouse for moving the cursor and
> right- and left-clicking. Simply booting and logging into the GUI (I'm
> using XFCE) in the current upstream 3.17.0 generic amd64 kernel is
> sufficient to reproduce this bug.
>
> [3]
>
> [4]
> Linux version 3.17.0-031700-generic (apw@gomeisa) (gcc version 4.6.3
> (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #201410060605 SMP Mon Oct 6 10:07:09
> UTC 2014
>
> [5]
>
> [6]
>
> [7]
> Description: Ubuntu 14.04.1 LTS
> Release: 14.04
>
>
> [7.1]
> Linux viror 3.17.0-031700-generic #201410060605 SMP Mon Oct 6 10:07:09
> UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
>
> Gnu C                  4.8
> Gnu make               3.81
> binutils               2.24
> util-linux             2.20.1
> mount                  support
> module-init-tools      15
> e2fsprogs              1.42.9
> pcmciautils            018
> PPP                    2.4.5
> Linux C Library        2.19
> Dynamic linker (ldd)   2.19
> Procps                 3.3.9
> Net-tools              1.60
> Kbd                    1.15.5
> Sh-utils               8.21
> wireless-tools         30
> Modules Loaded         ctr ccm bbswitch arc4 dm_crypt iwlmvm mac80211
> rtsx_usb_ms memstick asus_nb_wmi asus_wmi intel_rapl sparse_keymap
> mxm_wmi x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm
> rfcomm bnep crct10dif_pclmul crc32_pclmul uvcvideo videobuf2_vmalloc
> videobuf2_memops videobuf2_core ghash_clmulni_intel v4l2_common
> aesni_intel videodev media hid_multitouch aes_x86_64 lrw joydev
> iwlwifi gf128mul btusb glue_helper ablk_helper serio_raw cryptd
> bluetooth rtc_efi cfg80211 lpc_ich wmi mac_hid binfmt_misc mei_me mei
> snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic
> snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_pcm
> snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device
> snd_timer snd ie31200_edac soundcore edac_core parport_pc ppdev lp
> parport nls_iso8859_1 rtsx_usb_sdmmc rtsx_usb hid_generic usbhid hid
> i915 i2c_algo_bit drm_kms_helper psmouse r8169 ahci drm libahci mii
> video
>
> [7.2]  processor : 0
> vendor_id : GenuineIntel
> cpu family : 6
> model : 60
> model name : Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz
> stepping : 3
> microcode : 0x17
> cpu MHz : 2403.417
> cache size : 6144 KB
> physical id : 0
> siblings : 8
> core id : 0
> cpu cores : 4
> apicid : 0
> initial apicid : 0
> fpu : yes
> fpu_exception : yes
> cpuid level : 13
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
> pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
> pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
> xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor
> ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic
> movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm
> ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
> fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt
> bugs :
> bogomips : 4988.73
> clflush size : 64
> cache_alignment : 64
> address sizes : 39 bits physical, 48 bits virtual
> power management:
>
> processor : 1
> vendor_id : GenuineIntel
> cpu family : 6
> model : 60
> model name : Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz
> stepping : 3
> microcode : 0x17
> cpu MHz : 3058.496
> cache size : 6144 KB
> physical id : 0
> siblings : 8
> core id : 1
> cpu cores : 4
> apicid : 2
> initial apicid : 2
> fpu : yes
> fpu_exception : yes
> cpuid level : 13
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
> pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
> pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
> xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor
> ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic
> movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm
> ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
> fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt
> bugs :
> bogomips : 4988.73
> clflush size : 64
> cache_alignment : 64
> address sizes : 39 bits physical, 48 bits virtual
> power management:
>
> processor : 2
> vendor_id : GenuineIntel
> cpu family : 6
> model : 60
> model name : Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz
> stepping : 3
> microcode : 0x17
> cpu MHz : 3310.742
> cache size : 6144 KB
> physical id : 0
> siblings : 8
> core id : 2
> cpu cores : 4
> apicid : 4
> initial apicid : 4
> fpu : yes
> fpu_exception : yes
> cpuid level : 13
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
> pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
> pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
> xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor
> ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic
> movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm
> ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
> fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt
> bugs :
> bogomips : 4988.73
> clflush size : 64
> cache_alignment : 64
> address sizes : 39 bits physical, 48 bits virtual
> power management:
>
> processor : 3
> vendor_id : GenuineIntel
> cpu family : 6
> model : 60
> model name : Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz
> stepping : 3
> microcode : 0x17
> cpu MHz : 3116.406
> cache size : 6144 KB
> physical id : 0
> siblings : 8
> core id : 3
> cpu cores : 4
> apicid : 6
> initial apicid : 6
> fpu : yes
> fpu_exception : yes
> cpuid level : 13
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
> pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
> pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
> xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor
> ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic
> movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm
> ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
> fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt
> bugs :
> bogomips : 4988.73
> clflush size : 64
> cache_alignment : 64
> address sizes : 39 bits physical, 48 bits virtual
> power management:
>
> processor : 4
> vendor_id : GenuineIntel
> cpu family : 6
> model : 60
> model name : Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz
> stepping : 3
> microcode : 0x17
> cpu MHz : 3385.449
> cache size : 6144 KB
> physical id : 0
> siblings : 8
> core id : 0
> cpu cores : 4
> apicid : 1
> initial apicid : 1
> fpu : yes
> fpu_exception : yes
> cpuid level : 13
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
> pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
> pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
> xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor
> ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic
> movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm
> ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
> fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt
> bugs :
> bogomips : 4988.73
> clflush size : 64
> cache_alignment : 64
> address sizes : 39 bits physical, 48 bits virtual
> power management:
>
> processor : 5
> vendor_id : GenuineIntel
> cpu family : 6
> model : 60
> model name : Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz
> stepping : 3
> microcode : 0x17
> cpu MHz : 3310.839
> cache size : 6144 KB
> physical id : 0
> siblings : 8
> core id : 1
> cpu cores : 4
> apicid : 3
> initial apicid : 3
> fpu : yes
> fpu_exception : yes
> cpuid level : 13
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
> pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
> pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
> xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor
> ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic
> movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm
> ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
> fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt
> bugs :
> bogomips : 4988.73
> clflush size : 64
> cache_alignment : 64
> address sizes : 39 bits physical, 48 bits virtual
> power management:
>
> processor : 6
> vendor_id : GenuineIntel
> cpu family : 6
> model : 60
> model name : Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz
> stepping : 3
> microcode : 0x17
> cpu MHz : 3445.312
> cache size : 6144 KB
> physical id : 0
> siblings : 8
> core id : 2
> cpu cores : 4
> apicid : 5
> initial apicid : 5
> fpu : yes
> fpu_exception : yes
> cpuid level : 13
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
> pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
> pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
> xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor
> ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic
> movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm
> ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
> fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt
> bugs :
> bogomips : 4988.73
> clflush size : 64
> cache_alignment : 64
> address sizes : 39 bits physical, 48 bits virtual
> power management:
>
> processor : 7
> vendor_id : GenuineIntel
> cpu family : 6
> model : 60
> model name : Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz
> stepping : 3
> microcode : 0x17
> cpu MHz : 3349.121
> cache size : 6144 KB
> physical id : 0
> siblings : 8
> core id : 3
> cpu cores : 4
> apicid : 7
> initial apicid : 7
> fpu : yes
> fpu_exception : yes
> cpuid level : 13
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
> pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
> pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
> xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor
> ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic
> movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm
> ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
> fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt
> bugs :
> bogomips : 4988.73
> clflush size : 64
> cache_alignment : 64
> address sizes : 39 bits physical, 48 bits virtual
> power management:
>
>
> [7.3]
> ctr 13193 3 - Live 0x0000000000000000
> ccm 17856 3 - Live 0x0000000000000000
> bbswitch 13943 0 - Live 0x0000000000000000 (OE)
> arc4 12573 2 - Live 0x0000000000000000
> dm_crypt 23456 0 - Live 0x0000000000000000
> iwlmvm 249097 0 - Live 0x0000000000000000
> mac80211 696913 1 iwlmvm, Live 0x0000000000000000
> rtsx_usb_ms 19050 0 - Live 0x0000000000000000
> memstick 16968 1 rtsx_usb_ms, Live 0x0000000000000000
> asus_nb_wmi 21128 0 - Live 0x0000000000000000
> asus_wmi 24697 1 asus_nb_wmi, Live 0x0000000000000000
> intel_rapl 19196 0 - Live 0x0000000000000000
> sparse_keymap 13890 1 asus_wmi, Live 0x0000000000000000
> mxm_wmi 13021 0 - Live 0x0000000000000000
> x86_pkg_temp_thermal 14312 0 - Live 0x0000000000000000
> intel_powerclamp 19099 0 - Live 0x0000000000000000
> coretemp 13638 0 - Live 0x0000000000000000
> kvm_intel 149257 0 - Live 0x0000000000000000
> kvm 468567 1 kvm_intel, Live 0x0000000000000000
> rfcomm 75114 12 - Live 0x0000000000000000
> bnep 19884 2 - Live 0x0000000000000000
> crct10dif_pclmul 14268 0 - Live 0x0000000000000000
> crc32_pclmul 13180 0 - Live 0x0000000000000000
> uvcvideo 86628 0 - Live 0x0000000000000000
> videobuf2_vmalloc 13216 1 uvcvideo, Live 0x0000000000000000
> videobuf2_memops 13362 1 videobuf2_vmalloc, Live 0x0000000000000000
> videobuf2_core 59907 1 uvcvideo, Live 0x0000000000000000
> ghash_clmulni_intel 13230 0 - Live 0x0000000000000000
> v4l2_common 15715 1 videobuf2_core, Live 0x0000000000000000
> aesni_intel 165469 96958 - Live 0x0000000000000000
> videodev 163831 3 uvcvideo,videobuf2_core,v4l2_common, Live 0x0000000000000000
> media 22008 2 uvcvideo,videodev, Live 0x0000000000000000
> hid_multitouch 17657 0 - Live 0x0000000000000000
> aes_x86_64 17131 1 aesni_intel, Live 0x0000000000000000
> lrw 13323 1 aesni_intel, Live 0x0000000000000000
> joydev 17587 0 - Live 0x0000000000000000
> iwlwifi 190863 1 iwlmvm, Live 0x0000000000000000
> gf128mul 14951 1 lrw, Live 0x0000000000000000
> btusb 32408 0 - Live 0x0000000000000000
> glue_helper 14095 1 aesni_intel, Live 0x0000000000000000
> ablk_helper 13597 1 aesni_intel, Live 0x0000000000000000
> serio_raw 13483 0 - Live 0x0000000000000000
> cryptd 20531 48478 ghash_clmulni_intel,aesni_intel,ablk_helper, Live
> 0x0000000000000000
> bluetooth 477455 22 rfcomm,bnep,btusb, Live 0x0000000000000000
> rtc_efi 12760 0 - Live 0x0000000000000000
> cfg80211 514757 3 iwlmvm,mac80211,iwlwifi, Live 0x0000000000000000
> lpc_ich 21176 0 - Live 0x0000000000000000
> wmi 19379 2 asus_wmi,mxm_wmi, Live 0x0000000000000000
> mac_hid 13275 0 - Live 0x0000000000000000
> binfmt_misc 17508 1 - Live 0x0000000000000000
> mei_me 19524 0 - Live 0x0000000000000000
> mei 88810 1 mei_me, Live 0x0000000000000000
> snd_hda_codec_hdmi 52620 1 - Live 0x0000000000000000
> snd_hda_codec_realtek 78564 1 - Live 0x0000000000000000
> snd_hda_codec_generic 70087 1 snd_hda_codec_realtek, Live 0x0000000000000000
> snd_hda_intel 30783 10 - Live 0x0000000000000000
> snd_hda_controller 32234 1 snd_hda_intel, Live 0x0000000000000000
> snd_hda_codec 145035 5
> snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller,
> Live 0x0000000000000000
> snd_hwdep 17709 1 snd_hda_codec, Live 0x0000000000000000
> snd_pcm 105052 4
> snd_hda_codec_hdmi,snd_hda_intel,snd_hda_controller,snd_hda_codec,
> Live 0x0000000000000000
> snd_seq_midi 13564 0 - Live 0x0000000000000000
> snd_seq_midi_event 14899 1 snd_seq_midi, Live 0x0000000000000000
> snd_rawmidi 31197 1 snd_seq_midi, Live 0x0000000000000000
> snd_seq 63540 2 snd_seq_midi,snd_seq_midi_event, Live 0x0000000000000000
> snd_seq_device 14497 3 snd_seq_midi,snd_rawmidi,snd_seq, Live 0x0000000000000000
> snd_timer 30118 2 snd_pcm,snd_seq, Live 0x0000000000000000
> snd 84025 31 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_seq_device,snd_timer,
> Live 0x0000000000000000
> ie31200_edac 12938 0 - Live 0x0000000000000000
> soundcore 15091 2 snd_hda_codec,snd, Live 0x0000000000000000
> edac_core 52405 1 ie31200_edac, Live 0x0000000000000000
> parport_pc 32906 0 - Live 0x0000000000000000
> ppdev 17711 0 - Live 0x0000000000000000
> lp 17799 0 - Live 0x0000000000000000
> parport 42481 3 parport_pc,ppdev,lp, Live 0x0000000000000000
> nls_iso8859_1 12713 1 - Live 0x0000000000000000
> rtsx_usb_sdmmc 28381 0 - Live 0x0000000000000000
> rtsx_usb 21330 2 rtsx_usb_ms,rtsx_usb_sdmmc, Live 0x0000000000000000
> hid_generic 12559 0 - Live 0x0000000000000000
> usbhid 53122 0 - Live 0x0000000000000000
> hid 110572 4 hid_multitouch,hid_generic,usbhid, Live 0x0000000000000000
> i915 993210 8 - Live 0x0000000000000000
> i2c_algo_bit 13564 1 i915, Live 0x0000000000000000
> drm_kms_helper 99872 1 i915, Live 0x0000000000000000
> psmouse 118039 0 - Live 0x0000000000000000
> r8169 77680 0 - Live 0x0000000000000000
> ahci 30167 3 - Live 0x0000000000000000
> drm 318542 7 i915,drm_kms_helper, Live 0x0000000000000000
> libahci 32533 1 ahci, Live 0x0000000000000000
> mii 13981 1 r8169, Live 0x0000000000000000
> video 20569 2 asus_wmi,i915, Live 0x0000000000000000
>
>
> [7.4]ctr 13193 3 - Live 0x0000000000000000
> ccm 17856 3 - Live 0x0000000000000000
> bbswitch 13943 0 - Live 0x0000000000000000 (OE)
> arc4 12573 2 - Live 0x0000000000000000
> dm_crypt 23456 0 - Live 0x0000000000000000
> iwlmvm 249097 0 - Live 0x0000000000000000
> mac80211 696913 1 iwlmvm, Live 0x0000000000000000
> rtsx_usb_ms 19050 0 - Live 0x0000000000000000
> memstick 16968 1 rtsx_usb_ms, Live 0x0000000000000000
> asus_nb_wmi 21128 0 - Live 0x0000000000000000
> asus_wmi 24697 1 asus_nb_wmi, Live 0x0000000000000000
> intel_rapl 19196 0 - Live 0x0000000000000000
> sparse_keymap 13890 1 asus_wmi, Live 0x0000000000000000
> mxm_wmi 13021 0 - Live 0x0000000000000000
> x86_pkg_temp_thermal 14312 0 - Live 0x0000000000000000
> intel_powerclamp 19099 0 - Live 0x0000000000000000
> coretemp 13638 0 - Live 0x0000000000000000
> kvm_intel 149257 0 - Live 0x0000000000000000
> kvm 468567 1 kvm_intel, Live 0x0000000000000000
> rfcomm 75114 12 - Live 0x0000000000000000
> bnep 19884 2 - Live 0x0000000000000000
> crct10dif_pclmul 14268 0 - Live 0x0000000000000000
> crc32_pclmul 13180 0 - Live 0x0000000000000000
> uvcvideo 86628 0 - Live 0x0000000000000000
> videobuf2_vmalloc 13216 1 uvcvideo, Live 0x0000000000000000
> videobuf2_memops 13362 1 videobuf2_vmalloc, Live 0x0000000000000000
> videobuf2_core 59907 1 uvcvideo, Live 0x0000000000000000
> ghash_clmulni_intel 13230 0 - Live 0x0000000000000000
> v4l2_common 15715 1 videobuf2_core, Live 0x0000000000000000
> aesni_intel 165469 96958 - Live 0x0000000000000000
> videodev 163831 3 uvcvideo,videobuf2_core,v4l2_common, Live 0x0000000000000000
> media 22008 2 uvcvideo,videodev, Live 0x0000000000000000
> hid_multitouch 17657 0 - Live 0x0000000000000000
> aes_x86_64 17131 1 aesni_intel, Live 0x0000000000000000
> lrw 13323 1 aesni_intel, Live 0x0000000000000000
> joydev 17587 0 - Live 0x0000000000000000
> iwlwifi 190863 1 iwlmvm, Live 0x0000000000000000
> gf128mul 14951 1 lrw, Live 0x0000000000000000
> btusb 32408 0 - Live 0x0000000000000000
> glue_helper 14095 1 aesni_intel, Live 0x0000000000000000
> ablk_helper 13597 1 aesni_intel, Live 0x0000000000000000
> serio_raw 13483 0 - Live 0x0000000000000000
> cryptd 20531 48478 ghash_clmulni_intel,aesni_intel,ablk_helper, Live
> 0x0000000000000000
> bluetooth 477455 22 rfcomm,bnep,btusb, Live 0x0000000000000000
> rtc_efi 12760 0 - Live 0x0000000000000000
> cfg80211 514757 3 iwlmvm,mac80211,iwlwifi, Live 0x0000000000000000
> lpc_ich 21176 0 - Live 0x0000000000000000
> wmi 19379 2 asus_wmi,mxm_wmi, Live 0x0000000000000000
> mac_hid 13275 0 - Live 0x0000000000000000
> binfmt_misc 17508 1 - Live 0x0000000000000000
> mei_me 19524 0 - Live 0x0000000000000000
> mei 88810 1 mei_me, Live 0x0000000000000000
> snd_hda_codec_hdmi 52620 1 - Live 0x0000000000000000
> snd_hda_codec_realtek 78564 1 - Live 0x0000000000000000
> snd_hda_codec_generic 70087 1 snd_hda_codec_realtek, Live 0x0000000000000000
> snd_hda_intel 30783 10 - Live 0x0000000000000000
> snd_hda_controller 32234 1 snd_hda_intel, Live 0x0000000000000000
> snd_hda_codec 145035 5
> snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller,
> Live 0x0000000000000000
> snd_hwdep 17709 1 snd_hda_codec, Live 0x0000000000000000
> snd_pcm 105052 4
> snd_hda_codec_hdmi,snd_hda_intel,snd_hda_controller,snd_hda_codec,
> Live 0x0000000000000000
> snd_seq_midi 13564 0 - Live 0x0000000000000000
> snd_seq_midi_event 14899 1 snd_seq_midi, Live 0x0000000000000000
> snd_rawmidi 31197 1 snd_seq_midi, Live 0x0000000000000000
> snd_seq 63540 2 snd_seq_midi,snd_seq_midi_event, Live 0x0000000000000000
> snd_seq_device 14497 3 snd_seq_midi,snd_rawmidi,snd_seq, Live 0x0000000000000000
> snd_timer 30118 2 snd_pcm,snd_seq, Live 0x0000000000000000
> snd 84025 31 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_seq_device,snd_timer,
> Live 0x0000000000000000
> ie31200_edac 12938 0 - Live 0x0000000000000000
> soundcore 15091 2 snd_hda_codec,snd, Live 0x0000000000000000
> edac_core 52405 1 ie31200_edac, Live 0x0000000000000000
> parport_pc 32906 0 - Live 0x0000000000000000
> ppdev 17711 0 - Live 0x0000000000000000
> lp 17799 0 - Live 0x0000000000000000
> parport 42481 3 parport_pc,ppdev,lp, Live 0x0000000000000000
> nls_iso8859_1 12713 1 - Live 0x0000000000000000
> rtsx_usb_sdmmc 28381 0 - Live 0x0000000000000000
> rtsx_usb 21330 2 rtsx_usb_ms,rtsx_usb_sdmmc, Live 0x0000000000000000
> hid_generic 12559 0 - Live 0x0000000000000000
> usbhid 53122 0 - Live 0x0000000000000000
> hid 110572 4 hid_multitouch,hid_generic,usbhid, Live 0x0000000000000000
> i915 993210 8 - Live 0x0000000000000000
> i2c_algo_bit 13564 1 i915, Live 0x0000000000000000
> drm_kms_helper 99872 1 i915, Live 0x0000000000000000
> psmouse 118039 0 - Live 0x0000000000000000
> r8169 77680 0 - Live 0x0000000000000000
> ahci 30167 3 - Live 0x0000000000000000
> drm 318542 7 i915,drm_kms_helper, Live 0x0000000000000000
> libahci 32533 1 ahci, Live 0x0000000000000000
> mii 13981 1 r8169, Live 0x0000000000000000
> video 20569 2 asus_wmi,i915, Live 0x0000000000000000
>
> carla@viror:~$ cat /proc/iomem
> 00000000-00000fff : reserved
> 00001000-00057fff : System RAM
> 00058000-00058fff : reserved
> 00059000-0009dfff : System RAM
> 0009e000-0009ffff : reserved
> 000a0000-000bffff : PCI Bus 0000:00
> 000c0000-000c3fff : PCI Bus 0000:00
> 000c4000-000c7fff : PCI Bus 0000:00
> 000c8000-000cbfff : PCI Bus 0000:00
> 000cc000-000cffff : PCI Bus 0000:00
> 000d0000-000d3fff : PCI Bus 0000:00
> 000d4000-000d7fff : PCI Bus 0000:00
> 000d8000-000dbfff : PCI Bus 0000:00
> 000dc000-000dffff : PCI Bus 0000:00
> 000f0000-000fffff : System ROM
> 00100000-b9875fff : System RAM
>   02000000-027a9ab7 : Kernel code
>   027a9ab8-02d1e57f : Kernel data
>   02e80000-02fc6fff : Kernel bss
> b9876000-b987cfff : ACPI Non-volatile Storage
> b987d000-ba0e7fff : System RAM
> ba0e8000-ba373fff : reserved
> ba374000-c98dffff : System RAM
> c98e0000-c9af6fff : reserved
> c9af7000-c9e1bfff : System RAM
> c9e1c000-cab1efff : ACPI Non-volatile Storage
> cab1f000-caf58fff : reserved
> caf59000-caffefff : reserved
> cafff000-caffffff : System RAM
> cb000000-cbbfffff : RAM buffer
> cbc00000-cfdfffff : reserved
>   cbe00000-cfdfffff : Graphics Stolen Memory
> cfe00000-feafffff : PCI Bus 0000:00
>   cfe00000-cfffffff : PCI Bus 0000:03
>   d0000000-dfffffff : 0000:00:02.0
>   e0000000-f1ffffff : PCI Bus 0000:01
>     e0000000-efffffff : 0000:01:00.0
>     f0000000-f1ffffff : 0000:01:00.0
>   f2100000-f21fffff : PCI Bus 0000:05
>     f2100000-f2103fff : 0000:05:00.0
>       f2100000-f2103fff : r8169
>   f2200000-f23fffff : PCI Bus 0000:03
>   f2400000-f25fffff : PCI Bus 0000:02
>   f2600000-f27fffff : PCI Bus 0000:02
>   f2800000-f29fffff : PCI Bus 0000:04
>   f6000000-f70fffff : PCI Bus 0000:01
>     f6000000-f6ffffff : 0000:01:00.0
>     f7000000-f707ffff : 0000:01:00.0
>   f7400000-f77fffff : 0000:00:02.0
>   f7800000-f78fffff : PCI Bus 0000:05
>     f7800000-f7800fff : 0000:05:00.0
>       f7800000-f7800fff : r8169
>   f7900000-f79fffff : PCI Bus 0000:04
>     f7900000-f7901fff : 0000:04:00.0
>       f7900000-f7901fff : iwlwifi
>   f7a00000-f7a0ffff : 0000:00:14.0
>     f7a00000-f7a0ffff : xhci_hcd
>   f7a10000-f7a13fff : 0000:00:1b.0
>     f7a10000-f7a13fff : ICH HD audio
>   f7a14000-f7a17fff : 0000:00:03.0
>     f7a14000-f7a17fff : ICH HD audio
>   f7a19000-f7a190ff : 0000:00:1f.3
>   f7a1a000-f7a1a7ff : 0000:00:1f.2
>     f7a1a000-f7a1a7ff : ahci
>   f7a1b000-f7a1b3ff : 0000:00:1d.0
>     f7a1b000-f7a1b3ff : ehci_hcd
>   f7a1c000-f7a1c3ff : 0000:00:1a.0
>     f7a1c000-f7a1c3ff : ehci_hcd
>   f7a1e000-f7a1e00f : 0000:00:16.0
>     f7a1e000-f7a1e00f : mei_me
>   f7fdf000-f7fdffff : pnp 00:08
>   f7fe0000-f7feffff : pnp 00:08
>   f8000000-fbffffff : PCI MMCONFIG 0000 [bus 00-3f]
>     f8000000-fbffffff : reserved
>       f8000000-fbffffff : pnp 00:08
> fec00000-fec00fff : reserved
>   fec00000-fec003ff : IOAPIC 0
> fed00000-fed03fff : reserved
>   fed00000-fed003ff : HPET 0
>     fed00000-fed003ff : PNP0103:00
> fed10000-fed17fff : pnp 00:08
> fed18000-fed18fff : pnp 00:08
> fed19000-fed19fff : pnp 00:08
> fed1c000-fed1ffff : reserved
>   fed1c000-fed1ffff : pnp 00:08
>     fed1f410-fed1f414 : iTCO_wdt
> fed20000-fed3ffff : pnp 00:08
> fed40000-fed44fff : pnp 00:00
> fed45000-fed8ffff : pnp 00:08
> fed90000-fed90fff : dmar0
> fed91000-fed91fff : dmar1
> fee00000-fee00fff : Local APIC
>   fee00000-fee00fff : reserved
> ff000000-ffffffff : reserved
>   ff000000-ffffffff : INT0800:00
>     ff000000-ffffffff : pnp 00:08
> 100000000-42f1fffff : System RAM
> 42f200000-42fffffff : RAM buffer
>
>
> [7.5]
> 00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core
> Processor DRAM Controller (rev 06)
> Subsystem: ASUSTeK Computer Inc. Device 11cd
> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx-
> Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort+ >SERR- <PERR- INTx-
> Latency: 0
> Capabilities: [e0] Vendor Specific Information: Len=0c <?>
>
> 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core
> Processor PCI Express x16 Controller (rev 06) (prog-if 00 [Normal
> decode])
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx+
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0, Cache Line Size: 64 bytes
> Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
> I/O behind bridge: 0000e000-0000efff
> Memory behind bridge: f6000000-f70fffff
> Prefetchable memory behind bridge: 00000000e0000000-00000000f1ffffff
> Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- <SERR- <PERR-
> BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
> PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
> Capabilities: [88] Subsystem: ASUSTeK Computer Inc. Device 11cd
> Capabilities: [80] Power Management version 3
> Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
> Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
> Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
> Address: fee002d8  Data: 0000
> Capabilities: [a0] Express (v2) Root Port (Slot+), MSI 00
> DevCap: MaxPayload 256 bytes, PhantFunc 0
> ExtTag- RBE+
> DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
> RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
> MaxPayload 256 bytes, MaxReadReq 128 bytes
> DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
> LnkCap: Port #2, Speed 8GT/s, Width x16, ASPM L0s L1, Exit Latency L0s
> <256ns, L1 <8us
> ClockPM- Surprise- LLActRep- BwNot+
> LnkCtl: ASPM Disabled; RCB 64 bytes Disabled+ CommClk+
> ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> LnkSta: Speed 8GT/s, Width x16, TrErr- Train- SlotClk+ DLActive-
> BWMgmt+ ABWMgmt+
> SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
> Slot #1, PowerLimit 75.000W; Interlock- NoCompl+
> SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
> Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
> SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
> Changed: MRL- PresDet+ LinkState-
> RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible-
> RootCap: CRSVisible-
> RootSta: PME ReqID 0000, PMEStatus- PMEPending-
> DevCap2: Completion Timeout: Not Supported, TimeoutDis-, LTR+, OBFF
> Via WAKE# ARIFwd-
> DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Via
> WAKE# ARIFwd-
> LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
> Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
> Compliance De-emphasis: -6dB
> LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete+,
> EqualizationPhase1+
> EqualizationPhase2+, EqualizationPhase3+, LinkEqualizationRequest-
> Capabilities: [100 v1] Virtual Channel
> Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
> Arb: Fixed- WRR32- WRR64- WRR128-
> Ctrl: ArbSelect=Fixed
> Status: InProgress-
> VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
> Arb: Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-
> Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
> Status: NegoPending+ InProgress-
> Capabilities: [140 v1] Root Complex Link
> Desc: PortNumber=02 ComponentID=01 EltType=Config
> Link0: Desc: TargetPort=00 TargetComponent=01 AssocRCRB-
> LinkType=MemMapped LinkValid+
> Addr: 00000000fed19000
> Capabilities: [d94 v1] #19
> Kernel driver in use: pcieport
>
> 00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core
> Processor Integrated Graphics Controller (rev 06) (prog-if 00 [VGA
> controller])
> Subsystem: ASUSTeK Computer Inc. Device 11cd
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx+
> Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0
> Interrupt: pin A routed to IRQ 34
> Region 0: Memory at f7400000 (64-bit, non-prefetchable) [size=4M]
> Region 2: Memory at d0000000 (64-bit, prefetchable) [size=256M]
> Region 4: I/O ports at f000 [size=64]
> Expansion ROM at <unassigned> [disabled]
> Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
> Address: fee00018  Data: 0000
> Capabilities: [d0] Power Management version 2
> Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
> Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
> Capabilities: [a4] PCI Advanced Features
> AFCap: TP+ FLR+
> AFCtrl: FLR-
> AFStatus: TP-
> Kernel driver in use: i915
>
> 00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core
> Processor HD Audio Controller (rev 06)
> Subsystem: Intel Corporation Device 2010
> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx+
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0, Cache Line Size: 64 bytes
> Interrupt: pin A routed to IRQ 36
> Region 0: Memory at f7a14000 (64-bit, non-prefetchable) [size=16K]
> Capabilities: [50] Power Management version 2
> Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
> Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
> Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit-
> Address: fee00498  Data: 0000
> Capabilities: [70] Express (v1) Root Complex Integrated Endpoint, MSI 00
> DevCap: MaxPayload 128 bytes, PhantFunc 0
> ExtTag- RBE-
> DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
> RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
> MaxPayload 128 bytes, MaxReadReq 128 bytes
> DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
> Kernel driver in use: snd_hda_intel
>
> 00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset
> Family USB xHCI (rev 05) (prog-if 30 [XHCI])
> Subsystem: ASUSTeK Computer Inc. Device 11cd
> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx+
> Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0
> Interrupt: pin A routed to IRQ 31
> Region 0: Memory at f7a00000 (64-bit, non-prefetchable) [size=64K]
> Capabilities: [70] Power Management version 2
> Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
> Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
> Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
> Address: 00000000fee003f8  Data: 0000
> Kernel driver in use: xhci_hcd
>
> 00:16.0 Communication controller: Intel Corporation 8 Series/C220
> Series Chipset Family MEI Controller #1 (rev 04)
> Subsystem: ASUSTeK Computer Inc. Device 11cd
> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx+
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0
> Interrupt: pin A routed to IRQ 35
> Region 0: Memory at f7a1e000 (64-bit, non-prefetchable) [size=16]
> Capabilities: [50] Power Management version 3
> Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
> Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
> Capabilities: [8c] MSI: Enable+ Count=1/1 Maskable- 64bit+
> Address: 00000000fee00478  Data: 0000
> Kernel driver in use: mei_me
>
> 00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset
> Family USB EHCI #2 (rev 05) (prog-if 20 [EHCI])
> Subsystem: ASUSTeK Computer Inc. Device 11cd
> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx-
> Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0
> Interrupt: pin A routed to IRQ 16
> Region 0: Memory at f7a1c000 (32-bit, non-prefetchable) [size=1K]
> Capabilities: [50] Power Management version 2
> Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
> Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
> Capabilities: [58] Debug port: BAR=1 offset=00a0
> Capabilities: [98] PCI Advanced Features
> AFCap: TP+ FLR+
> AFCtrl: FLR-
> AFStatus: TP-
> Kernel driver in use: ehci-pci
>
> 00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset
> High Definition Audio Controller (rev 05)
> Subsystem: ASUSTeK Computer Inc. Device 11cd
> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx+
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0, Cache Line Size: 64 bytes
> Interrupt: pin A routed to IRQ 37
> Region 0: Memory at f7a10000 (64-bit, non-prefetchable) [size=16K]
> Capabilities: [50] Power Management version 2
> Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
> Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
> Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
> Address: 00000000fee004b8  Data: 0000
> Capabilities: [70] Express (v1) Root Complex Integrated Endpoint, MSI 00
> DevCap: MaxPayload 128 bytes, PhantFunc 0
> ExtTag- RBE-
> DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
> RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
> MaxPayload 128 bytes, MaxReadReq 128 bytes
> DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
> Capabilities: [100 v1] Virtual Channel
> Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
> Arb: Fixed- WRR32- WRR64- WRR128-
> Ctrl: ArbSelect=Fixed
> Status: InProgress-
> VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
> Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
> Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=01
> Status: NegoPending- InProgress-
> VC1: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
> Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
> Ctrl: Enable+ ID=2 ArbSelect=Fixed TC/VC=04
> Status: NegoPending- InProgress-
> Kernel driver in use: snd_hda_intel
>
> 00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset
> Family PCI Express Root Port #1 (rev d5) (prog-if 00 [Normal decode])
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx+
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0, Cache Line Size: 64 bytes
> Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
> I/O behind bridge: 0000f000-00000fff
> Memory behind bridge: fff00000-000fffff
> Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff
> Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- <SERR- <PERR-
> BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
> PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
> Capabilities: [40] Express (v2) Root Port (Slot-), MSI 00
> DevCap: MaxPayload 128 bytes, PhantFunc 0
> ExtTag- RBE+
> DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
> RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
> MaxPayload 128 bytes, MaxReadReq 128 bytes
> DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
> LnkCap: Port #1, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s
> <1us, L1 <4us
> ClockPM- Surprise- LLActRep+ BwNot+
> LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- CommClk-
> ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> LnkSta: Speed 2.5GT/s, Width x0, TrErr- Train- SlotClk+ DLActive-
> BWMgmt- ABWMgmt-
> RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible-
> RootCap: CRSVisible-
> RootSta: PME ReqID 0000, PMEStatus- PMEPending-
> DevCap2: Completion Timeout: Range ABC, TimeoutDis+, LTR+, OBFF Via
> WAKE# ARIFwd-
> DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF
> Disabled ARIFwd-
> LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
> Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
> Compliance De-emphasis: -6dB
> LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-,
> EqualizationPhase1-
> EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
> Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
> Address: fee002f8  Data: 0000
> Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 11cd
> Capabilities: [a0] Power Management version 3
> Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
> Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
> Kernel driver in use: pcieport
>
> 00:1c.1 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset
> Family PCI Express Root Port #2 (rev d5) (prog-if 00 [Normal decode])
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx+
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0, Cache Line Size: 64 bytes
> Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
> I/O behind bridge: 00002000-00002fff
> Memory behind bridge: cfe00000-cfffffff
> Prefetchable memory behind bridge: 00000000f2200000-00000000f23fffff
> Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- <SERR- <PERR-
> BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
> PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
> Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
> DevCap: MaxPayload 128 bytes, PhantFunc 0
> ExtTag- RBE+
> DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
> RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
> MaxPayload 128 bytes, MaxReadReq 128 bytes
> DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
> LnkCap: Port #2, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s
> <1us, L1 <16us
> ClockPM- Surprise- LLActRep+ BwNot+
> LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- CommClk-
> ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> LnkSta: Speed 2.5GT/s, Width x0, TrErr- Train- SlotClk+ DLActive-
> BWMgmt- ABWMgmt-
> SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
> Slot #1, PowerLimit 10.000W; Interlock- NoCompl+
> SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet+ CmdCplt- HPIrq+ LinkChg+
> Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
> SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
> Changed: MRL- PresDet- LinkState-
> RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible-
> RootCap: CRSVisible-
> RootSta: PME ReqID 0000, PMEStatus- PMEPending-
> DevCap2: Completion Timeout: Range ABC, TimeoutDis+, LTR+, OBFF Not
> Supported ARIFwd-
> DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF
> Disabled ARIFwd-
> LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
> Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
> Compliance De-emphasis: -6dB
> LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-,
> EqualizationPhase1-
> EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
> Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
> Address: fee00338  Data: 0000
> Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 11cd
> Capabilities: [a0] Power Management version 3
> Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
> Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
> Kernel driver in use: pcieport
>
> 00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset
> Family PCI Express Root Port #3 (rev d5) (prog-if 00 [Normal decode])
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx+
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0, Cache Line Size: 64 bytes
> Bus: primary=00, secondary=04, subordinate=04, sec-latency=0
> I/O behind bridge: 0000f000-00000fff
> Memory behind bridge: f7900000-f79fffff
> Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff
> Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- <SERR- <PERR-
> BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
> PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
> Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
> DevCap: MaxPayload 128 bytes, PhantFunc 0
> ExtTag- RBE+
> DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
> RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
> MaxPayload 128 bytes, MaxReadReq 128 bytes
> DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
> LnkCap: Port #3, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s
> <512ns, L1 <16us
> ClockPM- Surprise- LLActRep+ BwNot+
> LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
> ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+
> BWMgmt+ ABWMgmt-
> SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
> Slot #2, PowerLimit 10.000W; Interlock- NoCompl+
> SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
> Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
> SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
> Changed: MRL- PresDet- LinkState+
> RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible-
> RootCap: CRSVisible-
> RootSta: PME ReqID 0000, PMEStatus- PMEPending-
> DevCap2: Completion Timeout: Range ABC, TimeoutDis+, LTR+, OBFF Not
> Supported ARIFwd-
> DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF
> Disabled ARIFwd-
> LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
> Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
> Compliance De-emphasis: -6dB
> LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-,
> EqualizationPhase1-
> EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
> Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
> Address: fee00378  Data: 0000
> Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 11cd
> Capabilities: [a0] Power Management version 3
> Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
> Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
> Kernel driver in use: pcieport
>
> 00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset
> Family PCI Express Root Port #4 (rev d5) (prog-if 00 [Normal decode])
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx+
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0, Cache Line Size: 64 bytes
> Bus: primary=00, secondary=05, subordinate=05, sec-latency=0
> I/O behind bridge: 0000d000-0000dfff
> Memory behind bridge: f7800000-f78fffff
> Prefetchable memory behind bridge: 00000000f2100000-00000000f21fffff
> Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- <SERR- <PERR-
> BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
> PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
> Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
> DevCap: MaxPayload 128 bytes, PhantFunc 0
> ExtTag- RBE+
> DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
> RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
> MaxPayload 128 bytes, MaxReadReq 128 bytes
> DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
> LnkCap: Port #4, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s
> <512ns, L1 <16us
> ClockPM- Surprise- LLActRep+ BwNot+
> LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
> ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+
> BWMgmt+ ABWMgmt-
> SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
> Slot #3, PowerLimit 10.000W; Interlock- NoCompl+
> SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
> Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
> SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
> Changed: MRL- PresDet- LinkState+
> RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible-
> RootCap: CRSVisible-
> RootSta: PME ReqID 0000, PMEStatus- PMEPending-
> DevCap2: Completion Timeout: Range ABC, TimeoutDis+, LTR+, OBFF Not
> Supported ARIFwd-
> DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF
> Disabled ARIFwd-
> LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
> Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
> Compliance De-emphasis: -6dB
> LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-,
> EqualizationPhase1-
> EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
> Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
> Address: fee003b8  Data: 0000
> Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 11cd
> Capabilities: [a0] Power Management version 3
> Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
> Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
> Kernel driver in use: pcieport
>
> 00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset
> Family USB EHCI #1 (rev 05) (prog-if 20 [EHCI])
> Subsystem: ASUSTeK Computer Inc. Device 11cd
> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx-
> Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0
> Interrupt: pin A routed to IRQ 23
> Region 0: Memory at f7a1b000 (32-bit, non-prefetchable) [size=1K]
> Capabilities: [50] Power Management version 2
> Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
> Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
> Capabilities: [58] Debug port: BAR=1 offset=00a0
> Capabilities: [98] PCI Advanced Features
> AFCap: TP+ FLR+
> AFCtrl: FLR-
> AFStatus: TP-
> Kernel driver in use: ehci-pci
>
> 00:1f.0 ISA bridge: Intel Corporation HM86 Express LPC Controller (rev 05)
> Subsystem: ASUSTeK Computer Inc. Device 11cd
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx-
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0
> Capabilities: [e0] Vendor Specific Information: Len=0c <?>
> Kernel driver in use: lpc_ich
>
> 00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series
> Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05) (prog-if
> 01 [AHCI 1.0])
> Subsystem: ASUSTeK Computer Inc. Device 11cd
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx+
> Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0
> Interrupt: pin B routed to IRQ 32
> Region 0: I/O ports at f0b0 [size=8]
> Region 1: I/O ports at f0a0 [size=4]
> Region 2: I/O ports at f090 [size=8]
> Region 3: I/O ports at f080 [size=4]
> Region 4: I/O ports at f060 [size=32]
> Region 5: Memory at f7a1a000 (32-bit, non-prefetchable) [size=2K]
> Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
> Address: fee00418  Data: 0000
> Capabilities: [70] Power Management version 3
> Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
> Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
> Capabilities: [a8] SATA HBA v1.0 BAR4 Offset=00000004
> Kernel driver in use: ahci
>
> 00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family
> SMBus Controller (rev 05)
> Subsystem: ASUSTeK Computer Inc. Device 11cd
> Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx-
> Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Interrupt: pin C routed to IRQ 255
> Region 0: Memory at f7a19000 (64-bit, non-prefetchable) [size=256]
> Region 4: I/O ports at f040 [size=32]
>
> 01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 850M]
> (rev ff) (prog-if ff)
> !!! Unknown header type 7f
>
> 04:00.0 Network controller: Intel Corporation Wireless 7260 (rev 6b)
> Subsystem: Intel Corporation Dual Band Wireless-AC 7260
> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx+
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0, Cache Line Size: 64 bytes
> Interrupt: pin A routed to IRQ 38
> Region 0: Memory at f7900000 (64-bit, non-prefetchable) [size=8K]
> Capabilities: [c8] Power Management version 3
> Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
> Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
> Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
> Address: 00000000fee004d8  Data: 0000
> Capabilities: [40] Express (v2) Endpoint, MSI 00
> DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 unlimited
> ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+
> DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
> RlxdOrd- ExtTag- PhantFunc- AuxPwr+ NoSnoop+ FLReset-
> MaxPayload 128 bytes, MaxReadReq 128 bytes
> DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
> LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency
> L0s <4us, L1 <32us
> ClockPM+ Surprise- LLActRep- BwNot-
> LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
> ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive-
> BWMgmt- ABWMgmt-
> DevCap2: Completion Timeout: Range B, TimeoutDis+, LTR+, OBFF Via WAKE#
> DevCtl2: Completion Timeout: 16ms to 55ms, TimeoutDis-, LTR+, OBFF Disabled
> LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
> Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
> Compliance De-emphasis: -6dB
> LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-,
> EqualizationPhase1-
> EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
> Capabilities: [100 v1] Advanced Error Reporting
> UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF-
> MalfTLP- ECRC- UnsupReq- ACSViol-
> UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF-
> MalfTLP- ECRC- UnsupReq- ACSViol-
> UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+
> MalfTLP+ ECRC- UnsupReq- ACSViol-
> CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
> AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
> Capabilities: [140 v1] Device Serial Number f8-16-54-ff-ff-64-71-d4
> Capabilities: [14c v1] Latency Tolerance Reporting
> Max snoop latency: 71680ns
> Max no snoop latency: 71680ns
> Capabilities: [154 v1] Vendor Specific Information: ID=cafe Rev=1 Len=014 <?>
> Kernel driver in use: iwlwifi
>
> 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
> RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
> Subsystem: ASUSTeK Computer Inc. Device 200f
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx+
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0, Cache Line Size: 64 bytes
> Interrupt: pin A routed to IRQ 33
> Region 0: I/O ports at d000 [size=256]
> Region 2: Memory at f7800000 (64-bit, non-prefetchable) [size=4K]
> Region 4: Memory at f2100000 (64-bit, prefetchable) [size=16K]
> Capabilities: [40] Power Management version 3
> Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
> Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
> Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
> Address: 00000000fee00438  Data: 0000
> Capabilities: [70] Express (v2) Endpoint, MSI 01
> DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
> ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
> DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
> RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
> MaxPayload 128 bytes, MaxReadReq 4096 bytes
> DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
> LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency
> L0s unlimited, L1 <64us
> ClockPM+ Surprise- LLActRep- BwNot-
> LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
> ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive-
> BWMgmt- ABWMgmt-
> DevCap2: Completion Timeout: Range ABCD, TimeoutDis+, LTR+, OBFF Via
> message/WAKE#
> DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF Disabled
> LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
> Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
> Compliance De-emphasis: -6dB
> LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-,
> EqualizationPhase1-
> EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
> Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
> Vector table: BAR=4 offset=00000000
> PBA: BAR=4 offset=00000800
> Capabilities: [d0] Vital Product Data
> Unknown small resource type 00, will not decode more.
> Capabilities: [100 v1] Advanced Error Reporting
> UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF-
> MalfTLP- ECRC- UnsupReq- ACSViol-
> UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF-
> MalfTLP- ECRC- UnsupReq- ACSViol-
> UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+
> MalfTLP+ ECRC- UnsupReq- ACSViol-
> CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
> CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
> AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
> Capabilities: [140 v1] Virtual Channel
> Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
> Arb: Fixed- WRR32- WRR64- WRR128-
> Ctrl: ArbSelect=Fixed
> Status: InProgress-
> VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
> Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
> Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=01
> Status: NegoPending- InProgress-
> Capabilities: [160 v1] Device Serial Number 14-17-43-36-68-4c-e0-00
> Capabilities: [170 v1] Latency Tolerance Reporting
> Max snoop latency: 71680ns
> Max no snoop latency: 71680ns
> Kernel driver in use: r8169
>
>
>
> [7.6]
> Attached devices:
> Host: scsi2 Channel: 00 Id: 00 Lun: 00
>   Vendor: MATSHITA Model: DVD-RAM UJ8E2 S  Rev: 1.00
>   Type:   CD-ROM                           ANSI  SCSI revision: 05
> Host: scsi4 Channel: 00 Id: 00 Lun: 00
>   Vendor: ATA      Model: SanDisk SD6SB1M2 Rev: 600
>   Type:   Direct-Access                    ANSI  SCSI revision: 05
>
>
> [7.7]
> 1     1681  1952  2096  3327  4345  4950  69   acpi         modules
> 10    17    1954  21    3328  4346  4984  7    asound       mounts
> 100   175   1958  2107  3329  4350  5     70   buddyinfo    mtrr
> 1024  176   196   2190  3330  4351  51    702  bus          net
> 1028  178   1963  22    34    4353  511   705  cgroups      pagetypeinfo
> 1034  179   1966  2207  3468  4372  514   708  cmdline      partitions
> 1035  1797  197   23    3476  4384  52    71   consoles     sched_debug
> 1038  18    1973  2339  36    4390  53    72   cpuinfo      schedstat
> 1072  180   1978  24    37    4394  530   724  crypto       scsi
> 1088  1802  1979  241   370   4398  531   725  devices      self
> 11    1808  1981  243   3773  44    54    73   diskstats    slabinfo
> 1111  181   1988  244   38    4402  55    74   dma          softirqs
> 1116  182   1990  245   3808  4406  56    75   driver       stat
> 119   183   1994  2482  384   4422  57    76   execdomains  swaps
> 12    1830  2     2491  3845  4452  579   771  fb           sys
> 120   1832  20    2493  3846  4498  58    78   filesystems  sysrq-trigger
> 1223  1834  2001  25    3847  4511  581   8    fs           sysvipc
> 1245  184   2011  2588  3849  46    585   80   interrupts   thread-self
> 1261  185   2012  2592  386   460   59    81   iomem        timer_list
> 1272  1855  2013  26    387   4605  60    815  ioports      timer_stats
> 1275  186   2026  27    388   461   606   82   irq          tty
> 1289  1865  2030  28    39    4612  61    846  kallsyms     uptime
> 13    1868  2034  280   41    4619  62    882  kcore        version
> 1303  1893  2035  29    4127  4631  63    889  keys         vmallocinfo
> 1319  1897  2037  3     4162  4632  632   9    key-users    vmstat
> 14    19    2038  31    4173  4676  64    927  kmsg         zoneinfo
> 1436  191   2039  3197  42    4690  65    935  kpagecount
> 1438  192   2042  32    422   47    655   94   kpageflags
> 1472  1924  2057  3206  4273  48    66    95   loadavg
> 15    1935  2067  3207  43    4848  67    954  locks
> 16    1938  2071  33    4335  49    672   959  mdstat
> 1632  1946  2077  3323  4342  4945  68    98   meminfo
> 1667  1950  2085  3326  4343  4949  681   99   misc
>
>
> [X.]
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1378547
>
> Hope I did that right and submitted to the right list. First time
> reporting a bug in an upstream kernel. Thanks for all your fantastic
> work making Linux usable for the moderately technical like me!
>
> Bug originator: Carla Rosenfield
> mailto: c.rosenfield@gmail.com
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: ASUS N550JK Touchpad recognized wrongly as PS/2 mouse
From: Hans de Goede @ 2014-10-20 17:56 UTC (permalink / raw)
  To: Benjamin Tissoires, Carla Rosenfield; +Cc: linux-input
In-Reply-To: <CAN+gG=E6c9eK51RxMQU_1tkxk08WtXfpSt7eyiz4fZqOd258OQ@mail.gmail.com>

Hi,

On 10/20/2014 05:38 PM, Benjamin Tissoires wrote:
> Hi Carla,
> 
> just FYI, I have the same laptop model than you, and can reproduce
> your bug report in the same way. I'll work on that to make it working
> properly.
> 
> Hans, (unfortunately,) this laptop has a ETD0105 touchpad from Elan.
> That means that we do not have the X550 touchpad in house, but also
> means that we should be able to get in working faster than the X550
> one :)

Ok, so 2 things:

1) On the ETD0105 touchpad not working, does the kernel you're using
already have this patch ? :

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/input/mouse/elantech.c?id=271329b3c798b2102120f5df829071c211ef00ed

If not, try that, if it does, it may need some tweaks to that patch,
or something similar.

2) On not having an X550 style touchpad, I got a report from a user
in the bugzilla tracking that, telling us that he is busy reverse
engineering the protocol, and is making good progress, so that one
should hopefully get sorted out soon-ish too :)

Regards,

Hans

^ permalink raw reply

* Re: [PATCH] HID: add keyboard input assist hid usages
From: Dmitry Torokhov @ 2014-10-20 18:07 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Olivier Gay, linux-input, Mathieu Meisser
In-Reply-To: <alpine.LNX.2.00.1410201123240.30423@pobox.suse.cz>

Hi Jiri,

On Monday, October 20, 2014 11:28:19 AM Jiri Kosina wrote:
> On Fri, 17 Oct 2014, Dmitry Torokhov wrote:
> > > Add keyboard input assist controls usages from approved
> > > hid usage table request HUTTR42:
> > > http://www.usb.org/developers/hidpage/HUTRR42c.pdf
> > > 
> > > Signed-off-by: Olivier Gay <ogay@logitech.com>
> > > ---
> > > 
> > > Hi all,
> > > 
> > > this patch adds some currently missing hid usages to the
> > > hid system.
> > 
> > Who is going to be using these codes? Do we have userspace consumers?
> 
> As review request #42 has been approved, I don't really have strong
> objections to adding this, as it means certain level of standardization by
> he USB Device Working Group HID Committee.
> 
> Dmitry, given your question, I am not applying the patch yet and waiting
> for your consideration/Ack.

Please merge with my Ack for the new codes - I was not against adding them,
just wanted to make sure they are going to be used instead of just adding them
as placehoders.

Thanks.

-- 
Dmitry

^ permalink raw reply

* Re: [PATCH] HID: add keyboard input assist hid usages
From: Jiri Kosina @ 2014-10-20 19:04 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Olivier Gay, linux-input, Mathieu Meisser
In-Reply-To: <3689204.uK3UlfOp53@dtor-glaptop>

On Mon, 20 Oct 2014, Dmitry Torokhov wrote:

> > As review request #42 has been approved, I don't really have strong
> > objections to adding this, as it means certain level of standardization by
> > he USB Device Working Group HID Committee.
> > 
> > Dmitry, given your question, I am not applying the patch yet and waiting
> > for your consideration/Ack.
> 
> Please merge with my Ack for the new codes - I was not against adding them,
> just wanted to make sure they are going to be used instead of just adding them
> as placehoders.

That was my understanding, but I wanted to be sure.

Thanks everybody, now queued in hid.git#for-3.18/upstream-fixes

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply

* Re: ASUS N550JK Touchpad recognized wrongly as PS/2 mouse
From: Benjamin Tissoires @ 2014-10-20 19:48 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Carla Rosenfield, linux-input
In-Reply-To: <54454CD7.80406@redhat.com>

On Mon, Oct 20, 2014 at 1:56 PM, Hans de Goede <hdegoede@redhat.com> wrote:
> Hi,
>
> On 10/20/2014 05:38 PM, Benjamin Tissoires wrote:
>> Hi Carla,
>>
>> just FYI, I have the same laptop model than you, and can reproduce
>> your bug report in the same way. I'll work on that to make it working
>> properly.
>>
>> Hans, (unfortunately,) this laptop has a ETD0105 touchpad from Elan.
>> That means that we do not have the X550 touchpad in house, but also
>> means that we should be able to get in working faster than the X550
>> one :)
>
> Ok, so 2 things:
>
> 1) On the ETD0105 touchpad not working, does the kernel you're using
> already have this patch ? :
>
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/input/mouse/elantech.c?id=271329b3c798b2102120f5df829071c211ef00ed

I tried the RHEL 6.6 kernel (the only I had on a usb disk handy at that time).
The Fedora 21 snapshot (3.17.0) makes it detected properly :)

However, landing 8 fingers on the touchpad makes it completely lost
(waiting few seconds without touching it is enough to get it back
alive).

>
> If not, try that, if it does, it may need some tweaks to that patch,
> or something similar.
>
> 2) On not having an X550 style touchpad, I got a report from a user
> in the bugzilla tracking that, telling us that he is busy reverse
> engineering the protocol, and is making good progress, so that one
> should hopefully get sorted out soon-ish too :)

I saw that on the bug too. Hopefully, it will work out well.

Cheers,
Benjamin

^ permalink raw reply

* Re: [PATCH] HID: add keyboard input assist hid usages
From: Olivier Gay @ 2014-10-20 21:30 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Dmitry Torokhov, linux-input, Mathieu Meisser
In-Reply-To: <alpine.LNX.2.00.1410202104210.24255@pobox.suse.cz>

On Mon, Oct 20, 2014 at 12:04 PM, Jiri Kosina <jkosina@suse.cz> wrote:
> On Mon, 20 Oct 2014, Dmitry Torokhov wrote:
>> Please merge with my Ack for the new codes - I was not against adding them,
>> just wanted to make sure they are going to be used instead of just adding them
>> as placehoders.
>
> That was my understanding, but I wanted to be sure.
>
> Thanks everybody, now queued in hid.git#for-3.18/upstream-fixes

OK, thank you Jiri and Dmitry!

Olivier

^ permalink raw reply

* Re: ASUS N550JK Touchpad recognized wrongly as PS/2 mouse
From: Hans de Goede @ 2014-10-21  6:26 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: Carla Rosenfield, linux-input
In-Reply-To: <CAN+gG=Eeqg-Htr8WmxiCrrwxOztdaqRCTS5f3tFncf+Z69dnRw@mail.gmail.com>

Hi,

On 10/20/2014 09:48 PM, Benjamin Tissoires wrote:
> On Mon, Oct 20, 2014 at 1:56 PM, Hans de Goede <hdegoede@redhat.com> wrote:
>> Hi,
>>
>> On 10/20/2014 05:38 PM, Benjamin Tissoires wrote:
>>> Hi Carla,
>>>
>>> just FYI, I have the same laptop model than you, and can reproduce
>>> your bug report in the same way. I'll work on that to make it working
>>> properly.
>>>
>>> Hans, (unfortunately,) this laptop has a ETD0105 touchpad from Elan.
>>> That means that we do not have the X550 touchpad in house, but also
>>> means that we should be able to get in working faster than the X550
>>> one :)
>>
>> Ok, so 2 things:
>>
>> 1) On the ETD0105 touchpad not working, does the kernel you're using
>> already have this patch ? :
>>
>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/input/mouse/elantech.c?id=271329b3c798b2102120f5df829071c211ef00ed
> 
> I tried the RHEL 6.6 kernel (the only I had on a usb disk handy at that time).
> The Fedora 21 snapshot (3.17.0) makes it detected properly :)

Good.

> However, landing 8 fingers on the touchpad makes it completely lost
> (waiting few seconds without touching it is enough to get it back
> alive).

Hmm, might be a firmware bug, but this also might mean it can detect
more fingers then previous versions, and sends a new packet type when
more then X fingers are present, we should probably end a mail to
our contacts at elantech about this. Since you've the hardware I
assume you will be sending such a mail ?

Regards,

Hans

^ permalink raw reply

* [PATCH v2 0/4] input: Add new sun4i-lradc-keys driver
From: Hans de Goede @ 2014-10-21  8:24 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Maxime Ripard, linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

Hi All,

After a bit of a pause due to -ENOTIME, here is my 2nd attempt at getting
support for the lradc attached tablet keys found one some Allwinner boards
upstream.

I've dubbed this v2 even though there has been more then one version before
because I've lost count, and as said this represents the 2nd attempt at getting
this upstream.

The major change from the previous attempt is that now the devicetree
description has one subnode per key just like gpio-keys has.

I hope this version is to everyones liking and can be merged soon :) The intend
is for the actual driver to go upstream through Dmitry's tree, where as the
3 dts patches should go upstream through Maxime's tree.

Thanks & Regards,

Hans

^ permalink raw reply

* [PATCH v2 1/4] input: Add new sun4i-lradc-keys driver
From: Hans de Goede @ 2014-10-21  8:24 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Maxime Ripard, linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede
In-Reply-To: <1413879890-7254-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Allwinnner sunxi SoCs have a low resolution adc (called lradc) which is
specifically designed to have various (tablet) keys (ie home, back, search,
etc). attached to it using a resistor network. This adds a driver for this.

There are 2 channels, currently this driver only supports chan0 since there
are no boards known to use chan1.

This has been tested on an olimex a10s-olinuxino-micro, a13-olinuxino, and
a20-olinuxino-micro.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
--
Changes in v2:
-Change devicetree bindings to use a per key subnode, like gpio-keys does
---
 .../devicetree/bindings/input/sun4i-lradc-keys.txt |  57 +++++
 MAINTAINERS                                        |   7 +
 drivers/input/keyboard/Kconfig                     |  10 +
 drivers/input/keyboard/Makefile                    |   1 +
 drivers/input/keyboard/sun4i-lradc-keys.c          | 259 +++++++++++++++++++++
 5 files changed, 334 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
 create mode 100644 drivers/input/keyboard/sun4i-lradc-keys.c

diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
new file mode 100644
index 0000000..36a141b
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
@@ -0,0 +1,57 @@
+Allwinner sun4i low res adc attached tablet keys
+------------------------------------------------
+
+Required properties:
+ - compatible: "allwinner,sun4i-lradc-keys"
+ - reg: mmio address range of the chip
+ - interrupts: interrupt to which the chip is connected
+ - vref-supply: powersupply for the lradc reference voltage
+
+Each key is represented as a sub-node of "allwinner,sun4i-lradc-keys":
+
+Required subnode-properties:
+	- label: Descriptive name of the key.
+	- linux,code: Keycode to emit.
+	- channel: Channel this key is attached to, mut be 0 or 1.
+	- voltage: Voltage in µV at lradc input when this key is pressed.
+
+Example:
+
+#include <dt-bindings/input/input.h>
+
+	lradc: lradc@01c22800 {
+		compatible = "allwinner,sun4i-lradc-keys";
+		reg = <0x01c22800 0x100>;
+		interrupts = <31>;
+		vref-supply = <&reg_vcc3v0>;
+		button@19 {
+			label = "Volume Up";
+			linux,code = <KEY_VOLUMEUP>;
+			channel = <0>;
+			voltage = <191274>;
+		};
+		button@39 {
+			label = "Volume Down";
+			linux,code = <KEY_VOLUMEDOWN>;
+			channel = <0>;
+			voltage = <392644>;
+		};
+		button@60 {
+			label = "Menu";
+			linux,code = <KEY_MENU>;
+			channel = <0>;
+			voltage = <601151>;
+		};
+		button@80 {
+			label = "Enter";
+			linux,code = <KEY_ENTER>;
+			channel = <0>;
+			voltage = <795090>;
+		};
+		button@98 {
+			label = "Home";
+			linux,code = <KEY_HOME>;
+			channel = <0>;
+			voltage = <987387>;
+		};
+	};
diff --git a/MAINTAINERS b/MAINTAINERS
index a20df9b..73d1aef 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8932,6 +8932,13 @@ F:	arch/m68k/sun3*/
 F:	arch/m68k/include/asm/sun3*
 F:	drivers/net/ethernet/i825xx/sun3*
 
+SUN4I LOW RES ADC ATTACHED TABLET KEYS DRIVER
+M:	Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+L:	linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+S:	Maintained
+F:	Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
+F:	drivers/input/keyboard/sun4i-lradc-keys.c
+
 SUNDANCE NETWORK DRIVER
 M:	Denis Kirjanov <kda-u1c8ncikuMvVAZt0uhVF+Ni2O/JbrIOy@public.gmane.org>
 L:	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index a3958c6..2d11b44 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -567,6 +567,16 @@ config KEYBOARD_STMPE
 	  To compile this driver as a module, choose M here: the module will be
 	  called stmpe-keypad.
 
+config KEYBOARD_SUN4I_LRADC
+	tristate "Allwinner sun4i low res adc attached tablet keys support"
+	depends on ARCH_SUNXI
+	help
+	  This selects support for the Allwinner low res adc attached tablet
+	  keys found on Allwinner sunxi SoCs.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called sun4i-lradc-keys.
+
 config KEYBOARD_DAVINCI
 	tristate "TI DaVinci Key Scan"
 	depends on ARCH_DAVINCI_DM365
diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile
index 0a33456..a35269a 100644
--- a/drivers/input/keyboard/Makefile
+++ b/drivers/input/keyboard/Makefile
@@ -53,6 +53,7 @@ obj-$(CONFIG_KEYBOARD_SPEAR)		+= spear-keyboard.o
 obj-$(CONFIG_KEYBOARD_STMPE)		+= stmpe-keypad.o
 obj-$(CONFIG_KEYBOARD_STOWAWAY)		+= stowaway.o
 obj-$(CONFIG_KEYBOARD_ST_KEYSCAN)	+= st-keyscan.o
+obj-$(CONFIG_KEYBOARD_SUN4I_LRADC)	+= sun4i-lradc-keys.o
 obj-$(CONFIG_KEYBOARD_SUNKBD)		+= sunkbd.o
 obj-$(CONFIG_KEYBOARD_TC3589X)		+= tc3589x-keypad.o
 obj-$(CONFIG_KEYBOARD_TEGRA)		+= tegra-kbc.o
diff --git a/drivers/input/keyboard/sun4i-lradc-keys.c b/drivers/input/keyboard/sun4i-lradc-keys.c
new file mode 100644
index 0000000..63a1aff
--- /dev/null
+++ b/drivers/input/keyboard/sun4i-lradc-keys.c
@@ -0,0 +1,259 @@
+/*
+ * Allwinner sun4i low res adc attached tablet keys driver
+ *
+ * Copyright (C) 2014 Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+/*
+ * Allwinnner sunxi SoCs have a lradc which is specifically designed to have
+ * various (tablet) keys (ie home, back, search, etc). attached to it using
+ * a resistor network. This driver is for the keys on such boards.
+ *
+ * There are 2 channels, currently this driver only supports channel 0 since
+ * there are no boards known to use channel 1.
+ */
+
+#include <linux/err.h>
+#include <linux/init.h>
+#include <linux/input.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of_platform.h>
+#include <linux/platform_device.h>
+#include <linux/regulator/consumer.h>
+#include <linux/slab.h>
+
+#define LRADC_CTRL		0x00
+#define LRADC_INTC		0x04
+#define LRADC_INTS		0x08
+#define LRADC_DATA0		0x0c
+#define LRADC_DATA1		0x10
+
+/* LRADC_CTRL bits */
+#define FIRST_CONVERT_DLY(x)	((x) << 24) /* 8 bits */
+#define CHAN_SELECT(x)		((x) << 22) /* 2 bits */
+#define CONTINUE_TIME_SEL(x)	((x) << 16) /* 4 bits */
+#define KEY_MODE_SEL(x)		((x) << 12) /* 2 bits */
+#define LEVELA_B_CNT(x)		((x) << 8)  /* 4 bits */
+#define HOLD_EN(x)		((x) << 6)
+#define LEVELB_VOL(x)		((x) << 4)  /* 2 bits */
+#define SAMPLE_RATE(x)		((x) << 2)  /* 2 bits */
+#define ENABLE(x)		((x) << 0)
+
+/* LRADC_INTC and LRADC_INTS bits */
+#define CHAN1_KEYUP_IRQ		BIT(12)
+#define CHAN1_ALRDY_HOLD_IRQ	BIT(11)
+#define CHAN1_HOLD_IRQ		BIT(10)
+#define	CHAN1_KEYDOWN_IRQ	BIT(9)
+#define CHAN1_DATA_IRQ		BIT(8)
+#define CHAN0_KEYUP_IRQ		BIT(4)
+#define CHAN0_ALRDY_HOLD_IRQ	BIT(3)
+#define CHAN0_HOLD_IRQ		BIT(2)
+#define	CHAN0_KEYDOWN_IRQ	BIT(1)
+#define CHAN0_DATA_IRQ		BIT(0)
+
+struct sun4i_lradc_keymap {
+	u32 voltage;
+	u32 keycode;
+};
+
+struct sun4i_lradc_data {
+	struct device *dev;
+	struct input_dev *input;
+	void __iomem *base;
+	struct regulator *vref_supply;
+	struct sun4i_lradc_keymap *chan0_map;
+	u32 chan0_map_count;
+	u32 chan0_keycode;
+	u32 vref;
+};
+
+static irqreturn_t sun4i_lradc_irq(int irq, void *dev_id)
+{
+	struct sun4i_lradc_data *lradc = dev_id;
+	u32 i, ints, val, voltage, diff, keycode = 0, closest = 0xffffffff;
+
+	ints  = readl(lradc->base + LRADC_INTS);
+
+	/*
+	 * lradc supports only one keypress at a time, release does not give
+	 * any info as to which key was released, so we cache the keycode.
+	 */
+	if ((ints & CHAN0_KEYDOWN_IRQ) && lradc->chan0_keycode == 0) {
+		val = readl(lradc->base + LRADC_DATA0) & 0x3f;
+		voltage = val * lradc->vref / 63;
+
+		for (i = 0; i < lradc->chan0_map_count; i++) {
+			diff = abs(lradc->chan0_map[i].voltage - voltage);
+			if (diff < closest) {
+				closest = diff;
+				keycode = lradc->chan0_map[i].keycode;
+			}
+		}
+
+		lradc->chan0_keycode = keycode;
+		input_report_key(lradc->input, lradc->chan0_keycode, 1);
+	}
+
+	if (ints & CHAN0_KEYUP_IRQ) {
+		input_report_key(lradc->input, lradc->chan0_keycode, 0);
+		lradc->chan0_keycode = 0;
+	}
+
+	input_sync(lradc->input);
+
+	writel(ints, lradc->base + LRADC_INTS);
+
+	return IRQ_HANDLED;
+}
+
+static int sun4i_lradc_open(struct input_dev *dev)
+{
+	struct sun4i_lradc_data *lradc = input_get_drvdata(dev);
+	int ret;
+
+	ret = regulator_enable(lradc->vref_supply);
+	if (ret)
+		return ret;
+
+	/* lradc Vref internally is divided by 2/3 */
+	lradc->vref = regulator_get_voltage(lradc->vref_supply) * 2 / 3;
+
+	/*
+	 * Set sample time to 4 ms / 250 Hz. Wait 2 * 4 ms for key to
+	 * stabilize on press, wait (1 + 1) * 4 ms for key release
+	 */
+	writel(FIRST_CONVERT_DLY(2) | LEVELA_B_CNT(1) | HOLD_EN(1) |
+		SAMPLE_RATE(0) | ENABLE(1), lradc->base + LRADC_CTRL);
+
+	writel(CHAN0_KEYUP_IRQ | CHAN0_KEYDOWN_IRQ, lradc->base + LRADC_INTC);
+
+	return 0;
+}
+
+static void sun4i_lradc_close(struct input_dev *dev)
+{
+	struct sun4i_lradc_data *lradc = input_get_drvdata(dev);
+
+	/* Disable lradc, leave other settings unchanged */
+	writel(FIRST_CONVERT_DLY(2) | LEVELA_B_CNT(1) | HOLD_EN(1) |
+		SAMPLE_RATE(2), lradc->base + LRADC_CTRL);
+	writel(0, lradc->base + LRADC_INTC);
+
+	regulator_disable(lradc->vref_supply);
+}
+
+static int sun4i_lradc_probe(struct platform_device *pdev)
+{
+	struct sun4i_lradc_data *lradc;
+	struct device *dev = &pdev->dev;
+	struct device_node *pp, *np = dev->of_node;
+	u32 channel;
+	int i, ret;
+
+	lradc = devm_kzalloc(dev, sizeof(struct sun4i_lradc_data), GFP_KERNEL);
+	if (!lradc)
+		return -ENOMEM;
+
+	lradc->chan0_map_count = of_get_child_count(np);
+	lradc->chan0_map = devm_kmalloc(dev, lradc->chan0_map_count *
+				sizeof(struct sun4i_lradc_keymap), GFP_KERNEL);
+	if (!lradc->chan0_map)
+		return -ENOMEM;
+
+	i = 0;
+	for_each_child_of_node(np, pp) {
+		struct sun4i_lradc_keymap *map = &lradc->chan0_map[i];
+
+		ret = of_property_read_u32(pp, "channel", &channel);
+		if (ret || channel != 0) {
+			dev_err(dev, "%s: Inval channel prop\n", pp->name);
+			return -EINVAL;
+		}
+
+		ret = of_property_read_u32(pp, "voltage", &map->voltage);
+		if (ret) {
+			dev_err(dev, "%s: Inval voltage prop\n", pp->name);
+			return -EINVAL;
+		}
+
+		ret = of_property_read_u32(pp, "linux,code", &map->keycode);
+		if (ret) {
+			dev_err(dev, "%s: Inval linux,code prop\n", pp->name);
+			return -EINVAL;
+		}
+
+		i++;
+	}
+
+	lradc->vref_supply = devm_regulator_get(dev, "vref");
+	if (IS_ERR(lradc->vref_supply))
+		return PTR_ERR(lradc->vref_supply);
+
+	lradc->dev = dev;
+	lradc->input = devm_input_allocate_device(dev);
+	if (!lradc->input)
+		return -ENOMEM;
+
+	lradc->input->name = pdev->name;
+	lradc->input->phys = "sun4i_lradc/input0";
+	lradc->input->open = sun4i_lradc_open;
+	lradc->input->close = sun4i_lradc_close;
+	lradc->input->id.bustype = BUS_HOST;
+	lradc->input->id.vendor = 0x0001;
+	lradc->input->id.product = 0x0001;
+	lradc->input->id.version = 0x0100;
+	lradc->input->evbit[0] =  BIT(EV_SYN) | BIT(EV_KEY);
+	for (i = 0; i < lradc->chan0_map_count; i++)
+		set_bit(lradc->chan0_map[i].keycode, lradc->input->keybit);
+	input_set_drvdata(lradc->input, lradc);
+
+	lradc->base = devm_ioremap_resource(dev,
+			      platform_get_resource(pdev, IORESOURCE_MEM, 0));
+	if (IS_ERR(lradc->base))
+		return PTR_ERR(lradc->base);
+
+	ret = devm_request_irq(dev, platform_get_irq(pdev, 0), sun4i_lradc_irq,
+			       0, "sun4i-lradc-keys", lradc);
+	if (ret)
+		return ret;
+
+	ret = input_register_device(lradc->input);
+	if (ret)
+		return ret;
+
+	platform_set_drvdata(pdev, lradc);
+	return 0;
+}
+
+static const struct of_device_id sun4i_lradc_of_match[] = {
+	{ .compatible = "allwinner,sun4i-lradc-keys", },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, sun4i_lradc_of_match);
+
+static struct platform_driver sun4i_lradc_driver = {
+	.driver = {
+		.owner	= THIS_MODULE,
+		.name	= "sun4i-lradc-keys",
+		.of_match_table = of_match_ptr(sun4i_lradc_of_match),
+	},
+	.probe	= sun4i_lradc_probe,
+};
+
+module_platform_driver(sun4i_lradc_driver);
+
+MODULE_DESCRIPTION("Allwinner sun4i low res adc attached tablet keys driver");
+MODULE_AUTHOR("Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>");
+MODULE_LICENSE("GPL");
-- 
2.1.0

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related

* [PATCH v2 2/4] ARM: dts: sun4i: Add lradc node
From: Hans de Goede @ 2014-10-21  8:24 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Maxime Ripard, linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede
In-Reply-To: <1413879890-7254-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun4i-a10.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index 380f914..49f2200 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -669,6 +669,13 @@
 			status = "disabled";
 		};
 
+		lradc: lradc@01c22800 {
+			compatible = "allwinner,sun4i-lradc-keys";
+			reg = <0x01c22800 0x100>;
+			interrupts = <31>;
+			status = "disabled";
+		};
+
 		sid: eeprom@01c23800 {
 			compatible = "allwinner,sun4i-a10-sid";
 			reg = <0x01c23800 0x10>;
-- 
2.1.0

^ permalink raw reply related

* [PATCH v2 3/4] ARM: dts: sun5i: Add lradc node
From: Hans de Goede @ 2014-10-21  8:24 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Maxime Ripard, linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede
In-Reply-To: <1413879890-7254-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 36 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun5i-a10s.dtsi                |  7 +++++
 arch/arm/boot/dts/sun5i-a13-olinuxino.dts        | 36 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun5i-a13.dtsi                 |  7 +++++
 4 files changed, 86 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
index ea9519d..84df85e 100644
--- a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
+++ b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
@@ -14,6 +14,7 @@
 /dts-v1/;
 /include/ "sun5i-a10s.dtsi"
 /include/ "sunxi-common-regulators.dtsi"
+#include <dt-bindings/input/input.h>
 
 / {
 	model = "Olimex A10s-Olinuxino Micro";
@@ -98,6 +99,41 @@
 			};
 		};
 
+		lradc: lradc@01c22800 {
+			vref-supply = <&reg_vcc3v0>;
+			status = "okay";
+			button@19 {
+				label = "Volume Up";
+				linux,code = <KEY_VOLUMEUP>;
+				channel = <0>;
+				voltage = <191274>;
+			};
+			button@39 {
+				label = "Volume Down";
+				linux,code = <KEY_VOLUMEDOWN>;
+				channel = <0>;
+				voltage = <392644>;
+			};
+			button@60 {
+				label = "Menu";
+				linux,code = <KEY_MENU>;
+				channel = <0>;
+				voltage = <601151>;
+			};
+			button@80 {
+				label = "Enter";
+				linux,code = <KEY_ENTER>;
+				channel = <0>;
+				voltage = <795090>;
+			};
+			button@98 {
+				label = "Home";
+				linux,code = <KEY_HOME>;
+				channel = <0>;
+				voltage = <987387>;
+			};
+		};
+
 		uart0: serial@01c28000 {
 			pinctrl-names = "default";
 			pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
index 531272c..a73cec4 100644
--- a/arch/arm/boot/dts/sun5i-a10s.dtsi
+++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
@@ -520,6 +520,13 @@
 			reg = <0x01c20c90 0x10>;
 		};
 
+		lradc: lradc@01c22800 {
+			compatible = "allwinner,sun4i-lradc-keys";
+			reg = <0x01c22800 0x100>;
+			interrupts = <31>;
+			status = "disabled";
+		};
+
 		sid: eeprom@01c23800 {
 			compatible = "allwinner,sun4i-a10-sid";
 			reg = <0x01c23800 0x10>;
diff --git a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
index 429994e..11ecb36 100644
--- a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
+++ b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
@@ -14,6 +14,7 @@
 /dts-v1/;
 /include/ "sun5i-a13.dtsi"
 /include/ "sunxi-common-regulators.dtsi"
+#include <dt-bindings/input/input.h>
 
 / {
 	model = "Olimex A13-Olinuxino";
@@ -66,6 +67,41 @@
 			};
 		};
 
+		lradc: lradc@01c22800 {
+			vref-supply = <&reg_vcc3v0>;
+			status = "okay";
+			button@19 {
+				label = "Volume Up";
+				linux,code = <KEY_VOLUMEUP>;
+				channel = <0>;
+				voltage = <191274>;
+			};
+			button@39 {
+				label = "Volume Down";
+				linux,code = <KEY_VOLUMEDOWN>;
+				channel = <0>;
+				voltage = <392644>;
+			};
+			button@60 {
+				label = "Menu";
+				linux,code = <KEY_MENU>;
+				channel = <0>;
+				voltage = <601151>;
+			};
+			button@80 {
+				label = "Enter";
+				linux,code = <KEY_ENTER>;
+				channel = <0>;
+				voltage = <795090>;
+			};
+			button@98 {
+				label = "Home";
+				linux,code = <KEY_HOME>;
+				channel = <0>;
+				voltage = <987387>;
+			};
+		};
+
 		uart1: serial@01c28400 {
 			pinctrl-names = "default";
 			pinctrl-0 = <&uart1_pins_b>;
diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index b131068..528d0d6 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -468,6 +468,13 @@
 			reg = <0x01c20c90 0x10>;
 		};
 
+		lradc: lradc@01c22800 {
+			compatible = "allwinner,sun4i-lradc-keys";
+			reg = <0x01c22800 0x100>;
+			interrupts = <31>;
+			status = "disabled";
+		};
+
 		sid: eeprom@01c23800 {
 			compatible = "allwinner,sun4i-a10-sid";
 			reg = <0x01c23800 0x10>;
-- 
2.1.0

^ permalink raw reply related

* [PATCH v2 4/4] ARM: dts: sun7i: Add lradc node
From: Hans de Goede @ 2014-10-21  8:24 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Maxime Ripard, linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede
In-Reply-To: <1413879890-7254-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 48 +++++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20.dtsi                |  7 ++++
 2 files changed, 55 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
index 9d669cdf..85e7194 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
@@ -14,6 +14,7 @@
 /dts-v1/;
 /include/ "sun7i-a20.dtsi"
 /include/ "sunxi-common-regulators.dtsi"
+#include <dt-bindings/input/input.h>
 
 / {
 	model = "Olimex A20-Olinuxino Micro";
@@ -100,6 +101,53 @@
 			};
 		};
 
+		lradc: lradc@01c22800 {
+			vref-supply = <&reg_vcc3v0>;
+			status = "okay";
+			button@19 {
+				label = "Volume Up";
+				linux,code = <KEY_VOLUMEUP>;
+				channel = <0>;
+				voltage = <191274>;
+			};
+			button@39 {
+				label = "Volume Down";
+				linux,code = <KEY_VOLUMEDOWN>;
+				channel = <0>;
+				voltage = <392644>;
+			};
+			button@60 {
+				label = "Menu";
+				linux,code = <KEY_MENU>;
+				channel = <0>;
+				voltage = <601151>;
+			};
+			button@80 {
+				label = "Enter";
+				linux,code = <KEY_SEARCH>;
+				channel = <0>;
+				voltage = <795090>;
+			};
+			button@98 {
+				label = "Home";
+				linux,code = <KEY_HOME>;
+				channel = <0>;
+				voltage = <987387>;
+			};
+			button@118 {
+				label = "Home";
+				linux,code = <KEY_ESC>;
+				channel = <0>;
+				voltage = <1184678>;
+			};
+			button@139 {
+				label = "Home";
+				linux,code = <KEY_ENTER>;
+				channel = <0>;
+				voltage = <1398804>;
+			};
+		};
+
 		uart0: serial@01c28000 {
 			pinctrl-names = "default";
 			pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index f0a75c6..219cd57 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -911,6 +911,13 @@
 			status = "disabled";
 		};
 
+		lradc: lradc@01c22800 {
+			compatible = "allwinner,sun4i-lradc-keys";
+			reg = <0x01c22800 0x100>;
+			interrupts = <0 31 4>;
+			status = "disabled";
+		};
+
 		sid: eeprom@01c23800 {
 			compatible = "allwinner,sun7i-a20-sid";
 			reg = <0x01c23800 0x200>;
-- 
2.1.0

^ permalink raw reply related

* Re: Touch processing on host CPU
From: Pavel Machek @ 2014-10-21 11:01 UTC (permalink / raw)
  To: Nick Dyer
  Cc: Dmitry Torokhov, Greg KH, Jonathan Cameron,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
In-Reply-To: <5440F282.8040306@itdev.co.uk>

Hi!


> I'm trying to find out which subsystem maintainer I should be talking to -
> apologies if I'm addressing the wrong people.
> 
> There is a model for doing touch processing where the touch controller
> becomes a much simpler device which sends out raw acquisitions (over SPI 
> at up to 1Mbps + protocol overheads). All touch processing is then done in
> user space by the host CPU. An example of this is NVIDIA DirectTouch - see:
> http://blogs.nvidia.com/blog/2012/02/24/industry-adopts-nvidia-directtouch/

Would it be possible to do processing in kernel space?

> In the spirit of "upstream first", I'm trying to figure out how to get a
> driver accepted. Obviously it's not an input device in the normal sense. Is
> it acceptable just to send the raw touch data out via a char device?
> Is

Char device would be best option if not.

> there another subsystem which is a good match (eg IIO)? Does the protocol
> (there is ancillary/control data as well) need to be documented?

It really depends. If you have driver for serial port, you don't need
to describe what goes over the serial port. But documentation would be
nice.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply

* Re: Touch processing on host CPU
From: One Thousand Gnomes @ 2014-10-21 12:22 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Nick Dyer, Greg KH, Jonathan Cameron, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <20141017171756.GA22238@dtor-ws>

> If you will have touch processing in a binary blob, you'll also be going
> to ages "Works with Ubuntu 12.04 on x86_32!" (and nothing else), or
> "Android 5.1.2 on Tegra Blah (build 78912KT)" (and nothing else).

As well as not going upstream because there is no way anyone else can
test changes to the code, or support it. Plus of course there are those
awkward questions around derivative work boundaries that it is best the
base kernel keeps well clear of.

If the data format is documented to the point someone can go write their
own touch processor for the bitstream then that really deals with it
anyway. Given the number of these things starting to pop up it would
probably be good if someone did produce an open source processing engine
for touch sensor streams as it shouldn't take long before its better than
all the non-free ones 8).

Given how latency sensitive touch is and the continual data stream I
would be inclined to think that the basic processing might be better in
kernel and then as an input device - providing it can be simple enough to
want to put kernel side.

Otherwise I'd say your bitstream is probably something like ADC data and
belongs in IIO (which should also help people to have one processing
agent for multiple designs of touch, SPI controllers etc)

Alan

^ permalink raw reply

* Re: [PATCH v2 3/4] ARM: dts: sun5i: Add lradc node
From: Dmitry Torokhov @ 2014-10-21 16:21 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Maxime Ripard, linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw
In-Reply-To: <1413879890-7254-4-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Hi Hans,

On Tue, Oct 21, 2014 at 10:24:49AM +0200, Hans de Goede wrote:
> +			button@98 {
> +				label = "Home";
> +				linux,code = <KEY_HOME>;

I do not think you really want KEY_HOME (go to the beginning of the
line) here, KEY_HOMEPAGE or similar would suit better.

> +				channel = <0>;
> +				voltage = <987387>;
> +			};
> +		};

Thanks.

-- 
Dmitry

^ permalink raw reply

* Re: Touch processing on host CPU
From: Nick Dyer @ 2014-10-21 16:47 UTC (permalink / raw)
  To: One Thousand Gnomes, Dmitry Torokhov, Jonathan Cameron
  Cc: Greg KH, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <20141021132229.37a1197c@alan.etchedpixels.co.uk>

On 21/10/14 13:22, One Thousand Gnomes wrote:
>> If you will have touch processing in a binary blob, you'll also be going
>> to ages "Works with Ubuntu 12.04 on x86_32!" (and nothing else), or
>> "Android 5.1.2 on Tegra Blah (build 78912KT)" (and nothing else).
> 
> As well as not going upstream because there is no way anyone else can
> test changes to the code, or support it. Plus of course there are those
> awkward questions around derivative work boundaries that it is best the
> base kernel keeps well clear of.
> 
> If the data format is documented to the point someone can go write their
> own touch processor for the bitstream then that really deals with it
> anyway. Given the number of these things starting to pop up it would
> probably be good if someone did produce an open source processing engine
> for touch sensor streams as it shouldn't take long before its better than
> all the non-free ones 8).

Thank you for this input, I will feed it back.

> Given how latency sensitive touch is and the continual data stream I
> would be inclined to think that the basic processing might be better in
> kernel and then as an input device - providing it can be simple enough to
> want to put kernel side.

I would think that a touch processing algorithm (including aspects such as
noise and false touch suppression, etc) would be too complex to live
in-kernel. Getting decent performance on a particular device requires a lot
of tuning/customisation.

> Otherwise I'd say your bitstream is probably something like ADC data and
> belongs in IIO (which should also help people to have one processing
> agent for multiple designs of touch, SPI controllers etc)

This sounds promising. The only sticking point I can see is that a touch
frontend has many more channels (possibly thousands), which would seem to
impose a lot of overhead when put into the IIO framework. I will certainly
take a closer look at it.

^ permalink raw reply

* Re: [PATCH v2 1/4] input: Add new sun4i-lradc-keys driver
From: Maxime Ripard @ 2014-10-21 17:04 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Dmitry Torokhov, linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw
In-Reply-To: <1413879890-7254-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

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

Hi Hans,

Thanks, a lot for respinning this.

On Tue, Oct 21, 2014 at 10:24:47AM +0200, Hans de Goede wrote:
> Allwinnner sunxi SoCs have a low resolution adc (called lradc) which is
> specifically designed to have various (tablet) keys (ie home, back, search,
> etc). attached to it using a resistor network. This adds a driver for this.
> 
> There are 2 channels, currently this driver only supports chan0 since there
> are no boards known to use chan1.
> 
> This has been tested on an olimex a10s-olinuxino-micro, a13-olinuxino, and
> a20-olinuxino-micro.
> 
> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> --
> Changes in v2:
> -Change devicetree bindings to use a per key subnode, like gpio-keys does
> ---
>  .../devicetree/bindings/input/sun4i-lradc-keys.txt |  57 +++++
>  MAINTAINERS                                        |   7 +
>  drivers/input/keyboard/Kconfig                     |  10 +
>  drivers/input/keyboard/Makefile                    |   1 +
>  drivers/input/keyboard/sun4i-lradc-keys.c          | 259 +++++++++++++++++++++
>  5 files changed, 334 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>  create mode 100644 drivers/input/keyboard/sun4i-lradc-keys.c
> 
> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> new file mode 100644
> index 0000000..36a141b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> @@ -0,0 +1,57 @@
> +Allwinner sun4i low res adc attached tablet keys
> +------------------------------------------------
> +
> +Required properties:
> + - compatible: "allwinner,sun4i-lradc-keys"
> + - reg: mmio address range of the chip
> + - interrupts: interrupt to which the chip is connected
> + - vref-supply: powersupply for the lradc reference voltage
> +
> +Each key is represented as a sub-node of "allwinner,sun4i-lradc-keys":
> +
> +Required subnode-properties:
> +	- label: Descriptive name of the key.
> +	- linux,code: Keycode to emit.
> +	- channel: Channel this key is attached to, mut be 0 or 1.
> +	- voltage: Voltage in µV at lradc input when this key is pressed.
> +
> +Example:
> +
> +#include <dt-bindings/input/input.h>
> +
> +	lradc: lradc@01c22800 {
> +		compatible = "allwinner,sun4i-lradc-keys";

You're still using the old pattern for the compatible here, it should
be allwinner,sun4i-a10-lradc-keys.

> +		reg = <0x01c22800 0x100>;
> +		interrupts = <31>;
> +		vref-supply = <&reg_vcc3v0>;
> +		button@19 {

I guess the node address in centivolts aren't really that common,
maybe in mV instead?

> +			label = "Volume Up";
> +			linux,code = <KEY_VOLUMEUP>;
> +			channel = <0>;
> +			voltage = <191274>;
> +		};

And a newline between the nodes please.

> +		button@39 {
> +			label = "Volume Down";
> +			linux,code = <KEY_VOLUMEDOWN>;
> +			channel = <0>;
> +			voltage = <392644>;
> +		};
> +		button@60 {
> +			label = "Menu";
> +			linux,code = <KEY_MENU>;
> +			channel = <0>;
> +			voltage = <601151>;
> +		};
> +		button@80 {
> +			label = "Enter";
> +			linux,code = <KEY_ENTER>;
> +			channel = <0>;
> +			voltage = <795090>;
> +		};
> +		button@98 {
> +			label = "Home";
> +			linux,code = <KEY_HOME>;
> +			channel = <0>;
> +			voltage = <987387>;
> +		};
> +	};
> diff --git a/MAINTAINERS b/MAINTAINERS
> index a20df9b..73d1aef 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -8932,6 +8932,13 @@ F:	arch/m68k/sun3*/
>  F:	arch/m68k/include/asm/sun3*
>  F:	drivers/net/ethernet/i825xx/sun3*
>  
> +SUN4I LOW RES ADC ATTACHED TABLET KEYS DRIVER
> +M:	Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> +L:	linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> +S:	Maintained
> +F:	Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> +F:	drivers/input/keyboard/sun4i-lradc-keys.c
> +
>  SUNDANCE NETWORK DRIVER
>  M:	Denis Kirjanov <kda-u1c8ncikuMvVAZt0uhVF+Ni2O/JbrIOy@public.gmane.org>
>  L:	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
> index a3958c6..2d11b44 100644
> --- a/drivers/input/keyboard/Kconfig
> +++ b/drivers/input/keyboard/Kconfig
> @@ -567,6 +567,16 @@ config KEYBOARD_STMPE
>  	  To compile this driver as a module, choose M here: the module will be
>  	  called stmpe-keypad.
>  
> +config KEYBOARD_SUN4I_LRADC
> +	tristate "Allwinner sun4i low res adc attached tablet keys support"
> +	depends on ARCH_SUNXI
> +	help
> +	  This selects support for the Allwinner low res adc attached tablet
> +	  keys found on Allwinner sunxi SoCs.
> +
> +	  To compile this driver as a module, choose M here: the
> +	  module will be called sun4i-lradc-keys.
> +
>  config KEYBOARD_DAVINCI
>  	tristate "TI DaVinci Key Scan"
>  	depends on ARCH_DAVINCI_DM365
> diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile
> index 0a33456..a35269a 100644
> --- a/drivers/input/keyboard/Makefile
> +++ b/drivers/input/keyboard/Makefile
> @@ -53,6 +53,7 @@ obj-$(CONFIG_KEYBOARD_SPEAR)		+= spear-keyboard.o
>  obj-$(CONFIG_KEYBOARD_STMPE)		+= stmpe-keypad.o
>  obj-$(CONFIG_KEYBOARD_STOWAWAY)		+= stowaway.o
>  obj-$(CONFIG_KEYBOARD_ST_KEYSCAN)	+= st-keyscan.o
> +obj-$(CONFIG_KEYBOARD_SUN4I_LRADC)	+= sun4i-lradc-keys.o
>  obj-$(CONFIG_KEYBOARD_SUNKBD)		+= sunkbd.o
>  obj-$(CONFIG_KEYBOARD_TC3589X)		+= tc3589x-keypad.o
>  obj-$(CONFIG_KEYBOARD_TEGRA)		+= tegra-kbc.o
> diff --git a/drivers/input/keyboard/sun4i-lradc-keys.c b/drivers/input/keyboard/sun4i-lradc-keys.c
> new file mode 100644
> index 0000000..63a1aff
> --- /dev/null
> +++ b/drivers/input/keyboard/sun4i-lradc-keys.c
> @@ -0,0 +1,259 @@
> +/*
> + * Allwinner sun4i low res adc attached tablet keys driver
> + *
> + * Copyright (C) 2014 Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + */
> +
> +/*
> + * Allwinnner sunxi SoCs have a lradc which is specifically designed to have
> + * various (tablet) keys (ie home, back, search, etc). attached to it using
> + * a resistor network. This driver is for the keys on such boards.
> + *
> + * There are 2 channels, currently this driver only supports channel 0 since
> + * there are no boards known to use channel 1.
> + */
> +
> +#include <linux/err.h>
> +#include <linux/init.h>
> +#include <linux/input.h>
> +#include <linux/interrupt.h>
> +#include <linux/io.h>
> +#include <linux/module.h>
> +#include <linux/of_platform.h>
> +#include <linux/platform_device.h>
> +#include <linux/regulator/consumer.h>
> +#include <linux/slab.h>
> +
> +#define LRADC_CTRL		0x00
> +#define LRADC_INTC		0x04
> +#define LRADC_INTS		0x08
> +#define LRADC_DATA0		0x0c
> +#define LRADC_DATA1		0x10
> +
> +/* LRADC_CTRL bits */
> +#define FIRST_CONVERT_DLY(x)	((x) << 24) /* 8 bits */
> +#define CHAN_SELECT(x)		((x) << 22) /* 2 bits */
> +#define CONTINUE_TIME_SEL(x)	((x) << 16) /* 4 bits */
> +#define KEY_MODE_SEL(x)		((x) << 12) /* 2 bits */
> +#define LEVELA_B_CNT(x)		((x) << 8)  /* 4 bits */
> +#define HOLD_EN(x)		((x) << 6)
> +#define LEVELB_VOL(x)		((x) << 4)  /* 2 bits */
> +#define SAMPLE_RATE(x)		((x) << 2)  /* 2 bits */
> +#define ENABLE(x)		((x) << 0)
> +
> +/* LRADC_INTC and LRADC_INTS bits */
> +#define CHAN1_KEYUP_IRQ		BIT(12)
> +#define CHAN1_ALRDY_HOLD_IRQ	BIT(11)
> +#define CHAN1_HOLD_IRQ		BIT(10)
> +#define	CHAN1_KEYDOWN_IRQ	BIT(9)
> +#define CHAN1_DATA_IRQ		BIT(8)
> +#define CHAN0_KEYUP_IRQ		BIT(4)
> +#define CHAN0_ALRDY_HOLD_IRQ	BIT(3)
> +#define CHAN0_HOLD_IRQ		BIT(2)
> +#define	CHAN0_KEYDOWN_IRQ	BIT(1)
> +#define CHAN0_DATA_IRQ		BIT(0)
> +
> +struct sun4i_lradc_keymap {
> +	u32 voltage;
> +	u32 keycode;
> +};
> +
> +struct sun4i_lradc_data {
> +	struct device *dev;
> +	struct input_dev *input;
> +	void __iomem *base;
> +	struct regulator *vref_supply;
> +	struct sun4i_lradc_keymap *chan0_map;
> +	u32 chan0_map_count;
> +	u32 chan0_keycode;
> +	u32 vref;
> +};
> +
> +static irqreturn_t sun4i_lradc_irq(int irq, void *dev_id)
> +{
> +	struct sun4i_lradc_data *lradc = dev_id;
> +	u32 i, ints, val, voltage, diff, keycode = 0, closest = 0xffffffff;
> +
> +	ints  = readl(lradc->base + LRADC_INTS);
> +
> +	/*
> +	 * lradc supports only one keypress at a time, release does not give
> +	 * any info as to which key was released, so we cache the keycode.
> +	 */
> +	if ((ints & CHAN0_KEYDOWN_IRQ) && lradc->chan0_keycode == 0) {
> +		val = readl(lradc->base + LRADC_DATA0) & 0x3f;
> +		voltage = val * lradc->vref / 63;
> +
> +		for (i = 0; i < lradc->chan0_map_count; i++) {
> +			diff = abs(lradc->chan0_map[i].voltage - voltage);
> +			if (diff < closest) {
> +				closest = diff;
> +				keycode = lradc->chan0_map[i].keycode;
> +			}
> +		}
> +
> +		lradc->chan0_keycode = keycode;
> +		input_report_key(lradc->input, lradc->chan0_keycode, 1);
> +	}
> +
> +	if (ints & CHAN0_KEYUP_IRQ) {
> +		input_report_key(lradc->input, lradc->chan0_keycode, 0);
> +		lradc->chan0_keycode = 0;
> +	}
> +
> +	input_sync(lradc->input);
> +
> +	writel(ints, lradc->base + LRADC_INTS);
> +
> +	return IRQ_HANDLED;
> +}
> +
> +static int sun4i_lradc_open(struct input_dev *dev)
> +{
> +	struct sun4i_lradc_data *lradc = input_get_drvdata(dev);
> +	int ret;
> +
> +	ret = regulator_enable(lradc->vref_supply);
> +	if (ret)
> +		return ret;
> +
> +	/* lradc Vref internally is divided by 2/3 */
> +	lradc->vref = regulator_get_voltage(lradc->vref_supply) * 2 / 3;
> +
> +	/*
> +	 * Set sample time to 4 ms / 250 Hz. Wait 2 * 4 ms for key to
> +	 * stabilize on press, wait (1 + 1) * 4 ms for key release
> +	 */
> +	writel(FIRST_CONVERT_DLY(2) | LEVELA_B_CNT(1) | HOLD_EN(1) |
> +		SAMPLE_RATE(0) | ENABLE(1), lradc->base + LRADC_CTRL);
> +
> +	writel(CHAN0_KEYUP_IRQ | CHAN0_KEYDOWN_IRQ, lradc->base + LRADC_INTC);
> +
> +	return 0;
> +}
> +
> +static void sun4i_lradc_close(struct input_dev *dev)
> +{
> +	struct sun4i_lradc_data *lradc = input_get_drvdata(dev);
> +
> +	/* Disable lradc, leave other settings unchanged */
> +	writel(FIRST_CONVERT_DLY(2) | LEVELA_B_CNT(1) | HOLD_EN(1) |
> +		SAMPLE_RATE(2), lradc->base + LRADC_CTRL);
> +	writel(0, lradc->base + LRADC_INTC);
> +
> +	regulator_disable(lradc->vref_supply);
> +}
> +
> +static int sun4i_lradc_probe(struct platform_device *pdev)
> +{
> +	struct sun4i_lradc_data *lradc;
> +	struct device *dev = &pdev->dev;
> +	struct device_node *pp, *np = dev->of_node;
> +	u32 channel;
> +	int i, ret;
> +
> +	lradc = devm_kzalloc(dev, sizeof(struct sun4i_lradc_data), GFP_KERNEL);
> +	if (!lradc)
> +		return -ENOMEM;
> +
> +	lradc->chan0_map_count = of_get_child_count(np);
> +	lradc->chan0_map = devm_kmalloc(dev, lradc->chan0_map_count *
> +				sizeof(struct sun4i_lradc_keymap), GFP_KERNEL);
> +	if (!lradc->chan0_map)
> +		return -ENOMEM;
> +
> +	i = 0;
> +	for_each_child_of_node(np, pp) {
> +		struct sun4i_lradc_keymap *map = &lradc->chan0_map[i];
> +
> +		ret = of_property_read_u32(pp, "channel", &channel);
> +		if (ret || channel != 0) {
> +			dev_err(dev, "%s: Inval channel prop\n", pp->name);
> +			return -EINVAL;
> +		}
> +
> +		ret = of_property_read_u32(pp, "voltage", &map->voltage);
> +		if (ret) {
> +			dev_err(dev, "%s: Inval voltage prop\n", pp->name);
> +			return -EINVAL;
> +		}
> +
> +		ret = of_property_read_u32(pp, "linux,code", &map->keycode);
> +		if (ret) {
> +			dev_err(dev, "%s: Inval linux,code prop\n", pp->name);
> +			return -EINVAL;
> +		}
> +
> +		i++;
> +	}
> +
> +	lradc->vref_supply = devm_regulator_get(dev, "vref");
> +	if (IS_ERR(lradc->vref_supply))
> +		return PTR_ERR(lradc->vref_supply);
> +
> +	lradc->dev = dev;
> +	lradc->input = devm_input_allocate_device(dev);
> +	if (!lradc->input)
> +		return -ENOMEM;
> +
> +	lradc->input->name = pdev->name;
> +	lradc->input->phys = "sun4i_lradc/input0";
> +	lradc->input->open = sun4i_lradc_open;
> +	lradc->input->close = sun4i_lradc_close;
> +	lradc->input->id.bustype = BUS_HOST;
> +	lradc->input->id.vendor = 0x0001;
> +	lradc->input->id.product = 0x0001;
> +	lradc->input->id.version = 0x0100;
> +	lradc->input->evbit[0] =  BIT(EV_SYN) | BIT(EV_KEY);
> +	for (i = 0; i < lradc->chan0_map_count; i++)
> +		set_bit(lradc->chan0_map[i].keycode, lradc->input->keybit);
> +	input_set_drvdata(lradc->input, lradc);
> +
> +	lradc->base = devm_ioremap_resource(dev,
> +			      platform_get_resource(pdev, IORESOURCE_MEM, 0));
> +	if (IS_ERR(lradc->base))
> +		return PTR_ERR(lradc->base);
> +
> +	ret = devm_request_irq(dev, platform_get_irq(pdev, 0), sun4i_lradc_irq,
> +			       0, "sun4i-lradc-keys", lradc);
> +	if (ret)
> +		return ret;
> +
> +	ret = input_register_device(lradc->input);
> +	if (ret)
> +		return ret;
> +
> +	platform_set_drvdata(pdev, lradc);
> +	return 0;
> +}
> +
> +static const struct of_device_id sun4i_lradc_of_match[] = {
> +	{ .compatible = "allwinner,sun4i-lradc-keys", },
> +	{ /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(of, sun4i_lradc_of_match);
> +
> +static struct platform_driver sun4i_lradc_driver = {
> +	.driver = {
> +		.owner	= THIS_MODULE,

You can drop the owner field, it's already filled by
module_platform_driver.

> +		.name	= "sun4i-lradc-keys",
> +		.of_match_table = of_match_ptr(sun4i_lradc_of_match),
> +	},
> +	.probe	= sun4i_lradc_probe,
> +};
> +
> +module_platform_driver(sun4i_lradc_driver);
> +
> +MODULE_DESCRIPTION("Allwinner sun4i low res adc attached tablet keys driver");
> +MODULE_AUTHOR("Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>");
> +MODULE_LICENSE("GPL");
> -- 
> 2.1.0
> 

Looking good otherwise, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Plantronics Telephony Device HID Driver
From: Cole, JD @ 2014-10-21 18:40 UTC (permalink / raw)
  To: linux-input@vger.kernel.org
  Cc: Wesselman, Tom, Dsouza, Sunil, Junge, Terry, dtor@chromium.org,
	bleung@chromium.org, vpalatin@chromium.org, adlr@chromium.org

Plantronics telephony devices equipped with HID-enabled controls have been reported to cause odd mouse behaviors when buttons are clicked. This is due to how the hid-input driver handles "unmapped" usages and the fact that Plantronics devices send Vendor Unique usages in addition to standards, e.g. Consumer Page Mute. It is the vendor unique usages that are mis-interpreted by the hid-input driver and mapped as mouse events.

This driver serves to prevent unhandled usages from reaching the hid-input driver. Two patches are included:

(1) The minimal driver
(2) The more complete additions to hid.h Consumer Page MACROS

Cheers,

jd

>From ee603e2aa62906a65b08b440c4b440e324269295 Mon Sep 17 00:00:00 2001
From: JD Cole <jd.cole@plantronics.com>
Date: Fri, 17 Oct 2014 12:21:49 -0700
Subject: [PATCH 1/2] Created base Plantronics HID driver.

A fix for Plantronics telephony device controls interfering with
the mouse.

This version of the driver prevents Telephony pages which are not
mapped as Consumer Control applications AND are not on the Consumer Page
from being registered by the hid-input driver.

BUG=chromium:417434
TEST=Tested with multiple Plantronics devices on 'peppy' Acer C720p.

Change-Id: I7a55880d6082467274b693c48415e9331d9bbd81
Signed-off-by: JD Cole <jd.cole@plantronics.com>
---
 drivers/hid/Kconfig           |  7 ++++
 drivers/hid/Makefile          |  1 +
 drivers/hid/hid-ids.h         |  2 +
 drivers/hid/hid-plantronics.c | 92 +++++++++++++++++++++++++++++++++++++++++++
 include/linux/hid.h           |  3 ++
 5 files changed, 105 insertions(+)
 create mode 100644 drivers/hid/hid-plantronics.c

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 2f38a7b..b245c28 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -594,6 +594,13 @@ config HID_PICOLCD_CIR
        ---help---
          Provide access to PicoLCD's CIR interface via remote control (LIRC).

+config HID_PLANTRONICS
+       tristate "Plantronics USB HID Driver"
+       default !EXPERT
+       depends on HID
+       ---help---
+       Provides HID support for Plantronics telephony devices.
+
 config HID_PRIMAX
        tristate "Primax non-fully HID-compliant devices"
        depends on HID
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
index 6684b30..7080637 100644
--- a/drivers/hid/Makefile
+++ b/drivers/hid/Makefile
@@ -93,6 +93,7 @@ ifdef CONFIG_DEBUG_FS
 hid-picolcd-y                  += hid-picolcd_debugfs.o
 endif

+obj-$(CONFIG_HID_PLANTRONICS)  += hid-plantronics.o
 obj-$(CONFIG_HID_PRIMAX)       += hid-primax.o
 obj-$(CONFIG_HID_QUICKSTEP)    += hid-quickstep.o
 obj-$(CONFIG_HID_ROCCAT)       += hid-roccat.o hid-roccat-common.o \
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 7fd93c3..1c8ede1 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -703,6 +703,8 @@
 #define USB_DEVICE_ID_ORTEK_PKB1700    0x1700
 #define USB_DEVICE_ID_ORTEK_WKB2000    0x2000

+#define USB_VENDOR_ID_PLANTRONICS      0x047f
+
 #define USB_VENDOR_ID_PANASONIC                0x04da
 #define USB_DEVICE_ID_PANABOARD_UBT780 0x1044
 #define USB_DEVICE_ID_PANABOARD_UBT880 0x104d
diff --git a/drivers/hid/hid-plantronics.c b/drivers/hid/hid-plantronics.c
new file mode 100644
index 0000000..c43440a
--- /dev/null
+++ b/drivers/hid/hid-plantronics.c
@@ -0,0 +1,92 @@
+/*
+ *  Plantronics USB HID Driver
+ *
+ *  Copyright (c) 2014 JD Cole <jd.cole@plantronics.com>
+ *  Copyright (c) 2014 Terry Junge <terry.junge@plantronics.com>
+ */
+
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ */
+
+#include "hid-ids.h"
+
+#include <linux/hid.h>
+#include <linux/module.h>
+
+static bool plt_debug;
+module_param_named(debug, plt_debug, bool, 0644);
+MODULE_PARM_DESC(debug, "enables extra debugging info");
+
+static bool plt_passall;
+module_param_named(passall, plt_passall, bool, 0644);
+MODULE_PARM_DESC(passall, "force all usages to be accepted (requires debug=1)");
+
+static int plantronics_input_mapping(struct hid_device *hdev,
+                                    struct hid_input *hi,
+                                    struct hid_field *field,
+                                    struct hid_usage *usage,
+                                    unsigned long **bit, int *max)
+{
+       if ((field->application == HID_CP_CONSUMERCONTROL
+           && ((usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER))
+           || (plt_debug && plt_passall)) {
+               if (plt_debug)
+                       hid_info(hdev, "usage: %08x (appl: %08x) - defaulted\n",
+                                usage->hid, field->application);
+               return 0;
+       }
+
+       if (plt_debug)
+               hid_info(hdev, "usage: %08x (appl: %08x) - ignored\n",
+                        usage->hid, field->application);
+
+       return -1;
+}
+
+static int plantronics_probe(struct hid_device *hdev,
+                            const struct hid_device_id *id)
+{
+       int ret;
+
+       if (plt_debug)
+               hid_info(hdev, "found plantronics device\n");
+
+       ret = hid_parse(hdev);
+       if (ret) {
+               hid_err(hdev, "parse failed\n");
+               goto err;
+       }
+
+       ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
+       if (ret) {
+               hid_err(hdev, "hw start failed\n");
+               goto err;
+       }
+
+       return 0;
+ err:
+       return ret;
+}
+
+static const struct hid_device_id plantronics_devices[] = {
+       { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, HID_ANY_ID) },
+       { }
+};
+MODULE_DEVICE_TABLE(hid, plantronics_devices);
+
+static struct hid_driver plantronics_driver = {
+       .name = "plantronics",
+       .id_table = plantronics_devices,
+       .input_mapping = plantronics_input_mapping,
+       .probe = plantronics_probe,
+};
+module_hid_driver(plantronics_driver);
+
+MODULE_AUTHOR("JD Cole <jd.cole@plantronics.com>");
+MODULE_AUTHOR("Terry Junge <terry.junge@plantronics.com>");
+MODULE_DESCRIPTION("Plantronics USB HID Driver");
+MODULE_LICENSE("GPL");
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 10c9be6..2806146 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -230,6 +230,9 @@ struct hid_item {
 #define HID_DG_BARRELSWITCH    0x000d0044
 #define HID_DG_ERASER          0x000d0045
 #define HID_DG_TABLETPICK      0x000d0046
+
+#define HID_CP_CONSUMERCONTROL 0x000c0001
+
 /*
  * as of May 20, 2009 the usages below are not yet in the official USB spec
  * but are being pushed by Microsft as described in their paper "Digitizer
--
1.8.3.2

>From 6564f0972c5d4e9acba9ebbd8d83cd5a1e95f254 Mon Sep 17 00:00:00 2001
From: JD Cole <jd.cole@plantronics.com>
Date: Fri, 17 Oct 2014 15:52:40 -0700
Subject: [PATCH 2/2] Added missing HID Consumer Page identifiers, for
 completeness.

Adds CA and NAry usage type identifiers.

BUG=chromium:417434
TEST=Tested with multiple Plantronics devices on 'peppy' Acer C720p.

Change-Id: I7a55880d6082467274b693c48415e9331d9bbd81
Signed-off-by: JD Cole <jd.cole@plantronics.com>
---
 include/linux/hid.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/include/linux/hid.h b/include/linux/hid.h
index 2806146..e923f3d 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -232,6 +232,30 @@ struct hid_item {
 #define HID_DG_TABLETPICK      0x000d0046

 #define HID_CP_CONSUMERCONTROL 0x000c0001
+#define HID_CP_NUMERICKEYPAD   0x000c0002
+#define HID_CP_PROGRAMMABLEBUTTONS     0x000c0003
+#define HID_CP_MICROPHONE      0x000c0004
+#define HID_CP_HEADPHONE       0x000c0005
+#define HID_CP_GRAPHICEQUALIZER        0x000c0006
+#define HID_CP_FUNCTIONBUTTONS 0x000c0036
+#define HID_CP_SELECTION       0x000c0080
+#define HID_CP_MEDIASELECTION  0x000c0087
+#define HID_CP_SELECTDISC      0x000c00ba
+#define HID_CP_PLAYBACKSPEED   0x000c00f1
+#define HID_CP_PROXIMITY       0x000c0109
+#define HID_CP_SPEAKERSYSTEM   0x000c0160
+#define HID_CP_CHANNELLEFT     0x000c0161
+#define HID_CP_CHANNELRIGHT    0x000c0162
+#define HID_CP_CHANNELCENTER   0x000c0163
+#define HID_CP_CHANNELFRONT    0x000c0164
+#define HID_CP_CHANNELCENTERFRONT      0x000c0165
+#define HID_CP_CHANNELSIDE     0x000c0166
+#define HID_CP_CHANNELSURROUND 0x000c0167
+#define HID_CP_CHANNELLOWFREQUENCYENHANCEMENT  0x000c0168
+#define HID_CP_CHANNELTOP      0x000c0169
+#define HID_CP_CHANNELUNKNOWN  0x000c016a
+#define HID_CP_APPLICATIONLAUNCHBUTTONS        0x000c0180
+#define HID_CP_GENERICGUIAPPLICATIONCONTROLS   0x000c0200

 /*
  * as of May 20, 2009 the usages below are not yet in the official USB spec
--
1.8.3.2



________________________________

CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, files or previous e-mail messages attached to it, may contain information that is confidential and/or legally privileged. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, please DO NOT disclose the contents to another person, store or copy the information in any medium, or use any of the information contained in or attached to this transmission for any purpose. If you have received this transmission in error, please immediately notify the sender by reply email or at privacy@plantronics.com, and destroy the original transmission and its attachments without reading or saving in any manner.

For further information about Plantronics - the Company, its products, brands, partners, please visit our website www.plantronics.com.

^ permalink raw reply related

* Re: [PATCH v2 3/4] ARM: dts: sun5i: Add lradc node
From: Hans de Goede @ 2014-10-21 20:29 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Maxime Ripard, linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw
In-Reply-To: <20141021162159.GC8609@dtor-ws>

Hi,

On 10/21/2014 06:21 PM, Dmitry Torokhov wrote:
> Hi Hans,
>
> On Tue, Oct 21, 2014 at 10:24:49AM +0200, Hans de Goede wrote:
>> +			button@98 {
>> +				label = "Home";
>> +				linux,code = <KEY_HOME>;
>
> I do not think you really want KEY_HOME (go to the beginning of the
> line) here, KEY_HOMEPAGE or similar would suit better.

I can understand where you're coming from, but KEY_HOME is what these
keys typically send under android, and what android expects them to
send...

Not sure if that is a good argument to keep it as KEY_HOME though.

Please let me know which way you want this key to be mapped, and
I'll update it for the next version.

Regards,

Hans

^ 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