linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH v3] serio: add support for PS2Mult multiplexer protocol
Date: Fri, 8 Oct 2010 12:50:34 +0400	[thread overview]
Message-ID: <AANLkTinBLr6ETMxBzDCZog9qLPRwUsutS=QaKDQC-sA7@mail.gmail.com> (raw)
In-Reply-To: <20101007163606.GA24406@core.coreip.homeip.net>

Hello,

On Thu, Oct 7, 2010 at 8:36 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Thu, Oct 07, 2010 at 07:19:57PM +0400, Dmitry Eremin-Solenikov wrote:
>> Hello,
>>
>> On Thu, Sep 30, 2010 at 10:25 AM, Dmitry Torokhov
>> <dmitry.torokhov@gmail.com> wrote:
>> > On Wed, Sep 29, 2010 at 04:45:53PM +0400, Dmitry Eremin-Solenikov wrote:
>> >> On Thu, Sep 23, 2010 at 8:44 PM, Dmitry Eremin-Solenikov
>> >> <dbaryshkov@gmail.com> wrote:
>> >> > PS2Mult is a simple serial protocol used for multiplexing several PS/2 streams
>> >> > into one serial data stream. It's used e.g. on TQM85xx serie of boards.
>> >> >
>> >> > Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
>> >> > ---
>> >> >
>> >> > It actually depends on "serio: multiple children" patch. I'm not resending it
>> >> > as you were the originator of the latest version of the patch.
>> >>
>> >> So, what about this version of patch?
>> >>
>> >
>> > Looks better but I think you also need ->start() to make sure you do not
>> > try to deliver events too early. Does the following still work for you?
>>
>> Sorry for the delay. Crashes w/o the attached patch.
>>
>
> Ah, I see, however what I actually wanted is to create ports before hand
> and handle any errors that might arise and then enable the device and
> register child ports.
>
> If you apply the patch below instead of yours does it still work?

It won't work, as we don't set psm->ports[i].serio before ps2mult_serio_start()

>
> Thanks.
>
> --
> Dmitry
>
> Input: ps2mult - don't register ports twice
>
> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
> ---
>
>  drivers/input/serio/ps2mult.c |   11 ++++++-----
>  1 files changed, 6 insertions(+), 5 deletions(-)
>
>
> diff --git a/drivers/input/serio/ps2mult.c b/drivers/input/serio/ps2mult.c
> index 3664398..52b58de 100644
> --- a/drivers/input/serio/ps2mult.c
> +++ b/drivers/input/serio/ps2mult.c
> @@ -144,9 +144,6 @@ static int ps2mult_create_port(struct ps2mult *psm, int i)
>        serio->parent = psm->mx_serio;
>        serio->port_data = &psm->ports[i];
>
> -       serio_register_port(serio);
> -       dev_info(&serio->dev, "%s port at %s\n", serio->name, mx_serio->phys);
> -
>        return 0;
>  }
>
> @@ -196,8 +193,12 @@ static int ps2mult_connect(struct serio *serio, struct serio_driver *drv)
>
>        ps2mult_reset(psm);
>
> -       for (i = 0; i <  PS2MULT_NUM_PORTS; i++)
> -               serio_register_port(psm->ports[i].serio);
> +       for (i = 0; i <  PS2MULT_NUM_PORTS; i++) {
> +               struct serio *s = psm->ports[i].serio;
> +
> +               dev_info(&serio->dev, "%s port at %s\n", s->name, serio->phys);
> +               serio_register_port(s);
> +       }
>
>        return 0;
>
>



-- 
With best wishes
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2010-10-08  8:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-23 16:44 [PATCH v3] serio: add support for PS2Mult multiplexer protocol Dmitry Eremin-Solenikov
2010-09-29 12:45 ` Dmitry Eremin-Solenikov
2010-09-30  6:25   ` Dmitry Torokhov
2010-10-07 15:19     ` Dmitry Eremin-Solenikov
2010-10-07 16:36       ` Dmitry Torokhov
2010-10-08  8:50         ` Dmitry Eremin-Solenikov [this message]
2010-10-14  9:43           ` Dmitry Eremin-Solenikov
2010-10-14 14:23           ` Dmitry Torokhov
2010-10-18 11:24             ` Dmitry Eremin-Solenikov
2010-10-18 15:56               ` Dmitry Torokhov
2010-10-18 16:11                 ` Dmitry Torokhov
2010-10-21 20:54                   ` Dmitry Eremin-Solenikov
2010-10-22  4:57                     ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTinBLr6ETMxBzDCZog9qLPRwUsutS=QaKDQC-sA7@mail.gmail.com' \
    --to=dbaryshkov@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).