linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] Input: drivers/joystick: use parallel port device model
@ 2015-08-04 14:25 Sudip Mukherjee
  2015-08-08 10:35 ` Sudip Mukherjee
  0 siblings, 1 reply; 13+ messages in thread
From: Sudip Mukherjee @ 2015-08-04 14:25 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, linux-input, Sudip Mukherjee

Modify db9 driver to use the new Parallel Port device model.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---

v2: an extra check was removed. db9_base could not be removed. Already
mailed you the reasons, reference is at:
https://lkml.org/lkml/2015/8/3/403

 drivers/input/joystick/db9.c | 110 ++++++++++++++++++++++---------------------
 1 file changed, 56 insertions(+), 54 deletions(-)

diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c
index 8e7de5c..e457e10 100644
--- a/drivers/input/joystick/db9.c
+++ b/drivers/input/joystick/db9.c
@@ -48,7 +48,7 @@ struct db9_config {
 };
 
 #define DB9_MAX_PORTS		3
-static struct db9_config db9_cfg[DB9_MAX_PORTS] __initdata;
+static struct db9_config db9_cfg[DB9_MAX_PORTS];
 
 module_param_array_named(dev, db9_cfg[0].args, int, &db9_cfg[0].nargs, 0);
 MODULE_PARM_DESC(dev, "Describes first attached device (<parport#>,<type>)");
@@ -106,6 +106,7 @@ struct db9 {
 	struct pardevice *pd;
 	int mode;
 	int used;
+	int parportno;
 	struct mutex mutex;
 	char phys[DB9_MAX_DEVICES][32];
 };
@@ -553,54 +554,60 @@ static void db9_close(struct input_dev *dev)
 	mutex_unlock(&db9->mutex);
 }
 
-static struct db9 __init *db9_probe(int parport, int mode)
+static void db9_attach(struct parport *pp)
 {
 	struct db9 *db9;
 	const struct db9_mode_data *db9_mode;
-	struct parport *pp;
 	struct pardevice *pd;
 	struct input_dev *input_dev;
 	int i, j;
-	int err;
+	int mode;
+	struct pardev_cb db9_parport_cb;
+
+	for (i = 0; i < DB9_MAX_PORTS; i++) {
+		if (db9_cfg[i].nargs == 0 ||
+		    db9_cfg[i].args[DB9_ARG_PARPORT] < 0)
+			continue;
+
+		if (db9_cfg[i].args[DB9_ARG_PARPORT] == pp->number)
+			break;
+	}
+
+	if (i == DB9_MAX_PORTS) {
+		pr_debug("Not using parport%d.\n", pp->number);
+		return;
+	}
+
+	mode = db9_cfg[i].args[DB9_ARG_MODE];
 
 	if (mode < 1 || mode >= DB9_MAX_PAD || !db9_modes[mode].n_buttons) {
 		printk(KERN_ERR "db9.c: Bad device type %d\n", mode);
-		err = -EINVAL;
-		goto err_out;
+		return;
 	}
 
 	db9_mode = &db9_modes[mode];
 
-	pp = parport_find_number(parport);
-	if (!pp) {
-		printk(KERN_ERR "db9.c: no such parport\n");
-		err = -ENODEV;
-		goto err_out;
-	}
-
 	if (db9_mode->bidirectional && !(pp->modes & PARPORT_MODE_TRISTATE)) {
 		printk(KERN_ERR "db9.c: specified parport is not bidirectional\n");
-		err = -EINVAL;
-		goto err_put_pp;
+		return;
 	}
 
-	pd = parport_register_device(pp, "db9", NULL, NULL, NULL, PARPORT_DEV_EXCL, NULL);
+	db9_parport_cb.flags = PARPORT_FLAG_EXCL;
+
+	pd = parport_register_dev_model(pp, "db9", &db9_parport_cb, i);
 	if (!pd) {
 		printk(KERN_ERR "db9.c: parport busy already - lp.o loaded?\n");
-		err = -EBUSY;
-		goto err_put_pp;
+		return;
 	}
 
 	db9 = kzalloc(sizeof(struct db9), GFP_KERNEL);
-	if (!db9) {
-		printk(KERN_ERR "db9.c: Not enough memory\n");
-		err = -ENOMEM;
+	if (!db9)
 		goto err_unreg_pardev;
-	}
 
 	mutex_init(&db9->mutex);
 	db9->pd = pd;
 	db9->mode = mode;
+	db9->parportno = pp->number;
 	init_timer(&db9->timer);
 	db9->timer.data = (long) db9;
 	db9->timer.function = db9_timer;
@@ -610,7 +617,6 @@ static struct db9 __init *db9_probe(int parport, int mode)
 		db9->dev[i] = input_dev = input_allocate_device();
 		if (!input_dev) {
 			printk(KERN_ERR "db9.c: Not enough memory for input device\n");
-			err = -ENOMEM;
 			goto err_unreg_devs;
 		}
 
@@ -639,13 +645,12 @@ static struct db9 __init *db9_probe(int parport, int mode)
 				input_set_abs_params(input_dev, db9_abs[j], 1, 255, 0, 0);
 		}
 
-		err = input_register_device(input_dev);
-		if (err)
+		if (input_register_device(input_dev))
 			goto err_free_dev;
 	}
 
-	parport_put_port(pp);
-	return db9;
+	db9_base[i] = db9;
+	return;
 
  err_free_dev:
 	input_free_device(db9->dev[i]);
@@ -655,15 +660,22 @@ static struct db9 __init *db9_probe(int parport, int mode)
 	kfree(db9);
  err_unreg_pardev:
 	parport_unregister_device(pd);
- err_put_pp:
-	parport_put_port(pp);
- err_out:
-	return ERR_PTR(err);
 }
 
-static void db9_remove(struct db9 *db9)
+static void db9_detach(struct parport *port)
 {
 	int i;
+	struct db9 *db9;
+
+	for (i = 0; i < DB9_MAX_PORTS; i++) {
+		if (db9_base[i] && db9_base[i]->parportno == port->number)
+			break;
+	}
+
+	if (i == DB9_MAX_PORTS)
+		return;
+
+	db9 = db9_base[i];
 
 	for (i = 0; i < min(db9_modes[db9->mode].n_pads, DB9_MAX_DEVICES); i++)
 		input_unregister_device(db9->dev[i]);
@@ -671,11 +683,17 @@ static void db9_remove(struct db9 *db9)
 	kfree(db9);
 }
 
+static struct parport_driver db9_parport_driver = {
+	.name = "db9",
+	.match_port = db9_attach,
+	.detach = db9_detach,
+	.devmodel = true,
+};
+
 static int __init db9_init(void)
 {
 	int i;
 	int have_dev = 0;
-	int err = 0;
 
 	for (i = 0; i < DB9_MAX_PORTS; i++) {
 		if (db9_cfg[i].nargs == 0 || db9_cfg[i].args[DB9_ARG_PARPORT] < 0)
@@ -683,37 +701,21 @@ static int __init db9_init(void)
 
 		if (db9_cfg[i].nargs < 2) {
 			printk(KERN_ERR "db9.c: Device type must be specified.\n");
-			err = -EINVAL;
-			break;
-		}
-
-		db9_base[i] = db9_probe(db9_cfg[i].args[DB9_ARG_PARPORT],
-					db9_cfg[i].args[DB9_ARG_MODE]);
-		if (IS_ERR(db9_base[i])) {
-			err = PTR_ERR(db9_base[i]);
-			break;
+			return -EINVAL;
 		}
 
 		have_dev = 1;
 	}
 
-	if (err) {
-		while (--i >= 0)
-			if (db9_base[i])
-				db9_remove(db9_base[i]);
-		return err;
-	}
+	if (!have_dev)
+		return -ENODEV;
 
-	return have_dev ? 0 : -ENODEV;
+	return parport_register_driver(&db9_parport_driver);
 }
 
 static void __exit db9_exit(void)
 {
-	int i;
-
-	for (i = 0; i < DB9_MAX_PORTS; i++)
-		if (db9_base[i])
-			db9_remove(db9_base[i]);
+	parport_unregister_driver(&db9_parport_driver);
 }
 
 module_init(db9_init);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] Input: drivers/joystick: use parallel port device model
  2015-08-04 14:25 [PATCH v2] Input: drivers/joystick: use parallel port device model Sudip Mukherjee
@ 2015-08-08 10:35 ` Sudip Mukherjee
  2015-08-13 13:46   ` Sudip Mukherjee
  0 siblings, 1 reply; 13+ messages in thread
From: Sudip Mukherjee @ 2015-08-08 10:35 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, linux-input, gregkh

On Tue, Aug 04, 2015 at 07:55:51PM +0530, Sudip Mukherjee wrote:
> Modify db9 driver to use the new Parallel Port device model.
> 
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
> 
> v2: an extra check was removed. db9_base could not be removed. Already
> mailed you the reasons, reference is at:
> https://lkml.org/lkml/2015/8/3/403

Hi Dmitry,
I was telling you on the other thread that to remove db9_base we will
need to modify the parport code and then it has to be tested by everyone
again and that will also change the old behaviour of parport. The v2 to
which I am replying now is still having that db9_base.

Please see the following patch, this is the minimum change required to
update db9 driver. Personally I donot like this approach as in this
method if a parallel port is hotplugged after this driver is loaded then
it will not work. Please let me know your views on the posted v2 and
also on the following proposal.

regards
sudip


diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c
index 8e7de5c..348e7d2 100644
--- a/drivers/input/joystick/db9.c
+++ b/drivers/input/joystick/db9.c
@@ -553,7 +553,7 @@ static void db9_close(struct input_dev *dev)
 	mutex_unlock(&db9->mutex);
 }
 
-static struct db9 __init *db9_probe(int parport, int mode)
+static struct db9 __init *db9_probe(int parport, int mode, int cnt)
 {
 	struct db9 *db9;
 	const struct db9_mode_data *db9_mode;
@@ -562,6 +562,7 @@ static struct db9 __init *db9_probe(int parport, int mode)
 	struct input_dev *input_dev;
 	int i, j;
 	int err;
+	struct pardev_cb db9_parport_cb;
 
 	if (mode < 1 || mode >= DB9_MAX_PAD || !db9_modes[mode].n_buttons) {
 		printk(KERN_ERR "db9.c: Bad device type %d\n", mode);
@@ -584,7 +585,9 @@ static struct db9 __init *db9_probe(int parport, int mode)
 		goto err_put_pp;
 	}
 
-	pd = parport_register_device(pp, "db9", NULL, NULL, NULL, PARPORT_DEV_EXCL, NULL);
+	db9_parport_cb.flags = PARPORT_FLAG_EXCL;
+
+	pd = parport_register_dev_model(pp, "db9", &db9_parport_cb, cnt);
 	if (!pd) {
 		printk(KERN_ERR "db9.c: parport busy already - lp.o loaded?\n");
 		err = -EBUSY;
@@ -671,11 +674,19 @@ static void db9_remove(struct db9 *db9)
 	kfree(db9);
 }
 
+static struct parport_driver db9_parport_driver = {
+	.name = "db9",
+	.devmodel = true,
+};
+
 static int __init db9_init(void)
 {
 	int i;
 	int have_dev = 0;
-	int err = 0;
+	int err = parport_register_driver(&db9_parport_driver);
+
+	if (err)
+		return err;
 
 	for (i = 0; i < DB9_MAX_PORTS; i++) {
 		if (db9_cfg[i].nargs == 0 || db9_cfg[i].args[DB9_ARG_PARPORT] < 0)
@@ -688,7 +699,7 @@ static int __init db9_init(void)
 		}
 
 		db9_base[i] = db9_probe(db9_cfg[i].args[DB9_ARG_PARPORT],
-					db9_cfg[i].args[DB9_ARG_MODE]);
+					db9_cfg[i].args[DB9_ARG_MODE], i);
 		if (IS_ERR(db9_base[i])) {
 			err = PTR_ERR(db9_base[i]);
 			break;
@@ -701,10 +712,15 @@ static int __init db9_init(void)
 		while (--i >= 0)
 			if (db9_base[i])
 				db9_remove(db9_base[i]);
+		parport_unregister_driver(&db9_parport_driver);
 		return err;
 	}
 
-	return have_dev ? 0 : -ENODEV;
+	if (have_dev)
+		return 0;
+
+	parport_unregister_driver(&db9_parport_driver);
+	return -ENODEV;
 }
 
 static void __exit db9_exit(void)
@@ -714,6 +730,7 @@ static void __exit db9_exit(void)
 	for (i = 0; i < DB9_MAX_PORTS; i++)
 		if (db9_base[i])
 			db9_remove(db9_base[i]);
+	parport_unregister_driver(&db9_parport_driver);
 }
 
 module_init(db9_init);


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] Input: drivers/joystick: use parallel port device model
  2015-08-08 10:35 ` Sudip Mukherjee
@ 2015-08-13 13:46   ` Sudip Mukherjee
  2015-08-13 16:26     ` Dmitry Torokhov
  0 siblings, 1 reply; 13+ messages in thread
From: Sudip Mukherjee @ 2015-08-13 13:46 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, linux-input, gregkh

On Sat, Aug 08, 2015 at 04:05:15PM +0530, Sudip Mukherjee wrote:
> On Tue, Aug 04, 2015 at 07:55:51PM +0530, Sudip Mukherjee wrote:
> > Modify db9 driver to use the new Parallel Port device model.
> > 
> > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> > ---
> > 
> > v2: an extra check was removed. db9_base could not be removed. Already
> > mailed you the reasons, reference is at:
> > https://lkml.org/lkml/2015/8/3/403
> 
> Hi Dmitry,
> I was telling you on the other thread that to remove db9_base we will
> need to modify the parport code and then it has to be tested by everyone
> again and that will also change the old behaviour of parport. The v2 to
> which I am replying now is still having that db9_base.
> 
> Please see the following patch, this is the minimum change required to
> update db9 driver. Personally I donot like this approach as in this
> method if a parallel port is hotplugged after this driver is loaded then
> it will not work. Please let me know your views on the posted v2 and
> also on the following proposal.

Hi Dmitry,
Did you have a chance to look at this?
Pali Rohár has the hardware and he is ready to test it.

regards
sudip


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] Input: drivers/joystick: use parallel port device model
  2015-08-13 13:46   ` Sudip Mukherjee
@ 2015-08-13 16:26     ` Dmitry Torokhov
  2015-08-14  6:55       ` Sudip Mukherjee
  0 siblings, 1 reply; 13+ messages in thread
From: Dmitry Torokhov @ 2015-08-13 16:26 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: linux-kernel, linux-input, gregkh

On Thu, Aug 13, 2015 at 07:16:14PM +0530, Sudip Mukherjee wrote:
> On Sat, Aug 08, 2015 at 04:05:15PM +0530, Sudip Mukherjee wrote:
> > On Tue, Aug 04, 2015 at 07:55:51PM +0530, Sudip Mukherjee wrote:
> > > Modify db9 driver to use the new Parallel Port device model.
> > > 
> > > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> > > ---
> > > 
> > > v2: an extra check was removed. db9_base could not be removed. Already
> > > mailed you the reasons, reference is at:
> > > https://lkml.org/lkml/2015/8/3/403
> > 
> > Hi Dmitry,
> > I was telling you on the other thread that to remove db9_base we will
> > need to modify the parport code and then it has to be tested by everyone
> > again and that will also change the old behaviour of parport. The v2 to
> > which I am replying now is still having that db9_base.
> > 
> > Please see the following patch, this is the minimum change required to
> > update db9 driver. Personally I donot like this approach as in this
> > method if a parallel port is hotplugged after this driver is loaded then
> > it will not work. Please let me know your views on the posted v2 and
> > also on the following proposal.
> 
> Hi Dmitry,
> Did you have a chance to look at this?

Right, so I agree that we should allow for hotplug and so the v2 is in
that sense is better than v3.

I still would prefer for the core to keep track of relationship between
devices and drivers, but if you would prefer to postpone implementing it
that woudl be fine.

> Pali Rohár has the hardware and he is ready to test it.

Pali, could you give the v2 version of the patch a spin
(https://patchwork.kernel.org/patch/6940321/)?

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] Input: drivers/joystick: use parallel port device model
  2015-08-13 16:26     ` Dmitry Torokhov
@ 2015-08-14  6:55       ` Sudip Mukherjee
  2015-08-14  7:05         ` Pali Rohár
  2015-09-28 16:40         ` Pali Rohár
  0 siblings, 2 replies; 13+ messages in thread
From: Sudip Mukherjee @ 2015-08-14  6:55 UTC (permalink / raw)
  To: Dmitry Torokhov, pali.rohar; +Cc: linux-kernel, linux-input, gregkh

On Thu, Aug 13, 2015 at 09:26:02AM -0700, Dmitry Torokhov wrote:
> On Thu, Aug 13, 2015 at 07:16:14PM +0530, Sudip Mukherjee wrote:
> > On Sat, Aug 08, 2015 at 04:05:15PM +0530, Sudip Mukherjee wrote:
> > > On Tue, Aug 04, 2015 at 07:55:51PM +0530, Sudip Mukherjee wrote:
> > > > Modify db9 driver to use the new Parallel Port device model.
> > > > 
> > > > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> > > > ---
> > > > 
> > > > v2: an extra check was removed. db9_base could not be removed. Already
> > > > mailed you the reasons, reference is at:
> > > > https://lkml.org/lkml/2015/8/3/403
> > > 
> > > Hi Dmitry,
> > > I was telling you on the other thread that to remove db9_base we will
> > > need to modify the parport code and then it has to be tested by everyone
> > > again and that will also change the old behaviour of parport. The v2 to
> > > which I am replying now is still having that db9_base.
> > > 
> > > Please see the following patch, this is the minimum change required to
> > > update db9 driver. Personally I donot like this approach as in this
> > > method if a parallel port is hotplugged after this driver is loaded then
> > > it will not work. Please let me know your views on the posted v2 and
> > > also on the following proposal.
> > 
> > Hi Dmitry,
> > Did you have a chance to look at this?
> 
> Right, so I agree that we should allow for hotplug and so the v2 is in
> that sense is better than v3.
> 
> I still would prefer for the core to keep track of relationship between
> devices and drivers, but if you would prefer to postpone implementing it
> that woudl be fine.
Thanks. Right now the code is already a mixture of the new code and the
old code and its almost a mess. After all drivers are converted and the
old code removed then the parport code will become much simpler than
what it is now. And it will be easy to make those enhancements at that
time.
> 
> > Pali Rohár has the hardware and he is ready to test it.
> 
> Pali, could you give the v2 version of the patch a spin
> (https://patchwork.kernel.org/patch/6940321/)?
Adding Pali to the cc list.

Hi Pali,
Are you still away from your desktop with the joystick? or can it be
tested?

regards
sudip

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] Input: drivers/joystick: use parallel port device model
  2015-08-14  6:55       ` Sudip Mukherjee
@ 2015-08-14  7:05         ` Pali Rohár
  2015-08-17  7:29           ` Sudip Mukherjee
  2015-09-28 16:40         ` Pali Rohár
  1 sibling, 1 reply; 13+ messages in thread
From: Pali Rohár @ 2015-08-14  7:05 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: Dmitry Torokhov, linux-kernel, linux-input, gregkh

On Friday 14 August 2015 12:25:42 Sudip Mukherjee wrote:
> On Thu, Aug 13, 2015 at 09:26:02AM -0700, Dmitry Torokhov wrote:
> > On Thu, Aug 13, 2015 at 07:16:14PM +0530, Sudip Mukherjee wrote:
> > > Pali Rohár has the hardware and he is ready to test it.
> > 
> > Pali, could you give the v2 version of the patch a spin
> > (https://patchwork.kernel.org/patch/6940321/)?
> Adding Pali to the cc list.
> 
> Hi Pali,
> Are you still away from your desktop with the joystick? or can it be
> tested?
> 
> regards
> sudip

Yes, I'm still away from desktop with joystick... First I need to know
against which kernel version can be that patch tested? I remember that
v1 applied correctly against ubuntu's default 3.13 (which is installed
on that desktop) but driver did not compiled.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] Input: drivers/joystick: use parallel port device model
  2015-08-14  7:05         ` Pali Rohár
@ 2015-08-17  7:29           ` Sudip Mukherjee
  2015-08-31 13:44             ` Sudip Mukherjee
  0 siblings, 1 reply; 13+ messages in thread
From: Sudip Mukherjee @ 2015-08-17  7:29 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Dmitry Torokhov, linux-kernel, linux-input, gregkh

On Fri, Aug 14, 2015 at 09:05:55AM +0200, Pali Rohár wrote:
> On Friday 14 August 2015 12:25:42 Sudip Mukherjee wrote:
> > On Thu, Aug 13, 2015 at 09:26:02AM -0700, Dmitry Torokhov wrote:
> > > On Thu, Aug 13, 2015 at 07:16:14PM +0530, Sudip Mukherjee wrote:
> > > > Pali Rohár has the hardware and he is ready to test it.
> > > 
> > > Pali, could you give the v2 version of the patch a spin
> > > (https://patchwork.kernel.org/patch/6940321/)?
> > Adding Pali to the cc list.
> > 
> > Hi Pali,
> > Are you still away from your desktop with the joystick? or can it be
> > tested?
> > 
> > regards
> > sudip
> 
> Yes, I'm still away from desktop with joystick... First I need to know
> against which kernel version can be that patch tested? I remember that
> v1 applied correctly against ubuntu's default 3.13 (which is installed
> on that desktop) but driver did not compiled.

Sorry for the delay in replying. The change in parallel port code was
merged in 4.2, so you can test it againt 4.2-rc*.

regards
sudip

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] Input: drivers/joystick: use parallel port device model
  2015-08-17  7:29           ` Sudip Mukherjee
@ 2015-08-31 13:44             ` Sudip Mukherjee
  2015-08-31 13:55               ` Pali Rohár
  0 siblings, 1 reply; 13+ messages in thread
From: Sudip Mukherjee @ 2015-08-31 13:44 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Dmitry Torokhov, linux-kernel, linux-input, gregkh

On Mon, Aug 17, 2015 at 12:59:34PM +0530, Sudip Mukherjee wrote:
> On Fri, Aug 14, 2015 at 09:05:55AM +0200, Pali Rohár wrote:
> > On Friday 14 August 2015 12:25:42 Sudip Mukherjee wrote:
> > > On Thu, Aug 13, 2015 at 09:26:02AM -0700, Dmitry Torokhov wrote:
> > > > On Thu, Aug 13, 2015 at 07:16:14PM +0530, Sudip Mukherjee wrote:
> > > > > Pali Rohár has the hardware and he is ready to test it.
> > > > 
> > > > Pali, could you give the v2 version of the patch a spin
> > > > (https://patchwork.kernel.org/patch/6940321/)?
> > > Adding Pali to the cc list.
> > > 
> > > Hi Pali,
> > > Are you still away from your desktop with the joystick? or can it be
> > > tested?
> > > 
> > > regards
> > > sudip
> > 
> > Yes, I'm still away from desktop with joystick... First I need to know
> > against which kernel version can be that patch tested? I remember that
> > v1 applied correctly against ubuntu's default 3.13 (which is installed
> > on that desktop) but driver did not compiled.
> 
> Sorry for the delay in replying. The change in parallel port code was
> merged in 4.2, so you can test it againt 4.2-rc*.
Hi Pali,
Now that 4.2 is released you can test on it. And do you also have any
option to test the other joysticks using parallel port? Because, after
you test this patch I will be sending the similar patches for other
joysticks and parkbd.

regards
sudip

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] Input: drivers/joystick: use parallel port device model
  2015-08-31 13:44             ` Sudip Mukherjee
@ 2015-08-31 13:55               ` Pali Rohár
  2015-08-31 14:45                 ` Sudip Mukherjee
  0 siblings, 1 reply; 13+ messages in thread
From: Pali Rohár @ 2015-08-31 13:55 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: Dmitry Torokhov, linux-kernel, linux-input, gregkh

On Monday 31 August 2015 19:14:19 Sudip Mukherjee wrote:
> On Mon, Aug 17, 2015 at 12:59:34PM +0530, Sudip Mukherjee wrote:
> > On Fri, Aug 14, 2015 at 09:05:55AM +0200, Pali Rohár wrote:
> > > On Friday 14 August 2015 12:25:42 Sudip Mukherjee wrote:
> > > > On Thu, Aug 13, 2015 at 09:26:02AM -0700, Dmitry Torokhov wrote:
> > > > > On Thu, Aug 13, 2015 at 07:16:14PM +0530, Sudip Mukherjee wrote:
> > > > > > Pali Rohár has the hardware and he is ready to test it.
> > > > > 
> > > > > Pali, could you give the v2 version of the patch a spin
> > > > > (https://patchwork.kernel.org/patch/6940321/)?
> > > > Adding Pali to the cc list.
> > > > 
> > > > Hi Pali,
> > > > Are you still away from your desktop with the joystick? or can it be
> > > > tested?
> > > > 
> > > > regards
> > > > sudip
> > > 
> > > Yes, I'm still away from desktop with joystick... First I need to know
> > > against which kernel version can be that patch tested? I remember that
> > > v1 applied correctly against ubuntu's default 3.13 (which is installed
> > > on that desktop) but driver did not compiled.
> > 
> > Sorry for the delay in replying. The change in parallel port code was
> > merged in 4.2, so you can test it againt 4.2-rc*.
> Hi Pali,
> Now that 4.2 is released you can test on it. And do you also have any
> option to test the other joysticks using parallel port? Because, after
> you test this patch I will be sending the similar patches for other
> joysticks and parkbd.
> 
> regards
> sudip

Hi! First I need to install new 4.2 kernel for testing on that machine.
It would not be easy... so you need to wait. I do not have other
joysticks so I can test only that one which uses db9.ko driver.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] Input: drivers/joystick: use parallel port device model
  2015-08-31 13:55               ` Pali Rohár
@ 2015-08-31 14:45                 ` Sudip Mukherjee
  0 siblings, 0 replies; 13+ messages in thread
From: Sudip Mukherjee @ 2015-08-31 14:45 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Dmitry Torokhov, linux-kernel, linux-input, gregkh

On Mon, Aug 31, 2015 at 03:55:58PM +0200, Pali Rohár wrote:
> > > Sorry for the delay in replying. The change in parallel port code was
> > > merged in 4.2, so you can test it againt 4.2-rc*.
> > Hi Pali,
> > Now that 4.2 is released you can test on it. And do you also have any
> > option to test the other joysticks using parallel port? Because, after
> > you test this patch I will be sending the similar patches for other
> > joysticks and parkbd.
> > 
> > regards
> > sudip
> 
> Hi! First I need to install new 4.2 kernel for testing on that machine.
> It would not be easy...
Will it be easy if I backport the parallel port patch to 3.13? maximum
chance that the parallelport patch will apply on 3.13 but I need to test
first to confirm.

regards
sudip

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] Input: drivers/joystick: use parallel port device model
  2015-08-14  6:55       ` Sudip Mukherjee
  2015-08-14  7:05         ` Pali Rohár
@ 2015-09-28 16:40         ` Pali Rohár
  2015-09-28 23:23           ` Dmitry Torokhov
  2015-09-29  7:10           ` Sudip Mukherjee
  1 sibling, 2 replies; 13+ messages in thread
From: Pali Rohár @ 2015-09-28 16:40 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: Dmitry Torokhov, linux-kernel, linux-input, gregkh

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

On Friday 14 August 2015 08:55:42 Sudip Mukherjee wrote:
> > > Pali Rohár has the hardware and he is ready to test it.
> > 
> > Pali, could you give the v2 version of the patch a spin
> > (https://patchwork.kernel.org/patch/6940321/)?
> 
> Adding Pali to the cc list.
> 
> Hi Pali,
> Are you still away from your desktop with the joystick? or can it be
> tested?
> 
> regards
> sudip

Hi all!

I'm back with testing on desktop.

Now I applied above patch on top of 4.2 kernel and patched db9.ko module 
works fine with my joystick. xserver-xorg-input-joystick still recognize 
it and works fine as pointer device.

If you are curious I have connected this model to parallel port:
https://www.c64-wiki.com/index.php/Quickshot#Quickshot_II_1983

It is identified as "Multisystem joystick", loaded with modprobe config:
options db9 dev=0,1

So now you can add my:

Tested-By: Pali Rohár <pali.rohar@gmail.com>

-- 
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	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] Input: drivers/joystick: use parallel port device model
  2015-09-28 16:40         ` Pali Rohár
@ 2015-09-28 23:23           ` Dmitry Torokhov
  2015-09-29  7:10           ` Sudip Mukherjee
  1 sibling, 0 replies; 13+ messages in thread
From: Dmitry Torokhov @ 2015-09-28 23:23 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Sudip Mukherjee, linux-kernel, linux-input, gregkh

On Mon, Sep 28, 2015 at 06:40:51PM +0200, Pali Rohár wrote:
> On Friday 14 August 2015 08:55:42 Sudip Mukherjee wrote:
> > > > Pali Rohár has the hardware and he is ready to test it.
> > > 
> > > Pali, could you give the v2 version of the patch a spin
> > > (https://patchwork.kernel.org/patch/6940321/)?
> > 
> > Adding Pali to the cc list.
> > 
> > Hi Pali,
> > Are you still away from your desktop with the joystick? or can it be
> > tested?
> > 
> > regards
> > sudip
> 
> Hi all!
> 
> I'm back with testing on desktop.
> 
> Now I applied above patch on top of 4.2 kernel and patched db9.ko module 
> works fine with my joystick. xserver-xorg-input-joystick still recognize 
> it and works fine as pointer device.
> 
> If you are curious I have connected this model to parallel port:
> https://www.c64-wiki.com/index.php/Quickshot#Quickshot_II_1983
> 
> It is identified as "Multisystem joystick", loaded with modprobe config:
> options db9 dev=0,1
> 
> So now you can add my:
> 
> Tested-By: Pali Rohár <pali.rohar@gmail.com>

Applied, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] Input: drivers/joystick: use parallel port device model
  2015-09-28 16:40         ` Pali Rohár
  2015-09-28 23:23           ` Dmitry Torokhov
@ 2015-09-29  7:10           ` Sudip Mukherjee
  1 sibling, 0 replies; 13+ messages in thread
From: Sudip Mukherjee @ 2015-09-29  7:10 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Dmitry Torokhov, linux-kernel, linux-input, gregkh

On Mon, Sep 28, 2015 at 06:40:51PM +0200, Pali Rohár wrote:
> On Friday 14 August 2015 08:55:42 Sudip Mukherjee wrote:
> > > > Pali Rohár has the hardware and he is ready to test it.
> 
> Tested-By: Pali Rohár <pali.rohar@gmail.com>
Hi Pali,
Thanks a lot for taking time to test this.

regards
sudip

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-09-29  7:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-04 14:25 [PATCH v2] Input: drivers/joystick: use parallel port device model Sudip Mukherjee
2015-08-08 10:35 ` Sudip Mukherjee
2015-08-13 13:46   ` Sudip Mukherjee
2015-08-13 16:26     ` Dmitry Torokhov
2015-08-14  6:55       ` Sudip Mukherjee
2015-08-14  7:05         ` Pali Rohár
2015-08-17  7:29           ` Sudip Mukherjee
2015-08-31 13:44             ` Sudip Mukherjee
2015-08-31 13:55               ` Pali Rohár
2015-08-31 14:45                 ` Sudip Mukherjee
2015-09-28 16:40         ` Pali Rohár
2015-09-28 23:23           ` Dmitry Torokhov
2015-09-29  7:10           ` Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).