Linux Input/HID development
 help / color / mirror / Atom feed
* Re: [PATCH v5 2/4] resource: Use list_head to link sibling resource
From: kbuild test robot @ 2018-06-12  4:37 UTC (permalink / raw)
  Cc: nicolas.pitre-QSEj5FYQhm4dnm+yROfE0A, brijesh.singh-5C7GfCeVMHo,
	thomas.lendacky-5C7GfCeVMHo, airlied-cv59FeDIM0c,
	linux-pci-u79uwXL29TY76Z2rM5mHXA,
	richard.weiyang-Re5JQEeQqe8AvxtiuMwx3w,
	keith.busch-ral2JQCrhuEAvxtiuMwx3w,
	jcmvbkbc-Re5JQEeQqe8AvxtiuMwx3w,
	baiyaowei-0p4V/sDNsUmm0O/7XYngnFaTQe2KTcn/,
	frowand.list-Re5JQEeQqe8AvxtiuMwx3w, tglx-hfZtesqFncYOwBW4kG4KsQ,
	lorenzo.pieralisi-5wv7dgnIgG8, sthemmin-0li6OtcxBFHby3iVrkZq2A,
	Baoquan He, linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw,
	patrik.r.jakobsson-Re5JQEeQqe8AvxtiuMwx3w,
	linux-input-u79uwXL29TY76Z2rM5mHXA,
	gustavo-THi1TnShQwVAfugRpC6u6w, bp-l3A5Bk7waGM,
	dyoung-H+wXaHxf7aLQT0dZR+AlfA, ebiederm-aS9lmoZGLiVWk0Htik3J/w,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	haiyangz-0li6OtcxBFHby3iVrkZq2A,
	maarten.lankhorst-VuQAYsv1563Yd54FQh9/CA,
	josh-iaAMLnmF4UmaiuxdJuQwMA, jglisse-H+wXaHxf7aLQT0dZR+AlfA,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, seanpaul-F7+t8E8rja9g9hUCZPvPmw,
	bhelgaas-hpIqsD4AKlfQT0dZR+AlfA, yinghai-DgEjT+Ai2ygdnm+yROfE0A,
	jonathan.derrick-ral2JQCrhuEAvxtiuMwx3w,
	chris-YvXeqwSYzG2sTnJN9+BGXg, monstr-pSz03upnqPeHXe+LvDLADg,
	linux-parisc-u79uwXL29TY76Z2rM5mHXA,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	kexec-IAPFreCvJWMP3drIcvDWNA
In-Reply-To: <20180612032831.29747-3-bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Hi Baoquan,

I love your patch! Yet something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180612-113600
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   kernel/resource.c: In function 'reparent_resources':
>> kernel/resource.c:1005:26: error: passing argument 2 of 'list_add' from incompatible pointer type [-Werror=incompatible-pointer-types]
     list_add(&res->sibling, &p->sibling.prev);
                             ^
   In file included from include/linux/ioport.h:15:0,
                    from kernel/resource.c:14:
   include/linux/list.h:77:20: note: expected 'struct list_head *' but argument is of type 'struct list_head **'
    static inline void list_add(struct list_head *new, struct list_head *head)
                       ^~~~~~~~
   In file included from include/linux/list.h:9:0,
                    from include/linux/ioport.h:15,
                    from kernel/resource.c:14:
>> kernel/resource.c:1013:26: error: 'new' undeclared (first use in this function); did you mean 'net'?
     list_for_each_entry(p, &new->child, sibling) {
                             ^
   include/linux/kernel.h:963:26: note: in definition of macro 'container_of'
     void *__mptr = (void *)(ptr);     \
                             ^~~
   include/linux/list.h:377:2: note: in expansion of macro 'list_entry'
     list_entry((ptr)->next, type, member)
     ^~~~~~~~~~
   include/linux/list.h:464:13: note: in expansion of macro 'list_first_entry'
     for (pos = list_first_entry(head, typeof(*pos), member); \
                ^~~~~~~~~~~~~~~~
   kernel/resource.c:1013:2: note: in expansion of macro 'list_for_each_entry'
     list_for_each_entry(p, &new->child, sibling) {
     ^~~~~~~~~~~~~~~~~~~
   kernel/resource.c:1013:26: note: each undeclared identifier is reported only once for each function it appears in
     list_for_each_entry(p, &new->child, sibling) {
                             ^
   include/linux/kernel.h:963:26: note: in definition of macro 'container_of'
     void *__mptr = (void *)(ptr);     \
                             ^~~
   include/linux/list.h:377:2: note: in expansion of macro 'list_entry'
     list_entry((ptr)->next, type, member)
     ^~~~~~~~~~
   include/linux/list.h:464:13: note: in expansion of macro 'list_first_entry'
     for (pos = list_first_entry(head, typeof(*pos), member); \
                ^~~~~~~~~~~~~~~~
   kernel/resource.c:1013:2: note: in expansion of macro 'list_for_each_entry'
     list_for_each_entry(p, &new->child, sibling) {
     ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/list_add +1005 kernel/resource.c

   983	
   984	/*
   985	 * Reparent resource children of pr that conflict with res
   986	 * under res, and make res replace those children.
   987	 */
   988	int reparent_resources(struct resource *parent, struct resource *res)
   989	{
   990		struct resource *p, *first = NULL;
   991	
   992		list_for_each_entry(p, &parent->child, sibling) {
   993			if (p->end < res->start)
   994				continue;
   995			if (res->end < p->start)
   996				break;
   997			if (p->start < res->start || p->end > res->end)
   998				return -1;	/* not completely contained */
   999			if (first == NULL)
  1000				first = p;
  1001		}
  1002		if (first == NULL)
  1003			return -1;	/* didn't find any conflicting entries? */
  1004		res->parent = parent;
> 1005		list_add(&res->sibling, &p->sibling.prev);
  1006		INIT_LIST_HEAD(&res->child);
  1007	
  1008		/*
  1009		 * From first to p's previous sibling, they all fall into
  1010		 * res's region, change them as res's children.
  1011		 */
  1012		list_cut_position(&res->child, first->sibling.prev, res->sibling.prev);
> 1013		list_for_each_entry(p, &new->child, sibling) {
  1014	                p->parent = new;
  1015			pr_debug("PCI: Reparented %s %pR under %s\n",
  1016				 p->name, p, res->name);
  1017		}
  1018		return 0;
  1019	}
  1020	EXPORT_SYMBOL(reparent_resources);
  1021	

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

^ permalink raw reply

* Re: [PATCH v5 2/4] resource: Use list_head to link sibling resource
From: kbuild test robot @ 2018-06-12  4:49 UTC (permalink / raw)
  Cc: nicolas.pitre-QSEj5FYQhm4dnm+yROfE0A, brijesh.singh-5C7GfCeVMHo,
	thomas.lendacky-5C7GfCeVMHo, airlied-cv59FeDIM0c,
	linux-pci-u79uwXL29TY76Z2rM5mHXA,
	richard.weiyang-Re5JQEeQqe8AvxtiuMwx3w,
	keith.busch-ral2JQCrhuEAvxtiuMwx3w,
	jcmvbkbc-Re5JQEeQqe8AvxtiuMwx3w,
	baiyaowei-0p4V/sDNsUmm0O/7XYngnFaTQe2KTcn/,
	frowand.list-Re5JQEeQqe8AvxtiuMwx3w, tglx-hfZtesqFncYOwBW4kG4KsQ,
	lorenzo.pieralisi-5wv7dgnIgG8, sthemmin-0li6OtcxBFHby3iVrkZq2A,
	Baoquan He, linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw,
	patrik.r.jakobsson-Re5JQEeQqe8AvxtiuMwx3w,
	linux-input-u79uwXL29TY76Z2rM5mHXA,
	gustavo-THi1TnShQwVAfugRpC6u6w, bp-l3A5Bk7waGM,
	dyoung-H+wXaHxf7aLQT0dZR+AlfA, ebiederm-aS9lmoZGLiVWk0Htik3J/w,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	haiyangz-0li6OtcxBFHby3iVrkZq2A,
	maarten.lankhorst-VuQAYsv1563Yd54FQh9/CA,
	josh-iaAMLnmF4UmaiuxdJuQwMA, jglisse-H+wXaHxf7aLQT0dZR+AlfA,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, seanpaul-F7+t8E8rja9g9hUCZPvPmw,
	bhelgaas-hpIqsD4AKlfQT0dZR+AlfA, yinghai-DgEjT+Ai2ygdnm+yROfE0A,
	jonathan.derrick-ral2JQCrhuEAvxtiuMwx3w,
	chris-YvXeqwSYzG2sTnJN9+BGXg, monstr-pSz03upnqPeHXe+LvDLADg,
	linux-parisc-u79uwXL29TY76Z2rM5mHXA,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	kexec-IAPFreCvJWMP3drIcvDWNA
In-Reply-To: <20180612032831.29747-3-bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Hi Baoquan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.17 next-20180608]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180612-113600
config: x86_64-randconfig-x011-201823 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   kernel/resource.c: In function 'reparent_resources':
   kernel/resource.c:1005:26: error: passing argument 2 of 'list_add' from incompatible pointer type [-Werror=incompatible-pointer-types]
     list_add(&res->sibling, &p->sibling.prev);
                             ^
   In file included from include/linux/ioport.h:15:0,
                    from kernel/resource.c:14:
   include/linux/list.h:77:20: note: expected 'struct list_head *' but argument is of type 'struct list_head **'
    static inline void list_add(struct list_head *new, struct list_head *head)
                       ^~~~~~~~
   In file included from include/linux/list.h:9:0,
                    from include/linux/ioport.h:15,
                    from kernel/resource.c:14:
   kernel/resource.c:1013:26: error: 'new' undeclared (first use in this function); did you mean 'net'?
     list_for_each_entry(p, &new->child, sibling) {
                             ^
   include/linux/kernel.h:963:26: note: in definition of macro 'container_of'
     void *__mptr = (void *)(ptr);     \
                             ^~~
   include/linux/list.h:377:2: note: in expansion of macro 'list_entry'
     list_entry((ptr)->next, type, member)
     ^~~~~~~~~~
   include/linux/list.h:464:13: note: in expansion of macro 'list_first_entry'
     for (pos = list_first_entry(head, typeof(*pos), member); \
                ^~~~~~~~~~~~~~~~
>> kernel/resource.c:1013:2: note: in expansion of macro 'list_for_each_entry'
     list_for_each_entry(p, &new->child, sibling) {
     ^~~~~~~~~~~~~~~~~~~
   kernel/resource.c:1013:26: note: each undeclared identifier is reported only once for each function it appears in
     list_for_each_entry(p, &new->child, sibling) {
                             ^
   include/linux/kernel.h:963:26: note: in definition of macro 'container_of'
     void *__mptr = (void *)(ptr);     \
                             ^~~
   include/linux/list.h:377:2: note: in expansion of macro 'list_entry'
     list_entry((ptr)->next, type, member)
     ^~~~~~~~~~
   include/linux/list.h:464:13: note: in expansion of macro 'list_first_entry'
     for (pos = list_first_entry(head, typeof(*pos), member); \
                ^~~~~~~~~~~~~~~~
>> kernel/resource.c:1013:2: note: in expansion of macro 'list_for_each_entry'
     list_for_each_entry(p, &new->child, sibling) {
     ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/list_for_each_entry +1013 kernel/resource.c

   983	
   984	/*
   985	 * Reparent resource children of pr that conflict with res
   986	 * under res, and make res replace those children.
   987	 */
   988	int reparent_resources(struct resource *parent, struct resource *res)
   989	{
   990		struct resource *p, *first = NULL;
   991	
   992		list_for_each_entry(p, &parent->child, sibling) {
   993			if (p->end < res->start)
   994				continue;
   995			if (res->end < p->start)
   996				break;
   997			if (p->start < res->start || p->end > res->end)
   998				return -1;	/* not completely contained */
   999			if (first == NULL)
  1000				first = p;
  1001		}
  1002		if (first == NULL)
  1003			return -1;	/* didn't find any conflicting entries? */
  1004		res->parent = parent;
  1005		list_add(&res->sibling, &p->sibling.prev);
  1006		INIT_LIST_HEAD(&res->child);
  1007	
  1008		/*
  1009		 * From first to p's previous sibling, they all fall into
  1010		 * res's region, change them as res's children.
  1011		 */
  1012		list_cut_position(&res->child, first->sibling.prev, res->sibling.prev);
> 1013		list_for_each_entry(p, &new->child, sibling) {
  1014	                p->parent = new;
  1015			pr_debug("PCI: Reparented %s %pR under %s\n",
  1016				 p->name, p, res->name);
  1017		}
  1018		return 0;
  1019	}
  1020	EXPORT_SYMBOL(reparent_resources);
  1021	

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

^ permalink raw reply

* RE: [PATCH] Input: add error handling for da9052_reg_write
From: Steve Twiss @ 2018-06-12  5:37 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Support Opensource
In-Reply-To: <20180611173017.GD251078@dtor-ws>

On 11 June 2018 18:30 wrote Dmitry Torokhov 

> Subject: Re: [PATCH] Input: add error handling for da9052_reg_write
> 
> Hi Zhouyang,
> 
> On Mon, Jun 11, 2018 at 01:23:39PM +0800, Zhouyang Jia wrote:
> > When da9052_reg_write fails, the lack of error-handling code may
> > cause unexpected results.
> >
> > This patch adds error-handling code after calling da9052_reg_write.
> >
> > Signed-off-by: Zhouyang Jia <jiazhouyang09@gmail.com>
> > ---
> >  drivers/input/touchscreen/da9052_tsi.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/input/touchscreen/da9052_tsi.c
> b/drivers/input/touchscreen/da9052_tsi.c
> > index b5dfd594..60c82a0 100644
> > --- a/drivers/input/touchscreen/da9052_tsi.c
> > +++ b/drivers/input/touchscreen/da9052_tsi.c
> > @@ -319,8 +319,11 @@ static int da9052_ts_probe(struct platform_device *pdev)
> >  static int  da9052_ts_remove(struct platform_device *pdev)
> >  {
> >  	struct da9052_tsi *tsi = platform_get_drvdata(pdev);
> > +	int error;
> >
> > -	da9052_reg_write(tsi->da9052, DA9052_LDO9_REG, 0x19);
> > +	error = da9052_reg_write(tsi->da9052, DA9052_LDO9_REG, 0x19);
> > +	if (error < 0)
> > +		return error;
> 
> No, this does not help anything. The remove() action must not fail
> (really, having it return an int and not void was an API mistake made
> long time ago), and thus returning early in and event of error failing
> to communicate with the device is a mistake. You really want to release
> the interrupts and memory and unregister input device before returning.
> 
> >
> >  	da9052_free_irq(tsi->da9052, DA9052_IRQ_TSIREADY, tsi);
> >  	da9052_free_irq(tsi->da9052, DA9052_IRQ_PENDOWN, tsi);
> > --
> > 2.7.4
> >

script?
https://patchwork.kernel.org/project/LKML/list/?submitter=181001

^ permalink raw reply

* [PATCH] Input: elan: enable middle button of touchpads on ThinkPad P52
From: Aaron Ma @ 2018-06-12  7:09 UTC (permalink / raw)
  To: linux-input, linux-kernel, aaron.ma, kt.liao, dmitry.torokhov

PNPID is better way to identify the type of touchpads.
Enable middle button support on 2 types of touchpads on Lenovo P52.

Cc: stable@vger.kernel.org
Cc: KT Liao <kt.liao@emc.com.tw>
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
---
 drivers/input/mouse/elantech.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index fb4d902c4403..67b061dd4494 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1175,6 +1175,12 @@ static const struct dmi_system_id elantech_dmi_has_middle_button[] = {
 	{ }
 };
 
+static const char * const middle_button_pnp_ids[] = {
+	"LEN2131", /* ThinkPad P52 w/ NFC */
+	"LEN2132", /* ThinkPad P52 */
+	NULL
+};
+
 /*
  * Set the appropriate event bits for the input subsystem
  */
@@ -1194,7 +1200,8 @@ static int elantech_set_input_params(struct psmouse *psmouse)
 	__clear_bit(EV_REL, dev->evbit);
 
 	__set_bit(BTN_LEFT, dev->keybit);
-	if (dmi_check_system(elantech_dmi_has_middle_button))
+	if (dmi_check_system(elantech_dmi_has_middle_button) ||
+		psmouse_matches_pnp_id(psmouse, middle_button_pnp_ids))
 		__set_bit(BTN_MIDDLE, dev->keybit);
 	__set_bit(BTN_RIGHT, dev->keybit);
 
-- 
2.17.1

^ permalink raw reply related

* [PATCH v5 0/3] Input: xen-kbdfront - allow better run-time configuration
From: Oleksandr Andrushchenko @ 2018-06-12  7:48 UTC (permalink / raw)
  To: xen-devel, linux-input, linux-kernel, dmitry.torokhov, jgross,
	lyan, boris.ostrovsky
  Cc: konrad.wilk, andr2000, andrii_chepurnyi, Oleksandr Andrushchenko

From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

Hi, all!

This patch series synchronizes Xen canonical protocol definitions
which allow the last two patches in the series to update Xen
kbdfront driver with a fix and v5 of the patch to allow better
run-time configuration for xen-kbdfront.

As xen-kbdfront patches rely on protocol changes from patch 1 I am
sending these all together: Boris, Juergen, if you and Dmitry do not
mind, can we have patch 1 applied through Dmitry's tree?

Thank you,
Oleksandr

Changes since v4:
- Added required changes to Xen protocols
- Added a fix for multi-touch XenStore node's locations
- No changes to "Input: xen-kbdfront - allow better run-time
  configuration"

Changes since v3:
- do not connect backend if all virtual devices are disabled (Dmitry)

Changes since v2:
- based on XenStore kbdif features to control which devices are
  exposed instead of module parameters.

Oleksandr Andrushchenko (3):
  xen: Sync up with the canonical protocol definitions in Xen
  Input: xen-kbdfront - fix multi-touch XenStore node's locations
  Input: xen-kbdfront - allow better run-time configuration

 drivers/input/misc/xen-kbdfront.c  | 183 +++++++++++++++++------------
 include/xen/interface/io/displif.h |   8 ++
 include/xen/interface/io/kbdif.h   |  78 +++++++++---
 include/xen/interface/io/sndif.h   |  10 +-
 4 files changed, 180 insertions(+), 99 deletions(-)

-- 
2.17.1

^ permalink raw reply

* [PATCH v5 1/3] xen: Sync up with the canonical protocol definitions in Xen
From: Oleksandr Andrushchenko @ 2018-06-12  7:48 UTC (permalink / raw)
  To: xen-devel, linux-input, linux-kernel, dmitry.torokhov, jgross,
	lyan, boris.ostrovsky
  Cc: konrad.wilk, andr2000, andrii_chepurnyi, Oleksandr Andrushchenko
In-Reply-To: <20180612074856.28451-1-andr2000@gmail.com>

From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

This is the sync up with the canonical definitions of the input,
sound and display protocols in Xen.

Changes to kbdif:
1. Add missing string constants for {feature|request}-raw-pointer
   to align with the rest of the interface file.

2. Add new XenStore feature fields, so it is possible to individually
   control set of exposed virtual devices for each guest OS:
     - set feature-disable-keyboard to 1 if no keyboard device needs
       to be created
     - set feature-disable-pointer to 1 if no pointer device needs
       to be created

3. Move multi-touch device parameters to backend nodes: these are
    described as a part of frontend's XenBus configuration nodes
    while they belong to backend's configuration. Fix this by moving
    the parameters to the proper section.

Unique-id field:
1. Add unique-id XenBus entry for virtual input and display.

2. Change type of unique-id field to string for sndif to align with
display and input protocols.

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 include/xen/interface/io/displif.h |  8 +++
 include/xen/interface/io/kbdif.h   | 78 ++++++++++++++++++++++--------
 include/xen/interface/io/sndif.h   | 10 ++--
 3 files changed, 71 insertions(+), 25 deletions(-)

diff --git a/include/xen/interface/io/displif.h b/include/xen/interface/io/displif.h
index 596578d9be3e..fdc279dc4a88 100644
--- a/include/xen/interface/io/displif.h
+++ b/include/xen/interface/io/displif.h
@@ -189,6 +189,13 @@
  *
  *----------------------------- Connector settings ----------------------------
  *
+ * unique-id
+ *      Values:         <string>
+ *
+ *      After device instance initialization each connector is assigned a
+ *      unique ID, so it can be identified by the backend by this ID.
+ *      This can be UUID or such.
+ *
  * resolution
  *      Values:         <width, uint32_t>x<height, uint32_t>
  *
@@ -368,6 +375,7 @@
 #define XENDISPL_FIELD_EVT_CHANNEL	"evt-event-channel"
 #define XENDISPL_FIELD_RESOLUTION	"resolution"
 #define XENDISPL_FIELD_BE_ALLOC		"be-alloc"
+#define XENDISPL_FIELD_UNIQUE_ID	"unique-id"
 
 /*
  ******************************************************************************
diff --git a/include/xen/interface/io/kbdif.h b/include/xen/interface/io/kbdif.h
index 2a9510ade701..b4439cf48220 100644
--- a/include/xen/interface/io/kbdif.h
+++ b/include/xen/interface/io/kbdif.h
@@ -51,6 +51,18 @@
  * corresponding entries in XenStore and puts 1 as the value of the entry.
  * If a feature is not supported then 0 must be set or feature entry omitted.
  *
+ * feature-disable-keyboard
+ *      Values:         <uint>
+ *
+ *      If there is no need to expose a virtual keyboard device by the
+ *      frontend then this must be set to 1.
+ *
+ * feature-disable-pointer
+ *      Values:         <uint>
+ *
+ *      If there is no need to expose a virtual pointer device by the
+ *      frontend then this must be set to 1.
+ *
  * feature-abs-pointer
  *      Values:         <uint>
  *
@@ -63,6 +75,22 @@
  *      Backends, which support reporting of multi-touch events
  *      should set this to 1.
  *
+ * feature-raw-pointer
+ *      Values:        <uint>
+ *
+ *      Backends, which support reporting raw (unscaled) absolute coordinates
+ *      for pointer devices should set this to 1. Raw (unscaled) values have
+ *      a range of [0, 0x7fff].
+ *
+ *-----------------------  Device Instance Parameters ------------------------
+ *
+ * unique-id
+ *      Values:         <string>
+ *
+ *      After device instance initialization it is assigned a unique ID,
+ *      so every instance of the frontend can be identified by the backend
+ *      by this ID. This can be UUID or such.
+ *
  *------------------------- Pointer Device Parameters ------------------------
  *
  * width
@@ -77,6 +105,25 @@
  *      Maximum Y coordinate (height) to be used by the frontend
  *      while reporting input events, pixels, [0; UINT32_MAX].
  *
+ *----------------------- Multi-touch Device Parameters ----------------------
+ *
+ * multi-touch-num-contacts
+ *      Values:         <uint>
+ *
+ *      Number of simultaneous touches reported.
+ *
+ * multi-touch-width
+ *      Values:         <uint>
+ *
+ *      Width of the touch area to be used by the frontend
+ *      while reporting input events, pixels, [0; UINT32_MAX].
+ *
+ * multi-touch-height
+ *      Values:         <uint>
+ *
+ *      Height of the touch area to be used by the frontend
+ *      while reporting input events, pixels, [0; UINT32_MAX].
+ *
  *****************************************************************************
  *                            Frontend XenBus Nodes
  *****************************************************************************
@@ -98,6 +145,13 @@
  *
  *      Request backend to report multi-touch events.
  *
+ * request-raw-pointer
+ *      Values:         <uint>
+ *
+ *      Request backend to report raw unscaled absolute pointer coordinates.
+ *      This option is only valid if request-abs-pointer is also set.
+ *      Raw unscaled coordinates have the range [0, 0x7fff]
+ *
  *----------------------- Request Transport Parameters -----------------------
  *
  * event-channel
@@ -117,25 +171,6 @@
  *
  *      OBSOLETE, not recommended for use.
  *      PFN of the shared page.
- *
- *----------------------- Multi-touch Device Parameters -----------------------
- *
- * multi-touch-num-contacts
- *      Values:         <uint>
- *
- *      Number of simultaneous touches reported.
- *
- * multi-touch-width
- *      Values:         <uint>
- *
- *      Width of the touch area to be used by the frontend
- *      while reporting input events, pixels, [0; UINT32_MAX].
- *
- * multi-touch-height
- *      Values:         <uint>
- *
- *      Height of the touch area to be used by the frontend
- *      while reporting input events, pixels, [0; UINT32_MAX].
  */
 
 /*
@@ -163,9 +198,13 @@
 
 #define XENKBD_DRIVER_NAME		"vkbd"
 
+#define XENKBD_FIELD_FEAT_DSBL_KEYBRD	"feature-disable-keyboard"
+#define XENKBD_FIELD_FEAT_DSBL_POINTER	"feature-disable-pointer"
 #define XENKBD_FIELD_FEAT_ABS_POINTER	"feature-abs-pointer"
+#define XENKBD_FIELD_FEAT_RAW_POINTER	"feature-raw-pointer"
 #define XENKBD_FIELD_FEAT_MTOUCH	"feature-multi-touch"
 #define XENKBD_FIELD_REQ_ABS_POINTER	"request-abs-pointer"
+#define XENKBD_FIELD_REQ_RAW_POINTER	"request-raw-pointer"
 #define XENKBD_FIELD_REQ_MTOUCH		"request-multi-touch"
 #define XENKBD_FIELD_RING_GREF		"page-gref"
 #define XENKBD_FIELD_EVT_CHANNEL	"event-channel"
@@ -174,6 +213,7 @@
 #define XENKBD_FIELD_MT_WIDTH		"multi-touch-width"
 #define XENKBD_FIELD_MT_HEIGHT		"multi-touch-height"
 #define XENKBD_FIELD_MT_NUM_CONTACTS	"multi-touch-num-contacts"
+#define XENKBD_FIELD_UNIQUE_ID		"unique-id"
 
 /* OBSOLETE, not recommended for use */
 #define XENKBD_FIELD_RING_REF		"page-ref"
diff --git a/include/xen/interface/io/sndif.h b/include/xen/interface/io/sndif.h
index 78bb5d9f8d83..2aac8f73614c 100644
--- a/include/xen/interface/io/sndif.h
+++ b/include/xen/interface/io/sndif.h
@@ -278,13 +278,11 @@
  *      defined under the same device.
  *
  * unique-id
- *      Values:         <uint32_t>
+ *      Values:         <string>
  *
- *      After stream initialization it is assigned a unique ID (within the front
- *      driver), so every stream of the frontend can be identified by the
- *      backend by this ID. This is not equal to stream-idx as the later is
- *      zero based within the device, but this index is contigous within the
- *      driver.
+ *      After stream initialization it is assigned a unique ID, so every
+ *      stream of the frontend can be identified by the backend by this ID.
+ *      This can be UUID or such.
  *
  *-------------------- Stream Request Transport Parameters --------------------
  *
-- 
2.17.1

^ permalink raw reply related

* [PATCH v5 2/3] Input: xen-kbdfront - fix multi-touch XenStore node's locations
From: Oleksandr Andrushchenko @ 2018-06-12  7:48 UTC (permalink / raw)
  To: xen-devel, linux-input, linux-kernel, dmitry.torokhov, jgross,
	lyan, boris.ostrovsky
  Cc: konrad.wilk, andr2000, andrii_chepurnyi, Oleksandr Andrushchenko
In-Reply-To: <20180612074856.28451-1-andr2000@gmail.com>

From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

kbdif protocol describes multi-touch device parameters as a
part of frontend's XenBus configuration nodes while they
belong to backend's configuration. Fix this by reading the
parameters as defined by the protocol.

Fixes: 49aac8204da5 ("Input: xen-kbdfront - add multi-touch support")

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
---
 drivers/input/misc/xen-kbdfront.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
index d91f3b1c5375..92d739649022 100644
--- a/drivers/input/misc/xen-kbdfront.c
+++ b/drivers/input/misc/xen-kbdfront.c
@@ -229,7 +229,7 @@ static int xenkbd_probe(struct xenbus_device *dev,
 		}
 	}
 
-	touch = xenbus_read_unsigned(dev->nodename,
+	touch = xenbus_read_unsigned(dev->otherend,
 				     XENKBD_FIELD_FEAT_MTOUCH, 0);
 	if (touch) {
 		ret = xenbus_write(XBT_NIL, dev->nodename,
@@ -304,13 +304,13 @@ static int xenkbd_probe(struct xenbus_device *dev,
 		if (!mtouch)
 			goto error_nomem;
 
-		num_cont = xenbus_read_unsigned(info->xbdev->nodename,
+		num_cont = xenbus_read_unsigned(info->xbdev->otherend,
 						XENKBD_FIELD_MT_NUM_CONTACTS,
 						1);
-		width = xenbus_read_unsigned(info->xbdev->nodename,
+		width = xenbus_read_unsigned(info->xbdev->otherend,
 					     XENKBD_FIELD_MT_WIDTH,
 					     XENFB_WIDTH);
-		height = xenbus_read_unsigned(info->xbdev->nodename,
+		height = xenbus_read_unsigned(info->xbdev->otherend,
 					      XENKBD_FIELD_MT_HEIGHT,
 					      XENFB_HEIGHT);
 
-- 
2.17.1

^ permalink raw reply related

* [PATCH v5 3/3] Input: xen-kbdfront - allow better run-time configuration
From: Oleksandr Andrushchenko @ 2018-06-12  7:48 UTC (permalink / raw)
  To: xen-devel, linux-input, linux-kernel, dmitry.torokhov, jgross,
	lyan, boris.ostrovsky
  Cc: konrad.wilk, andr2000, andrii_chepurnyi, Oleksandr Andrushchenko
In-Reply-To: <20180612074856.28451-1-andr2000@gmail.com>

From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

It is now only possible to control if multi-touch virtual device
is created or not (via the corresponding XenStore entries),
but keyboard and pointer devices are always created.
In some cases this is not desirable. For example, if virtual
keyboard device is exposed to Android then the latter won't
automatically show on-screen keyboard as it expects that a
physical keyboard device can be used for typing.

Utilize keyboard and pointer device XenStore feature fields to
configure which virtual devices are created:
 - set "feature-disable-keyboard" to 1 if no keyboard device
   needs to be created
 - set "feature-disable-pointer" to 1 if no pointer device
   needs to be created
Keep old behavior by default.

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Suggested-by: Andrii Chepurnyi <andrii_chepurnyi@epam.com>
Tested-by: Andrii Chepurnyi <andrii_chepurnyi@epam.com>
---
 drivers/input/misc/xen-kbdfront.c | 177 ++++++++++++++++++------------
 1 file changed, 106 insertions(+), 71 deletions(-)

diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
index 92d739649022..f50fba1962ec 100644
--- a/drivers/input/misc/xen-kbdfront.c
+++ b/drivers/input/misc/xen-kbdfront.c
@@ -63,6 +63,9 @@ static void xenkbd_disconnect_backend(struct xenkbd_info *);
 static void xenkbd_handle_motion_event(struct xenkbd_info *info,
 				       struct xenkbd_motion *motion)
 {
+	if (unlikely(!info->ptr))
+		return;
+
 	input_report_rel(info->ptr, REL_X, motion->rel_x);
 	input_report_rel(info->ptr, REL_Y, motion->rel_y);
 	if (motion->rel_z)
@@ -73,6 +76,9 @@ static void xenkbd_handle_motion_event(struct xenkbd_info *info,
 static void xenkbd_handle_position_event(struct xenkbd_info *info,
 					 struct xenkbd_position *pos)
 {
+	if (unlikely(!info->ptr))
+		return;
+
 	input_report_abs(info->ptr, ABS_X, pos->abs_x);
 	input_report_abs(info->ptr, ABS_Y, pos->abs_y);
 	if (pos->rel_z)
@@ -97,6 +103,9 @@ static void xenkbd_handle_key_event(struct xenkbd_info *info,
 		return;
 	}
 
+	if (unlikely(!dev))
+		return;
+
 	input_event(dev, EV_KEY, key->keycode, value);
 	input_sync(dev);
 }
@@ -192,7 +201,7 @@ static int xenkbd_probe(struct xenbus_device *dev,
 				  const struct xenbus_device_id *id)
 {
 	int ret, i;
-	unsigned int abs, touch;
+	bool with_mtouch, with_kbd, with_ptr;
 	struct xenkbd_info *info;
 	struct input_dev *kbd, *ptr, *mtouch;
 
@@ -211,93 +220,114 @@ static int xenkbd_probe(struct xenbus_device *dev,
 	if (!info->page)
 		goto error_nomem;
 
-	/* Set input abs params to match backend screen res */
-	abs = xenbus_read_unsigned(dev->otherend,
-				   XENKBD_FIELD_FEAT_ABS_POINTER, 0);
-	ptr_size[KPARAM_X] = xenbus_read_unsigned(dev->otherend,
-						  XENKBD_FIELD_WIDTH,
-						  ptr_size[KPARAM_X]);
-	ptr_size[KPARAM_Y] = xenbus_read_unsigned(dev->otherend,
-						  XENKBD_FIELD_HEIGHT,
-						  ptr_size[KPARAM_Y]);
-	if (abs) {
-		ret = xenbus_write(XBT_NIL, dev->nodename,
-				   XENKBD_FIELD_REQ_ABS_POINTER, "1");
-		if (ret) {
-			pr_warn("xenkbd: can't request abs-pointer\n");
-			abs = 0;
-		}
-	}
+	/*
+	 * The below are reverse logic, e.g. if the feature is set, then
+	 * do not expose the corresponding virtual device.
+	 */
+	with_kbd = !xenbus_read_unsigned(dev->otherend,
+					 XENKBD_FIELD_FEAT_DSBL_KEYBRD, 0);
+
+	with_ptr = !xenbus_read_unsigned(dev->otherend,
+					 XENKBD_FIELD_FEAT_DSBL_POINTER, 0);
 
-	touch = xenbus_read_unsigned(dev->otherend,
-				     XENKBD_FIELD_FEAT_MTOUCH, 0);
-	if (touch) {
+	/* Direct logic: if set, then create multi-touch device. */
+	with_mtouch = xenbus_read_unsigned(dev->otherend,
+					   XENKBD_FIELD_FEAT_MTOUCH, 0);
+	if (with_mtouch) {
 		ret = xenbus_write(XBT_NIL, dev->nodename,
 				   XENKBD_FIELD_REQ_MTOUCH, "1");
 		if (ret) {
 			pr_warn("xenkbd: can't request multi-touch");
-			touch = 0;
+			with_mtouch = 0;
 		}
 	}
 
 	/* keyboard */
-	kbd = input_allocate_device();
-	if (!kbd)
-		goto error_nomem;
-	kbd->name = "Xen Virtual Keyboard";
-	kbd->phys = info->phys;
-	kbd->id.bustype = BUS_PCI;
-	kbd->id.vendor = 0x5853;
-	kbd->id.product = 0xffff;
-
-	__set_bit(EV_KEY, kbd->evbit);
-	for (i = KEY_ESC; i < KEY_UNKNOWN; i++)
-		__set_bit(i, kbd->keybit);
-	for (i = KEY_OK; i < KEY_MAX; i++)
-		__set_bit(i, kbd->keybit);
-
-	ret = input_register_device(kbd);
-	if (ret) {
-		input_free_device(kbd);
-		xenbus_dev_fatal(dev, ret, "input_register_device(kbd)");
-		goto error;
+	if (with_kbd) {
+		kbd = input_allocate_device();
+		if (!kbd)
+			goto error_nomem;
+		kbd->name = "Xen Virtual Keyboard";
+		kbd->phys = info->phys;
+		kbd->id.bustype = BUS_PCI;
+		kbd->id.vendor = 0x5853;
+		kbd->id.product = 0xffff;
+
+		__set_bit(EV_KEY, kbd->evbit);
+		for (i = KEY_ESC; i < KEY_UNKNOWN; i++)
+			__set_bit(i, kbd->keybit);
+		for (i = KEY_OK; i < KEY_MAX; i++)
+			__set_bit(i, kbd->keybit);
+
+		ret = input_register_device(kbd);
+		if (ret) {
+			input_free_device(kbd);
+			xenbus_dev_fatal(dev, ret,
+					 "input_register_device(kbd)");
+			goto error;
+		}
+		info->kbd = kbd;
 	}
-	info->kbd = kbd;
 
 	/* pointing device */
-	ptr = input_allocate_device();
-	if (!ptr)
-		goto error_nomem;
-	ptr->name = "Xen Virtual Pointer";
-	ptr->phys = info->phys;
-	ptr->id.bustype = BUS_PCI;
-	ptr->id.vendor = 0x5853;
-	ptr->id.product = 0xfffe;
-
-	if (abs) {
-		__set_bit(EV_ABS, ptr->evbit);
-		input_set_abs_params(ptr, ABS_X, 0, ptr_size[KPARAM_X], 0, 0);
-		input_set_abs_params(ptr, ABS_Y, 0, ptr_size[KPARAM_Y], 0, 0);
-	} else {
-		input_set_capability(ptr, EV_REL, REL_X);
-		input_set_capability(ptr, EV_REL, REL_Y);
-	}
-	input_set_capability(ptr, EV_REL, REL_WHEEL);
+	if (with_ptr) {
+		unsigned int abs;
+
+		/* Set input abs params to match backend screen res */
+		abs = xenbus_read_unsigned(dev->otherend,
+					   XENKBD_FIELD_FEAT_ABS_POINTER, 0);
+		ptr_size[KPARAM_X] = xenbus_read_unsigned(dev->otherend,
+							  XENKBD_FIELD_WIDTH,
+							  ptr_size[KPARAM_X]);
+		ptr_size[KPARAM_Y] = xenbus_read_unsigned(dev->otherend,
+							  XENKBD_FIELD_HEIGHT,
+							  ptr_size[KPARAM_Y]);
+		if (abs) {
+			ret = xenbus_write(XBT_NIL, dev->nodename,
+					   XENKBD_FIELD_REQ_ABS_POINTER, "1");
+			if (ret) {
+				pr_warn("xenkbd: can't request abs-pointer\n");
+				abs = 0;
+			}
+		}
 
-	__set_bit(EV_KEY, ptr->evbit);
-	for (i = BTN_LEFT; i <= BTN_TASK; i++)
-		__set_bit(i, ptr->keybit);
+		ptr = input_allocate_device();
+		if (!ptr)
+			goto error_nomem;
+		ptr->name = "Xen Virtual Pointer";
+		ptr->phys = info->phys;
+		ptr->id.bustype = BUS_PCI;
+		ptr->id.vendor = 0x5853;
+		ptr->id.product = 0xfffe;
+
+		if (abs) {
+			__set_bit(EV_ABS, ptr->evbit);
+			input_set_abs_params(ptr, ABS_X, 0,
+					     ptr_size[KPARAM_X], 0, 0);
+			input_set_abs_params(ptr, ABS_Y, 0,
+					     ptr_size[KPARAM_Y], 0, 0);
+		} else {
+			input_set_capability(ptr, EV_REL, REL_X);
+			input_set_capability(ptr, EV_REL, REL_Y);
+		}
+		input_set_capability(ptr, EV_REL, REL_WHEEL);
 
-	ret = input_register_device(ptr);
-	if (ret) {
-		input_free_device(ptr);
-		xenbus_dev_fatal(dev, ret, "input_register_device(ptr)");
-		goto error;
+		__set_bit(EV_KEY, ptr->evbit);
+		for (i = BTN_LEFT; i <= BTN_TASK; i++)
+			__set_bit(i, ptr->keybit);
+
+		ret = input_register_device(ptr);
+		if (ret) {
+			input_free_device(ptr);
+			xenbus_dev_fatal(dev, ret,
+					 "input_register_device(ptr)");
+			goto error;
+		}
+		info->ptr = ptr;
 	}
-	info->ptr = ptr;
 
 	/* multi-touch device */
-	if (touch) {
+	if (with_mtouch) {
 		int num_cont, width, height;
 
 		mtouch = input_allocate_device();
@@ -346,6 +376,11 @@ static int xenkbd_probe(struct xenbus_device *dev,
 		info->mtouch = mtouch;
 	}
 
+	if (!(with_kbd | with_ptr | with_mtouch)) {
+		ret = -ENXIO;
+		goto error;
+	}
+
 	ret = xenkbd_connect_backend(dev, info);
 	if (ret < 0)
 		goto error;
-- 
2.17.1

^ permalink raw reply related

* Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public
From: Andy Shevchenko @ 2018-06-12  8:29 UTC (permalink / raw)
  To: Baoquan He
  Cc: Nicolas Pitre, brijesh.singh-5C7GfCeVMHo, devicetree,
	David Airlie, linux-pci-u79uwXL29TY76Z2rM5mHXA,
	richard.weiyang-Re5JQEeQqe8AvxtiuMwx3w, Keith Busch, Max Filippov,
	Paul Mackerras, baiyaowei-0p4V/sDNsUmm0O/7XYngnFaTQe2KTcn/,
	KY Srinivasan, Frank Rowand, Lorenzo Pieralisi, Stephen Hemminger,
	linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw, Michael Ellerman,
	Patrik Jakobsson, linux-input, Gustavo Padovan, Borislav Petkov,
	Dave Young, Tom Lendacky, Haiyang Zhang, Maarten Lankhorst
In-Reply-To: <20180612032831.29747-2-bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On Tue, Jun 12, 2018 at 6:28 AM, Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> reparent_resources() is duplicated in arch/microblaze/pci/pci-common.c
> and arch/powerpc/kernel/pci-common.c, so move it to kernel/resource.c
> so that it's shared. Later its code also need be updated using list_head
> to replace singly linked list.

While this is a good deduplication of the code, some requirements for
public functions would be good to satisfy.

> +/*
> + * Reparent resource children of pr that conflict with res
> + * under res, and make res replace those children.
> + */

kernel doc format, though...

> +static int reparent_resources(struct resource *parent,
> +                                    struct resource *res)

...is it really public with static keyword?!



> +{

> +       for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) {
> +               if (p->end < res->start)
> +                       continue;
> +               if (res->end < p->start)
> +                       break;

> +               if (p->start < res->start || p->end > res->end)
> +                       return -1;      /* not completely contained */

Usually we are expecting real eeror codes.

> +               if (firstpp == NULL)
> +                       firstpp = pp;
> +       }

> +       if (firstpp == NULL)
> +               return -1;      /* didn't find any conflicting entries? */

Ditto.

> +}
> +EXPORT_SYMBOL(reparent_resources);

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply

* Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public
From: Baoquan He @ 2018-06-12  9:38 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Nicolas Pitre, brijesh.singh-5C7GfCeVMHo, devicetree,
	David Airlie, linux-pci-u79uwXL29TY76Z2rM5mHXA,
	richard.weiyang-Re5JQEeQqe8AvxtiuMwx3w, Keith Busch, Max Filippov,
	Paul Mackerras, baiyaowei-0p4V/sDNsUmm0O/7XYngnFaTQe2KTcn/,
	KY Srinivasan, Frank Rowand, Lorenzo Pieralisi, Stephen Hemminger,
	linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw, Michael Ellerman,
	Patrik Jakobsson, linux-input, Gustavo Padovan, Borislav Petkov,
	Dave Young, Tom Lendacky, Haiyang Zhang, Maarten Lankhorst
In-Reply-To: <CAHp75Vd6v4+RTq-5uw_BJpT6=w2KGjTfU+rEst6+8igs2cyntw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 06/12/18 at 11:29am, Andy Shevchenko wrote:
> On Tue, Jun 12, 2018 at 6:28 AM, Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> > reparent_resources() is duplicated in arch/microblaze/pci/pci-common.c
> > and arch/powerpc/kernel/pci-common.c, so move it to kernel/resource.c
> > so that it's shared. Later its code also need be updated using list_head
> > to replace singly linked list.
> 
> While this is a good deduplication of the code, some requirements for
> public functions would be good to satisfy.
> 
> > +/*
> > + * Reparent resource children of pr that conflict with res
> > + * under res, and make res replace those children.
> > + */
> 
> kernel doc format, though...

> 
> > +static int reparent_resources(struct resource *parent,
> > +                                    struct resource *res)
> 
> ...is it really public with static keyword?!

Thanks for looking into this. This is a code bug, I copied and changed,
but forgot merging the changing to local commit. And the error reported
by test robot in patch 2 was changed too locally, forgot merging it to
patch. Will repost to address this.

> 
> 
> 
> > +{
> 
> > +       for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) {
> > +               if (p->end < res->start)
> > +                       continue;
> > +               if (res->end < p->start)
> > +                       break;
> 
> > +               if (p->start < res->start || p->end > res->end)
> > +                       return -1;      /* not completely contained */
> 
> Usually we are expecting real eeror codes.

Hmm, I just copied it from arch/powerpc/kernel/pci-common.c. The
function interface expects an integer returned value, not sure what a
real error codes look like, could you give more hints? Will change
accordingly.

> 
> > +               if (firstpp == NULL)
> > +                       firstpp = pp;
> > +       }
> 
> > +       if (firstpp == NULL)
> > +               return -1;      /* didn't find any conflicting entries? */
> 
> Ditto.
> 
> > +}
> > +EXPORT_SYMBOL(reparent_resources);
> 
> -- 
> With Best Regards,
> Andy Shevchenko

^ permalink raw reply

* Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public
From: Baoquan He @ 2018-06-12  9:49 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Nicolas Pitre, brijesh.singh-5C7GfCeVMHo, devicetree,
	David Airlie, linux-pci-u79uwXL29TY76Z2rM5mHXA,
	richard.weiyang-Re5JQEeQqe8AvxtiuMwx3w, Keith Busch, Max Filippov,
	Paul Mackerras, baiyaowei-0p4V/sDNsUmm0O/7XYngnFaTQe2KTcn/,
	KY Srinivasan, Frank Rowand, Lorenzo Pieralisi, Stephen Hemminger,
	linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw, Michael Ellerman,
	Patrik Jakobsson, linux-input, Gustavo Padovan, Borislav Petkov,
	Dave Young, Tom Lendacky, Haiyang Zhang, Maarten Lankhorst
In-Reply-To: <CAHp75Vd6v4+RTq-5uw_BJpT6=w2KGjTfU+rEst6+8igs2cyntw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 06/12/18 at 11:29am, Andy Shevchenko wrote:
> On Tue, Jun 12, 2018 at 6:28 AM, Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> > reparent_resources() is duplicated in arch/microblaze/pci/pci-common.c
> > and arch/powerpc/kernel/pci-common.c, so move it to kernel/resource.c
> > so that it's shared. Later its code also need be updated using list_head
> > to replace singly linked list.
> 
> While this is a good deduplication of the code, some requirements for
> public functions would be good to satisfy.
> 
> > +/*
> > + * Reparent resource children of pr that conflict with res
> > + * under res, and make res replace those children.
> > + */
> 
> kernel doc format, though...

Will rewrite it, thanks.

> 
> > +static int reparent_resources(struct resource *parent,
> > +                                    struct resource *res)
> 
> ...is it really public with static keyword?!
> 
> 
> 
> > +{
> 
> > +       for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) {
> > +               if (p->end < res->start)
> > +                       continue;
> > +               if (res->end < p->start)
> > +                       break;
> 
> > +               if (p->start < res->start || p->end > res->end)
> > +                       return -1;      /* not completely contained */
> 
> Usually we are expecting real eeror codes.
> 
> > +               if (firstpp == NULL)
> > +                       firstpp = pp;
> > +       }
> 
> > +       if (firstpp == NULL)
> > +               return -1;      /* didn't find any conflicting entries? */
> 
> Ditto.
> 
> > +}
> > +EXPORT_SYMBOL(reparent_resources);
> 
> -- 
> With Best Regards,
> Andy Shevchenko

^ permalink raw reply

* Re: [PATCH v5 1/3] xen: Sync up with the canonical protocol definitions in Xen
From: Juergen Gross @ 2018-06-12 13:46 UTC (permalink / raw)
  To: Oleksandr Andrushchenko, xen-devel, linux-input, linux-kernel,
	dmitry.torokhov, lyan, boris.ostrovsky
  Cc: konrad.wilk, andrii_chepurnyi, Oleksandr Andrushchenko
In-Reply-To: <20180612074856.28451-2-andr2000@gmail.com>

On 12/06/18 09:48, Oleksandr Andrushchenko wrote:
> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> 
> This is the sync up with the canonical definitions of the input,
> sound and display protocols in Xen.
> 
> Changes to kbdif:
> 1. Add missing string constants for {feature|request}-raw-pointer
>    to align with the rest of the interface file.
> 
> 2. Add new XenStore feature fields, so it is possible to individually
>    control set of exposed virtual devices for each guest OS:
>      - set feature-disable-keyboard to 1 if no keyboard device needs
>        to be created
>      - set feature-disable-pointer to 1 if no pointer device needs
>        to be created
> 
> 3. Move multi-touch device parameters to backend nodes: these are
>     described as a part of frontend's XenBus configuration nodes
>     while they belong to backend's configuration. Fix this by moving
>     the parameters to the proper section.
> 
> Unique-id field:
> 1. Add unique-id XenBus entry for virtual input and display.
> 
> 2. Change type of unique-id field to string for sndif to align with
> display and input protocols.
> 
> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Reviewed-by: Juergen Gross <jgross@suse.com>

I'm fine with this patch being added via the input tree with the other
patches. In case I should take it via the Xen tree, please send me a
note.


Juergen

^ permalink raw reply

* Re: [PATCH v5 2/3] Input: xen-kbdfront - fix multi-touch XenStore node's locations
From: Juergen Gross @ 2018-06-12 13:47 UTC (permalink / raw)
  To: Oleksandr Andrushchenko, xen-devel, linux-input, linux-kernel,
	dmitry.torokhov, lyan, boris.ostrovsky
  Cc: konrad.wilk, andrii_chepurnyi, Oleksandr Andrushchenko
In-Reply-To: <20180612074856.28451-3-andr2000@gmail.com>

On 12/06/18 09:48, Oleksandr Andrushchenko wrote:
> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> 
> kbdif protocol describes multi-touch device parameters as a
> part of frontend's XenBus configuration nodes while they
> belong to backend's configuration. Fix this by reading the
> parameters as defined by the protocol.
> 
> Fixes: 49aac8204da5 ("Input: xen-kbdfront - add multi-touch support")
> 
> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen

^ permalink raw reply

* Re: [PATCH v5 1/3] xen: Sync up with the canonical protocol definitions in Xen
From: Oleksandr Andrushchenko @ 2018-06-12 13:47 UTC (permalink / raw)
  To: Juergen Gross, Oleksandr Andrushchenko, xen-devel, linux-input,
	linux-kernel, dmitry.torokhov, lyan, boris.ostrovsky
  Cc: konrad.wilk, andrii_chepurnyi
In-Reply-To: <9c579567-ebe2-f465-5443-b3a3e71d34a5@suse.com>

On 06/12/2018 04:46 PM, Juergen Gross wrote:
> On 12/06/18 09:48, Oleksandr Andrushchenko wrote:
>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>>
>> This is the sync up with the canonical definitions of the input,
>> sound and display protocols in Xen.
>>
>> Changes to kbdif:
>> 1. Add missing string constants for {feature|request}-raw-pointer
>>     to align with the rest of the interface file.
>>
>> 2. Add new XenStore feature fields, so it is possible to individually
>>     control set of exposed virtual devices for each guest OS:
>>       - set feature-disable-keyboard to 1 if no keyboard device needs
>>         to be created
>>       - set feature-disable-pointer to 1 if no pointer device needs
>>         to be created
>>
>> 3. Move multi-touch device parameters to backend nodes: these are
>>      described as a part of frontend's XenBus configuration nodes
>>      while they belong to backend's configuration. Fix this by moving
>>      the parameters to the proper section.
>>
>> Unique-id field:
>> 1. Add unique-id XenBus entry for virtual input and display.
>>
>> 2. Change type of unique-id field to string for sndif to align with
>> display and input protocols.
>>
>> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Reviewed-by: Juergen Gross <jgross@suse.com>
>
> I'm fine with this patch being added via the input tree with the other
> patches. In case I should take it via the Xen tree, please send me a
> note.
Thank you
>
> Juergen

^ permalink raw reply

* Re: [PATCH v5 3/3] Input: xen-kbdfront - allow better run-time configuration
From: Juergen Gross @ 2018-06-12 13:50 UTC (permalink / raw)
  To: Oleksandr Andrushchenko, xen-devel, linux-input, linux-kernel,
	dmitry.torokhov, lyan, boris.ostrovsky
  Cc: konrad.wilk, andrii_chepurnyi, Oleksandr Andrushchenko
In-Reply-To: <20180612074856.28451-4-andr2000@gmail.com>

On 12/06/18 09:48, Oleksandr Andrushchenko wrote:
> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> 
> It is now only possible to control if multi-touch virtual device
> is created or not (via the corresponding XenStore entries),
> but keyboard and pointer devices are always created.
> In some cases this is not desirable. For example, if virtual
> keyboard device is exposed to Android then the latter won't
> automatically show on-screen keyboard as it expects that a
> physical keyboard device can be used for typing.
> 
> Utilize keyboard and pointer device XenStore feature fields to
> configure which virtual devices are created:
>  - set "feature-disable-keyboard" to 1 if no keyboard device
>    needs to be created
>  - set "feature-disable-pointer" to 1 if no pointer device
>    needs to be created
> Keep old behavior by default.
> 
> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> Suggested-by: Andrii Chepurnyi <andrii_chepurnyi@epam.com>
> Tested-by: Andrii Chepurnyi <andrii_chepurnyi@epam.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen

^ permalink raw reply

* Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public
From: Andy Shevchenko @ 2018-06-12 14:20 UTC (permalink / raw)
  To: Baoquan He
  Cc: Nicolas Pitre, brijesh.singh-5C7GfCeVMHo, devicetree,
	David Airlie, linux-pci-u79uwXL29TY76Z2rM5mHXA,
	richard.weiyang-Re5JQEeQqe8AvxtiuMwx3w, Keith Busch, Max Filippov,
	Paul Mackerras, baiyaowei-0p4V/sDNsUmm0O/7XYngnFaTQe2KTcn/,
	KY Srinivasan, Frank Rowand, Lorenzo Pieralisi, Stephen Hemminger,
	linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw, Michael Ellerman,
	Patrik Jakobsson, linux-input, Gustavo Padovan, Borislav Petkov,
	Dave Young, Tom Lendacky, Haiyang Zhang, Maarten Lankhorst
In-Reply-To: <20180612093812.GC1820@MiWiFi-R3L-srv>

On Tue, Jun 12, 2018 at 12:38 PM, Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> On 06/12/18 at 11:29am, Andy Shevchenko wrote:
>> On Tue, Jun 12, 2018 at 6:28 AM, Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:

>> > +{
>>
>> > +       for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) {
>> > +               if (p->end < res->start)
>> > +                       continue;
>> > +               if (res->end < p->start)
>> > +                       break;
>>
>> > +               if (p->start < res->start || p->end > res->end)
>> > +                       return -1;      /* not completely contained */
>>
>> Usually we are expecting real eeror codes.
>
> Hmm, I just copied it from arch/powerpc/kernel/pci-common.c. The
> function interface expects an integer returned value, not sure what a
> real error codes look like, could you give more hints? Will change
> accordingly.

I briefly looked at the code and error codes we have, so, my proposal
is one of the following
 - use -ECANCELED (not the best choice for first occurrence here,
though I can't find better)
 - use positive integers (or enum), like
  #define RES_REPARENTED 0
  #define RES_OVERLAPPED 1
  #define RES_NOCONFLICT 2


>> > +               if (firstpp == NULL)
>> > +                       firstpp = pp;
>> > +       }
>>
>> > +       if (firstpp == NULL)
>> > +               return -1;      /* didn't find any conflicting entries? */
>>
>> Ditto.

Ditto.

>>
>> > +}
>> > +EXPORT_SYMBOL(reparent_resources);

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply

* Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public
From: Andy Shevchenko @ 2018-06-12 14:24 UTC (permalink / raw)
  To: Baoquan He
  Cc: Nicolas Pitre, brijesh.singh-5C7GfCeVMHo, devicetree,
	David Airlie, linux-pci-u79uwXL29TY76Z2rM5mHXA,
	richard.weiyang-Re5JQEeQqe8AvxtiuMwx3w, Keith Busch, Max Filippov,
	Paul Mackerras, baiyaowei-0p4V/sDNsUmm0O/7XYngnFaTQe2KTcn/,
	KY Srinivasan, Frank Rowand, Lorenzo Pieralisi, Stephen Hemminger,
	linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw, Michael Ellerman,
	Patrik Jakobsson, linux-input, Gustavo Padovan, Borislav Petkov,
	Dave Young, Tom Lendacky, Haiyang Zhang, Maarten Lankhorst
In-Reply-To: <CAHp75Vf_kBLkE6v=JyOdfNoWktWEfKs7JzRP1XEc4TeuT5xqfw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Tue, Jun 12, 2018 at 5:20 PM, Andy Shevchenko
<andy.shevchenko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Tue, Jun 12, 2018 at 12:38 PM, Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>> On 06/12/18 at 11:29am, Andy Shevchenko wrote:
>>> On Tue, Jun 12, 2018 at 6:28 AM, Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>
>>> > +{
>>>
>>> > +       for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) {
>>> > +               if (p->end < res->start)
>>> > +                       continue;
>>> > +               if (res->end < p->start)
>>> > +                       break;
>>>
>>> > +               if (p->start < res->start || p->end > res->end)
>>> > +                       return -1;      /* not completely contained */
>>>
>>> Usually we are expecting real eeror codes.
>>
>> Hmm, I just copied it from arch/powerpc/kernel/pci-common.c. The
>> function interface expects an integer returned value, not sure what a
>> real error codes look like, could you give more hints? Will change
>> accordingly.
>
> I briefly looked at the code and error codes we have, so, my proposal
> is one of the following

>  - use -ECANCELED (not the best choice for first occurrence here,
> though I can't find better)

Actually -ENOTSUPP might suit the first case (although the actual
would be something like -EOVERLAP, which we don't have)

>  - use positive integers (or enum), like
>   #define RES_REPARENTED 0
>   #define RES_OVERLAPPED 1
>   #define RES_NOCONFLICT 2
>
>
>>> > +               if (firstpp == NULL)
>>> > +                       firstpp = pp;
>>> > +       }
>>>
>>> > +       if (firstpp == NULL)
>>> > +               return -1;      /* didn't find any conflicting entries? */
>>>
>>> Ditto.
>
> Ditto.
>
>>>
>>> > +}
>>> > +EXPORT_SYMBOL(reparent_resources);
>
> --
> With Best Regards,
> Andy Shevchenko



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply

* Re: [PATCH] hid: intel_ish-hid: ipc: register more pm callbacks to support hibernation
From: Jiri Kosina @ 2018-06-12 14:53 UTC (permalink / raw)
  To: Srinivas Pandruvada
  Cc: benjamin.tissoires, linux-input, linux-kernel, Even Xu
In-Reply-To: <20180611015650.51385-1-srinivas.pandruvada@linux.intel.com>

On Sun, 10 Jun 2018, Srinivas Pandruvada wrote:

> From: Even Xu <even.xu@intel.com>
> 
> Current ish driver only register resume/suspend PM callbacks which
> don't support hibernation (suspend to disk). Now use the
> SIMPLE_DEV_PM_OPS() MACRO instead of struct dev_pm_ops directly.
> The suspend and resume functions will now be used for both suspend
> to RAM and hibernation.
> 
> If power management is disable, SIMPLE_DEV_PM_OPS will do nothing,
> the suspend and resume related functions won't be used, so mark them
> as __maybe_unused to clarify that this is intended behavior, and
> remove #ifdefs for power management.

This describes details the patch does on code level, but what are the user 
observable effects? Hibernation resume doesn't fail any more? Hibernation 
is possible (and wasn't before)? Did kernel crash while trying to 
hibernate and this is the fix? Or ... ?

Thanks,

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply

* Re: [PATCH v5 2/4] resource: Use list_head to link sibling resource
From: Julia Lawall @ 2018-06-12 15:10 UTC (permalink / raw)
  Cc: brijesh.singh-5C7GfCeVMHo, thomas.lendacky-5C7GfCeVMHo,
	airlied-cv59FeDIM0c, linux-pci-u79uwXL29TY76Z2rM5mHXA,
	richard.weiyang-Re5JQEeQqe8AvxtiuMwx3w,
	keith.busch-ral2JQCrhuEAvxtiuMwx3w,
	jcmvbkbc-Re5JQEeQqe8AvxtiuMwx3w,
	baiyaowei-0p4V/sDNsUmm0O/7XYngnFaTQe2KTcn/,
	frowand.list-Re5JQEeQqe8AvxtiuMwx3w,
	lorenzo.pieralisi-5wv7dgnIgG8, sthemmin-0li6OtcxBFHby3iVrkZq2A,
	Baoquan He, linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw,
	patrik.r.jakobsson-Re5JQEeQqe8AvxtiuMwx3w,
	linux-input-u79uwXL29TY76Z2rM5mHXA,
	gustavo-THi1TnShQwVAfugRpC6u6w, dyoung-H+wXaHxf7aLQT0dZR+AlfA,
	kbuild-all-JC7UmRfGjtg, devicetree-u79uwXL29TY76Z2rM5mHXA,
	haiyangz-0li6OtcxBFHby3iVrkZq2A,
	maarten.lankhorst-VuQAYsv1563Yd54FQh9/CA,
	jglisse-H+wXaHxf7aLQT0dZR+AlfA, seanpaul-F7+t8E8rja9g9hUCZPvPmw,
	bhelgaas-hpIqsD4AKlfQT0dZR+AlfA, tglx-hfZtesqFncYOwBW4kG4KsQ,
	yinghai-DgEjT+Ai2ygdnm+yROfE0A,
	jonathan.derrick-ral2JQCrhuEAvxtiuMwx3w,
	chris-YvXeqwSYzG2sTnJN9+BGXg, monstr-pSz03upnqPeHXe+LvDLADg,
	linux-parisc-u79uwXL29TY76Z2rM5mHXA,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	ebiederm-aS9lmoZGLiVWk0Htik3J/w,
	devel-tBiZLqfeLfOHmIFyCCdPziST3g8Odh+X, linuxppc-dev

This looks wrong.  After a list iterator, the index variable points to a
dummy structure.

julia

url:    https://github.com/0day-ci/linux/commits/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180612-113600
:::::: branch date: 7 hours ago
:::::: commit date: 7 hours ago

>> kernel/resource.c:265:17-20: ERROR: invalid reference to the index variable of the iterator on line 253

# https://github.com/0day-ci/linux/commit/e906f15906750a86913ba2b1f08bad99129d3dfc
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout e906f15906750a86913ba2b1f08bad99129d3dfc
vim +265 kernel/resource.c

^1da177e4 Linus Torvalds 2005-04-16  247
5eeec0ec9 Yinghai Lu     2009-12-22  248  static void __release_child_resources(struct resource *r)
5eeec0ec9 Yinghai Lu     2009-12-22  249  {
e906f1590 Baoquan He     2018-06-12  250  	struct resource *tmp, *next;
5eeec0ec9 Yinghai Lu     2009-12-22  251  	resource_size_t size;
5eeec0ec9 Yinghai Lu     2009-12-22  252
e906f1590 Baoquan He     2018-06-12 @253  	list_for_each_entry_safe(tmp, next, &r->child, sibling) {
5eeec0ec9 Yinghai Lu     2009-12-22  254  		tmp->parent = NULL;
e906f1590 Baoquan He     2018-06-12  255  		INIT_LIST_HEAD(&tmp->sibling);
5eeec0ec9 Yinghai Lu     2009-12-22  256  		__release_child_resources(tmp);
5eeec0ec9 Yinghai Lu     2009-12-22  257
5eeec0ec9 Yinghai Lu     2009-12-22  258  		printk(KERN_DEBUG "release child resource %pR\n", tmp);
5eeec0ec9 Yinghai Lu     2009-12-22  259  		/* need to restore size, and keep flags */
5eeec0ec9 Yinghai Lu     2009-12-22  260  		size = resource_size(tmp);
5eeec0ec9 Yinghai Lu     2009-12-22  261  		tmp->start = 0;
5eeec0ec9 Yinghai Lu     2009-12-22  262  		tmp->end = size - 1;
5eeec0ec9 Yinghai Lu     2009-12-22  263  	}
e906f1590 Baoquan He     2018-06-12  264
e906f1590 Baoquan He     2018-06-12 @265  	INIT_LIST_HEAD(&tmp->child);
5eeec0ec9 Yinghai Lu     2009-12-22  266  }
5eeec0ec9 Yinghai Lu     2009-12-22  267

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

^ permalink raw reply

* Re: [PATCH] hid: intel_ish-hid: ipc: register more pm callbacks to support hibernation
From: Srinivas Pandruvada @ 2018-06-12 15:30 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: benjamin.tissoires, linux-input, linux-kernel, Even Xu
In-Reply-To: <nycvar.YFH.7.76.1806121651460.6203@cbobk.fhfr.pm>

On Tue, 2018-06-12 at 16:53 +0200, Jiri Kosina wrote:
> On Sun, 10 Jun 2018, Srinivas Pandruvada wrote:
> 
> > From: Even Xu <even.xu@intel.com>
> > 
> > Current ish driver only register resume/suspend PM callbacks which
> > don't support hibernation (suspend to disk). Now use the
> > SIMPLE_DEV_PM_OPS() MACRO instead of struct dev_pm_ops directly.
> > The suspend and resume functions will now be used for both suspend
> > to RAM and hibernation.
> > 
> > If power management is disable, SIMPLE_DEV_PM_OPS will do nothing,
> > the suspend and resume related functions won't be used, so mark
> > them
> > as __maybe_unused to clarify that this is intended behavior, and
> > remove #ifdefs for power management.
> 
> This describes details the patch does on code level, but what are the
> user 
> observable effects? Hibernation resume doesn't fail any more?
> Hibernation 
> is possible (and wasn't before)? Did kernel crash while trying to 
> hibernate and this is the fix? Or ... ?
Even,
Can you add more details and resubmit ASAP?

Basically after hiberation, the ISH can't resume properly and user may
not see sensor events (for example: screen rotation may not work).
User will not see a crash or panic or anything except the following
message in log:
hid-sensor-hub 001F:8086:22D8.0001: timeout waiting for response from 
ISHTP device 

So this is adding support for S4/hiberbation to ISH.



Thanks,
Srinivas

> 
> Thanks,
> 

^ permalink raw reply

* [PATCH] HID: wacom: Correct logical maximum Y for 2nd-gen Intuos Pro large
From: Jason Gerecke @ 2018-06-12 20:42 UTC (permalink / raw)
  To: linux-input, Jiri Kosina
  Cc: Benjamin Tissoires, Ping Cheng, Aaron Skomra, stable,
	Jason Gerecke, Jason Gerecke

The HID descriptor for the 2nd-gen Intuos Pro large (PTH-860) contains
a typo which defines an incorrect logical maximum Y value. This causes
a small portion of the bottom of the tablet to become unusable (both
because the area is below the "bottom" of the tablet and because
'wacom_wac_event' ignores out-of-range values). It also results in a
skewed aspect ratio.

To fix this, we add a quirk to 'wacom_usage_mapping' which overwrites
the data with the correct value.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
CC: stable@vger.kernel.org # v4.10+
---
 drivers/hid/wacom_sys.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index ee7a37eb159a..545986cfb978 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -395,6 +395,14 @@ static void wacom_usage_mapping(struct hid_device *hdev,
 		}
 	}
 
+	/* 2nd-generation Intuos Pro Large has incorrect Y maximum */
+	if (hdev->vendor == USB_VENDOR_ID_WACOM &&
+	    hdev->product == 0x0358 &&
+	    WACOM_PEN_FIELD(field) &&
+	    wacom_equivalent_usage(usage->hid) == HID_GD_Y) {
+		field->logical_maximum = 43200;
+	}
+
 	switch (usage->hid) {
 	case HID_GD_X:
 		features->x_max = field->logical_maximum;
-- 
2.17.1

^ permalink raw reply related

* Re: [PATCH v5 3/3] Input: xen-kbdfront - allow better run-time configuration
From: Dmitry Torokhov @ 2018-06-12 22:07 UTC (permalink / raw)
  To: Oleksandr Andrushchenko
  Cc: xen-devel, linux-input, linux-kernel, jgross, lyan,
	boris.ostrovsky, konrad.wilk, andrii_chepurnyi,
	Oleksandr Andrushchenko
In-Reply-To: <20180612074856.28451-4-andr2000@gmail.com>

On Tue, Jun 12, 2018 at 10:48:56AM +0300, Oleksandr Andrushchenko wrote:
>  
> +	if (!(with_kbd | with_ptr | with_mtouch)) {

I changed this to logical "OR" and applied, thank you.

> +		ret = -ENXIO;
> +		goto error;
> +	}
> +
>  	ret = xenkbd_connect_backend(dev, info);
>  	if (ret < 0)
>  		goto error;
> -- 
> 2.17.1
> 

-- 
Dmitry

^ permalink raw reply

* Re: [PATCH 04/10] Input: ams_delta_serio: Replace power GPIO with regulator
From: Dmitry Torokhov @ 2018-06-12 22:17 UTC (permalink / raw)
  To: Janusz Krzysztofik
  Cc: Tony Lindgren, Aaro Koskinen, David S . Miller,
	Mauro Carvalho Chehab, Greg Kroah-Hartman, Andrew Morton,
	Randy Dunlap, Liam Girdwood, Mark Brown, Linus Walleij,
	linux-arm-kernel, linux-input, linux-omap, linux-gpio,
	linux-kernel
In-Reply-To: <20180609140224.32606-4-jmkrzyszt@gmail.com>

On Sat, Jun 09, 2018 at 04:02:18PM +0200, Janusz Krzysztofik wrote:
> Modify the driver so it no longer requests and manipulates the
> "keybrd_pwr" GPIO pin but a "vcc" regulator supply instead.
> 
> For this to work with Amstrad Delta, define a regulator over the
> "keybrd_pwr" GPIO pin with the "vcc" supply for ams-delta-serio device
> and register it from the board file.  Both assign an absulute GPIO
> number to the soon depreciated .gpio member of the regulator config
> structure, and also build and register a GPIO lookup table so it is
> ready for use by the regulator driver as soon as its upcoming update
> is applied.
> 
> Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
> ---
>  arch/arm/mach-omap1/board-ams-delta.c | 63 +++++++++++++++++++++++++++++++++--
>  drivers/input/serio/ams_delta_serio.c | 27 ++++++++++-----
>  2 files changed, 79 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
> index 2119d2d3ba84..706eb2f9301d 100644
> --- a/arch/arm/mach-omap1/board-ams-delta.c
> +++ b/arch/arm/mach-omap1/board-ams-delta.c
> @@ -509,6 +509,46 @@ static struct platform_device ams_delta_serio_device = {
>  	.id		= PLATFORM_DEVID_NONE,
>  };
>  
> +static struct regulator_consumer_supply keybrd_pwr_consumers[] = {
> +	/*
> +	 * Initialize supply .dev_name with NULL.  It will be replaced
> +	 * with serio dev_name() as soon as the serio device is registered.
> +	 */
> +	REGULATOR_SUPPLY("vcc", NULL),
> +};
> +
> +static struct regulator_init_data keybrd_pwr_initdata = {
> +	.constraints		= {
> +		.valid_ops_mask		= REGULATOR_CHANGE_STATUS,
> +	},
> +	.num_consumer_supplies	= ARRAY_SIZE(keybrd_pwr_consumers),
> +	.consumer_supplies	= keybrd_pwr_consumers,
> +};
> +
> +static struct fixed_voltage_config keybrd_pwr_config = {
> +	.supply_name		= "keybrd_pwr",
> +	.microvolts		= 5000000,
> +	.gpio			= AMS_DELTA_GPIO_PIN_KEYBRD_PWR,
> +	.enable_high		= 1,
> +	.init_data		= &keybrd_pwr_initdata,
> +};
> +
> +static struct platform_device keybrd_pwr_device = {
> +	.name	= "reg-fixed-voltage",
> +	.id	= PLATFORM_DEVID_AUTO,
> +	.dev	= {
> +		.platform_data	= &keybrd_pwr_config,
> +	},
> +};
> +
> +static struct gpiod_lookup_table keybrd_pwr_gpio_table = {
> +	.table = {
> +		GPIO_LOOKUP(LATCH2_LABEL, LATCH2_PIN_KEYBRD_PWR, NULL,
> +			    GPIO_ACTIVE_HIGH),
> +		{ },
> +	},
> +};
> +
>  static struct platform_device *ams_delta_devices[] __initdata = {
>  	&latch1_gpio_device,
>  	&latch2_gpio_device,
> @@ -526,6 +566,7 @@ static struct platform_device *late_devices[] __initdata = {
>  
>  static struct gpiod_lookup_table *ams_delta_gpio_tables[] __initdata = {
>  	&ams_delta_audio_gpio_table,
> +	&keybrd_pwr_gpio_table,
>  };
>  
>  static struct gpiod_lookup_table *late_gpio_tables[] __initdata = {
> @@ -566,12 +607,30 @@ static void __init ams_delta_init(void)
>  	platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));
>  
>  	/*
> -	 * As soon as devices have been registered, assign their dev_names
> -	 * to respective GPIO lookup tables before they are added.
> +	 * As soon as regulator consumers have been registered, assign their
> +	 * dev_names to consumer supply entries of respective regulators.
> +	 */
> +	keybrd_pwr_consumers[0].dev_name =
> +			dev_name(&ams_delta_serio_device.dev);
> +
> +	/*
> +	 * Once consumer supply entries are populated with dev_names,
> +	 * register regulator devices.  At this stage only the keyboard
> +	 * power regulator has its consumer supply table fully populated.
> +	 */
> +	platform_device_register(&keybrd_pwr_device);
> +
> +	/*
> +	 * As soon as GPIO consumers have been registered, assign
> +	 * their dev_names to respective GPIO lookup tables.
>  	 */
>  	ams_delta_audio_gpio_table.dev_id =
>  			dev_name(&ams_delta_audio_device.dev);
> +	keybrd_pwr_gpio_table.dev_id = dev_name(&keybrd_pwr_device.dev);
>  
> +	/*
> +	 * Once GPIO lookup tables are populated with dev_names, register them.
> +	 */
>  	gpiod_add_lookup_tables(ams_delta_gpio_tables,
>  				ARRAY_SIZE(ams_delta_gpio_tables));
>  
> diff --git a/drivers/input/serio/ams_delta_serio.c b/drivers/input/serio/ams_delta_serio.c
> index 551a4fa73fe4..d48beab1d00d 100644
> --- a/drivers/input/serio/ams_delta_serio.c
> +++ b/drivers/input/serio/ams_delta_serio.c
> @@ -23,6 +23,7 @@
>  #include <linux/gpio.h>
>  #include <linux/irq.h>
>  #include <linux/platform_device.h>
> +#include <linux/regulator/consumer.h>
>  #include <linux/serio.h>
>  #include <linux/slab.h>
>  #include <linux/module.h>
> @@ -39,6 +40,7 @@ MODULE_LICENSE("GPL");
>  
>  struct ams_delta_serio {
>  	struct serio *serio;
> +	struct regulator *vcc;
>  };
>  
>  static int check_data(struct serio *serio, int data)
> @@ -94,16 +96,18 @@ static irqreturn_t ams_delta_serio_interrupt(int irq, void *dev_id)
>  
>  static int ams_delta_serio_open(struct serio *serio)
>  {
> -	/* enable keyboard */
> -	gpio_set_value(AMS_DELTA_GPIO_PIN_KEYBRD_PWR, 1);
> +	struct ams_delta_serio *priv = serio->port_data;
>  
> -	return 0;
> +	/* enable keyboard */
> +	return regulator_enable(priv->vcc);
>  }
>  
>  static void ams_delta_serio_close(struct serio *serio)
>  {
> +	struct ams_delta_serio *priv = serio->port_data;
> +
>  	/* disable keyboard */
> -	gpio_set_value(AMS_DELTA_GPIO_PIN_KEYBRD_PWR, 0);
> +	regulator_disable(priv->vcc);
>  }
>  
>  static const struct gpio ams_delta_gpios[] __initconst_or_module = {
> @@ -117,11 +121,6 @@ static const struct gpio ams_delta_gpios[] __initconst_or_module = {
>  		.flags	= GPIOF_DIR_IN,
>  		.label	= "serio-clock",
>  	},
> -	{
> -		.gpio	= AMS_DELTA_GPIO_PIN_KEYBRD_PWR,
> -		.flags	= GPIOF_OUT_INIT_LOW,
> -		.label	= "serio-power",
> -	},
>  	{
>  		.gpio	= AMS_DELTA_GPIO_PIN_KEYBRD_DATAOUT,
>  		.flags	= GPIOF_OUT_INIT_LOW,
> @@ -146,6 +145,16 @@ static int ams_delta_serio_init(struct platform_device *pdev)
>  		goto serio;
>  	}
>  
> +	priv->vcc = devm_regulator_get(&pdev->dev, "vcc");
> +	if (IS_ERR(priv->vcc)) {
> +		err = PTR_ERR(priv->vcc);
> +		dev_err(&pdev->dev, "regulator request failed (%d)\n", err);
> +		/* Fail softly if the regulator is not available yet */
> +		if (err == -ENODEV)
> +			err = -EPROBE_DEFER;

Hmm, if regulator is not ready yet, devm_regulator_get() should be
returning -EPROBE_DEFER already, we should not have to convert -ENODEV
to -EPROBE_DEFER...

Is it because we have_full_constraints() returns false? You might need
to add call to regulator_has_full_constraints() to your board file.

> +		goto gpio;
> +	}
> +
>  	err = request_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK),
>  			ams_delta_serio_interrupt, IRQ_TYPE_EDGE_RISING,
>  			DRIVER_NAME, priv);
> -- 
> 2.16.1
> 

Thanks.

-- 
Dmitry

^ permalink raw reply

* Re: [PATCH 09/10] Input: ams_delta_serio: use IRQ resource
From: Dmitry Torokhov @ 2018-06-12 22:21 UTC (permalink / raw)
  To: Janusz Krzysztofik
  Cc: Tony Lindgren, Aaro Koskinen, David S . Miller,
	Mauro Carvalho Chehab, Greg Kroah-Hartman, Andrew Morton,
	Randy Dunlap, Liam Girdwood, Mark Brown, Linus Walleij,
	linux-arm-kernel, linux-input, linux-omap, linux-gpio,
	linux-kernel
In-Reply-To: <20180609140224.32606-9-jmkrzyszt@gmail.com>

On Sat, Jun 09, 2018 at 04:02:23PM +0200, Janusz Krzysztofik wrote:
> The driver still obtains IRQ number from a hardcoded GPIO.  Use IRQ
> resource instead.
> 
> For this to work on Amstrad Delta, add the IRQ resource to
> ams-delta-serio platform device structure.  Obtain the IRQ number
> assigned to "keyboard_clk" GPIO pin from FIQ initialization routine.
> 
> As a benefit, the driver no longer needs to include
> <mach/board-ams-delta.h>.
> 
> Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
> ---
>  arch/arm/mach-omap1/ams-delta-fiq.c   |  8 +++++++-
>  arch/arm/mach-omap1/ams-delta-fiq.h   |  3 ++-
>  arch/arm/mach-omap1/board-ams-delta.c | 17 ++++++++++++++++-
>  drivers/input/serio/ams_delta_serio.c | 28 ++++++++++------------------
>  4 files changed, 35 insertions(+), 21 deletions(-)
> 
> diff --git a/arch/arm/mach-omap1/ams-delta-fiq.c b/arch/arm/mach-omap1/ams-delta-fiq.c
> index e72935034d42..e9d350117240 100644
> --- a/arch/arm/mach-omap1/ams-delta-fiq.c
> +++ b/arch/arm/mach-omap1/ams-delta-fiq.c
> @@ -20,6 +20,7 @@
>  #include <linux/module.h>
>  #include <linux/io.h>
>  #include <linux/platform_data/ams-delta-fiq.h>
> +#include <linux/platform_device.h>
>  
>  #include <mach/board-ams-delta.h>
>  
> @@ -84,7 +85,8 @@ static irqreturn_t deferred_fiq(int irq, void *dev_id)
>  	return IRQ_HANDLED;
>  }
>  
> -void __init ams_delta_init_fiq(struct gpio_chip *chip)
> +void __init ams_delta_init_fiq(struct gpio_chip *chip,
> +			       struct platform_device *serio)
>  {
>  	struct gpio_desc *gpiod, *data = NULL, *clk = NULL;
>  	void *fiqhandler_start;
> @@ -201,6 +203,10 @@ void __init ams_delta_init_fiq(struct gpio_chip *chip)
>  	val = omap_readl(OMAP_IH1_BASE + offset) | 1;
>  	omap_writel(val, OMAP_IH1_BASE + offset);
>  
> +	/* Initialize serio device IRQ resource */
> +	serio->resource[0].start = gpiod_to_irq(clk);
> +	serio->resource[0].end = serio->resource[0].start;
> +
>  	return;
>  
>  out_gpio:
> diff --git a/arch/arm/mach-omap1/ams-delta-fiq.h b/arch/arm/mach-omap1/ams-delta-fiq.h
> index 3f691d68aa62..fd76df3cce37 100644
> --- a/arch/arm/mach-omap1/ams-delta-fiq.h
> +++ b/arch/arm/mach-omap1/ams-delta-fiq.h
> @@ -35,7 +35,8 @@
>  #ifndef __ASSEMBLER__
>  extern unsigned char qwerty_fiqin_start, qwerty_fiqin_end;
>  
> -extern void __init ams_delta_init_fiq(struct gpio_chip *chip);
> +extern void __init ams_delta_init_fiq(struct gpio_chip *chip,
> +				      struct platform_device *pdev);
>  #endif
>  
>  #endif
> diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
> index fe9a3e7cbfeb..84177ba3e39a 100644
> --- a/arch/arm/mach-omap1/board-ams-delta.c
> +++ b/arch/arm/mach-omap1/board-ams-delta.c
> @@ -504,9 +504,24 @@ static struct platform_device cx20442_codec_device = {
>  	.id     = -1,
>  };
>  
> +static struct resource ams_delta_serio_resources[] = {
> +	{
> +		.flags	= IORESOURCE_IRQ,
> +		/*
> +		 * Initialize IRQ resource with invalid IRQ number.
> +		 * It will be replaced with dynamically allocated GPIO IRQ
> +		 * obtained from GPIO chip as soon as the chip is available.
> +		 */
> +		.start	= -EINVAL,
> +		.end	= -EINVAL,
> +	},
> +};
> +
>  static struct platform_device ams_delta_serio_device = {
>  	.name		= "ams-delta-serio",
>  	.id		= PLATFORM_DEVID_NONE,
> +	.num_resources	= ARRAY_SIZE(ams_delta_serio_resources),
> +	.resource	= ams_delta_serio_resources,
>  };
>  
>  static struct regulator_consumer_supply keybrd_pwr_consumers[] = {
> @@ -615,7 +630,7 @@ static void __init omap_gpio_deps_init(void)
>  		return;
>  	}
>  
> -	ams_delta_init_fiq(chip);
> +	ams_delta_init_fiq(chip, &ams_delta_serio_device);
>  }
>  
>  static void __init ams_delta_init(void)
> diff --git a/drivers/input/serio/ams_delta_serio.c b/drivers/input/serio/ams_delta_serio.c
> index 5d0bd2005648..03640b171516 100644
> --- a/drivers/input/serio/ams_delta_serio.c
> +++ b/drivers/input/serio/ams_delta_serio.c
> @@ -20,7 +20,6 @@
>   * However, when used with the E3 mailboard that producecs non-standard
>   * scancodes, a custom key table must be prepared and loaded from userspace.
>   */
> -#include <linux/gpio.h>
>  #include <linux/irq.h>
>  #include <linux/platform_data/ams-delta-fiq.h>
>  #include <linux/platform_device.h>
> @@ -29,8 +28,6 @@
>  #include <linux/slab.h>
>  #include <linux/module.h>
>  
> -#include <mach/board-ams-delta.h>
> -
>  #define DRIVER_NAME	"ams-delta-serio"
>  
>  MODULE_AUTHOR("Matt Callow");
> @@ -113,7 +110,7 @@ static int ams_delta_serio_init(struct platform_device *pdev)
>  {
>  	struct ams_delta_serio *priv;
>  	struct serio *serio;
> -	int err;
> +	int irq, err;
>  
>  	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
>  	if (!priv)
> @@ -129,9 +126,12 @@ static int ams_delta_serio_init(struct platform_device *pdev)
>  		return err;
>  	}
>  
> -	err = request_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK),
> -			ams_delta_serio_interrupt, IRQ_TYPE_EDGE_RISING,
> -			DRIVER_NAME, priv);
> +	irq = platform_get_irq(pdev, 0);
> +	if (irq < 0)
> +		return -ENXIO;
> +
> +	err = devm_request_irq(&pdev->dev, irq, ams_delta_serio_interrupt,
> +			       IRQ_TYPE_EDGE_RISING, DRIVER_NAME, priv);
>  	if (err < 0) {
>  		dev_err(&pdev->dev, "IRQ request failed (%d)\n", err);
>  		return err;
> @@ -141,14 +141,11 @@ static int ams_delta_serio_init(struct platform_device *pdev)
>  	 * at FIQ level, switch back from edge to simple interrupt handler
>  	 * to avoid bad interaction.
>  	 */
> -	irq_set_handler(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK),
> -			handle_simple_irq);
> +	irq_set_handler(irq, handle_simple_irq);

Do we still need to do this here, or it can be moved into board file?

>  
>  	serio = kzalloc(sizeof(*serio), GFP_KERNEL);
> -	if (!serio) {
> -		err = -ENOMEM;
> -		goto irq;
> -	}
> +	if (!serio)
> +		return -ENOMEM;
>  
>  	priv->serio = serio;
>  
> @@ -167,10 +164,6 @@ static int ams_delta_serio_init(struct platform_device *pdev)
>  	dev_info(&serio->dev, "%s\n", serio->name);
>  
>  	return 0;
> -
> -irq:
> -	free_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), priv);
> -	return err;
>  }
>  
>  static int ams_delta_serio_exit(struct platform_device *pdev)
> @@ -178,7 +171,6 @@ static int ams_delta_serio_exit(struct platform_device *pdev)
>  	struct ams_delta_serio *priv = platform_get_drvdata(pdev);
>  
>  	serio_unregister_port(priv->serio);
> -	free_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), 0);
>  
>  	return 0;
>  }
> -- 
> 2.16.1
> 

-- 
Dmitry

^ permalink raw reply

* Re: [PATCH 01/10] ARM: OMAP1: ams-delta: drop GPIO lookup table for serio device
From: Dmitry Torokhov @ 2018-06-12 22:23 UTC (permalink / raw)
  To: Janusz Krzysztofik
  Cc: Tony Lindgren, Aaro Koskinen, David S . Miller,
	Mauro Carvalho Chehab, Greg Kroah-Hartman, Andrew Morton,
	Randy Dunlap, Liam Girdwood, Mark Brown, Linus Walleij,
	linux-arm-kernel, linux-input, linux-omap, linux-gpio,
	linux-kernel
In-Reply-To: <20180609140224.32606-1-jmkrzyszt@gmail.com>

Hi Janusz,

On Sat, Jun 09, 2018 at 04:02:15PM +0200, Janusz Krzysztofik wrote:
> GPIO lookup table for ams-delta-serio device was introduced by commit
> 0486738928bf ("ARM: OMAP1: ams-delta: add GPIO lookup tables").
> Unfortunately, a follow up patch "Input: ams_delta_serio: use GPIO
> lookup table" was not accepted by subystem maintainer who requested
> conversion of the driver to a platform driver, replacepemnt of IRQ GPIO
> pin with IRQ resource, replacement of GPIO pin providing keyboard power
> with a regulator and removal of remaining GPIO pins from the driver as
> not handled by it.
> 
> Let's start with removal of no the longer needed GPIO lookup table from
> the board init file.
> 
> Series created and tested on top of next-20180608 tag from linux-next
> tree.

This all is really nice (modulo a couple of questions), thank you for
implementing this. How do you want to merge this? Through OMAP tree or
input?

> 
> Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
> ---
>  arch/arm/mach-omap1/board-ams-delta.c | 19 -------------------
>  1 file changed, 19 deletions(-)
> 
> diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
> index 80f54cb54276..18e0ff437b27 100644
> --- a/arch/arm/mach-omap1/board-ams-delta.c
> +++ b/arch/arm/mach-omap1/board-ams-delta.c
> @@ -504,20 +504,6 @@ static struct platform_device cx20442_codec_device = {
>  	.id     = -1,
>  };
>  
> -static struct gpiod_lookup_table ams_delta_serio_gpio_table = {
> -	.table = {
> -		GPIO_LOOKUP(OMAP_GPIO_LABEL, AMS_DELTA_GPIO_PIN_KEYBRD_DATA,
> -			    "data", 0),
> -		GPIO_LOOKUP(OMAP_GPIO_LABEL, AMS_DELTA_GPIO_PIN_KEYBRD_CLK,
> -			    "clock", 0),
> -		GPIO_LOOKUP(LATCH2_LABEL, LATCH2_PIN_KEYBRD_PWR,
> -			    "power", 0),
> -		GPIO_LOOKUP(LATCH2_LABEL, LATCH2_PIN_KEYBRD_DATAOUT,
> -			    "dataout", 0),
> -		{ },
> -	},
> -};
> -
>  static struct platform_device *ams_delta_devices[] __initdata = {
>  	&latch1_gpio_device,
>  	&latch2_gpio_device,
> @@ -534,7 +520,6 @@ static struct platform_device *late_devices[] __initdata = {
>  
>  static struct gpiod_lookup_table *ams_delta_gpio_tables[] __initdata = {
>  	&ams_delta_audio_gpio_table,
> -	&ams_delta_serio_gpio_table,
>  };
>  
>  static struct gpiod_lookup_table *late_gpio_tables[] __initdata = {
> @@ -580,10 +565,6 @@ static void __init ams_delta_init(void)
>  	 */
>  	ams_delta_audio_gpio_table.dev_id =
>  			dev_name(&ams_delta_audio_device.dev);
> -	/*
> -	 * No device name is assigned to GPIO lookup table for serio device
> -	 * as long as serio driver is not converted to platform device driver.
> -	 */
>  
>  	gpiod_add_lookup_tables(ams_delta_gpio_tables,
>  				ARRAY_SIZE(ams_delta_gpio_tables));
> -- 
> 2.16.1
> 

-- 
Dmitry

^ 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