All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: "Frédéric Danis" <frederic.danis.oss@gmail.com>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Loic Poulain" <loic.poulain@gmail.com>,
	"open list:BLUETOOTH DRIVERS" <linux-bluetooth@vger.kernel.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [RFC 1/3] serdev: Add ACPI support
Date: Thu, 7 Sep 2017 13:51:14 -0500	[thread overview]
Message-ID: <CAL_JsqJOzQ5Th_JH_gnP4s8C7=ms_RYkxbB+ooCxG3PAUZVDXA@mail.gmail.com> (raw)
In-Reply-To: <9316EE4A-6FDF-4024-9709-E44824D26B4C@holtmann.org>

On Thu, Sep 7, 2017 at 12:57 PM, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Rob,
>
>>>> Signed-off-by: Frédéric Danis <frederic.danis.oss@gmail.com>
>>>> ---
>>>> drivers/tty/serdev/core.c | 99 ++++++++++++++++++++++++++++++++++++++++++++---
>>>> 1 file changed, 94 insertions(+), 5 deletions(-)
>>
>> [...]
>>
>>>> @@ -404,9 +488,14 @@ int serdev_controller_add(struct serdev_controller *ctrl)
>>>>      if (ret)
>>>>              return ret;
>>>>
>>>> -     ret = of_serdev_register_devices(ctrl);
>>>> -     if (ret)
>>>> +     ret_of = of_serdev_register_devices(ctrl);
>>>> +     ret_acpi = acpi_serdev_register_devices(ctrl);
>>>> +     if (ret_of && ret_acpi) {
>>>> +             dev_dbg(&ctrl->dev, "serdev%d no devices registered: of:%d acpi:%d\n",
>>>> +                     ctrl->nr, ret_of, ret_acpi);
>>>> +             ret = -ENODEV;
>>>>              goto out_dev_del;
>>>> +     }
>>>>
>>>>      dev_dbg(&ctrl->dev, "serdev%d registered: dev:%p\n",
>>>>              ctrl->nr, &ctrl->dev);
>>>
>>> Shouldn’t we just consider to always register the controller? Even if there are no devices attached to it.
>>
>> You argued for the opposite at least in regards to a serdev ldisc. :)
>> The problem is we use the success or failure here to decide if we
>> create a tty char dev or not. I guess we could move that decision out
>> of the core and let the tty code check for devices and decide.
>
> we never got the serdev ldisc working. Is there still an attempt to get this working. I frankly don’t know what is best here.

I did get it somewhat working, but haven't been working on it more.
Here's what I said in my last mail to you:

> Okay, I've got this kind of working. I can run "ldattach HCI
> /dev/ttyblah" to start the LL driver (nothing attached, just tries
> firmware loading), then kill ldattach and remove the serdev device.
> And it actually works a 2nd time. I've updated my serdev-ldisc branch
> with the fixes. The real question is what have I broken in the tty
> device. At least "echo rob > /dev/ttyS1" still works (in qemu) after
> attaching and de-attaching.

I pushed out my work to serdev-ldisc-v2 branch on my k.org tree.

Rob

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: "Frédéric Danis" <frederic.danis.oss@gmail.com>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Loic Poulain" <loic.poulain@gmail.com>,
	"open list:BLUETOOTH DRIVERS" <linux-bluetooth@vger.kernel.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [RFC 1/3] serdev: Add ACPI support
Date: Thu, 7 Sep 2017 13:51:14 -0500	[thread overview]
Message-ID: <CAL_JsqJOzQ5Th_JH_gnP4s8C7=ms_RYkxbB+ooCxG3PAUZVDXA@mail.gmail.com> (raw)
In-Reply-To: <9316EE4A-6FDF-4024-9709-E44824D26B4C@holtmann.org>

On Thu, Sep 7, 2017 at 12:57 PM, Marcel Holtmann <marcel@holtmann.org> wrot=
e:
> Hi Rob,
>
>>>> Signed-off-by: Fr=C3=A9d=C3=A9ric Danis <frederic.danis.oss@gmail.com>
>>>> ---
>>>> drivers/tty/serdev/core.c | 99 +++++++++++++++++++++++++++++++++++++++=
+++++---
>>>> 1 file changed, 94 insertions(+), 5 deletions(-)
>>
>> [...]
>>
>>>> @@ -404,9 +488,14 @@ int serdev_controller_add(struct serdev_controlle=
r *ctrl)
>>>>      if (ret)
>>>>              return ret;
>>>>
>>>> -     ret =3D of_serdev_register_devices(ctrl);
>>>> -     if (ret)
>>>> +     ret_of =3D of_serdev_register_devices(ctrl);
>>>> +     ret_acpi =3D acpi_serdev_register_devices(ctrl);
>>>> +     if (ret_of && ret_acpi) {
>>>> +             dev_dbg(&ctrl->dev, "serdev%d no devices registered: of:=
%d acpi:%d\n",
>>>> +                     ctrl->nr, ret_of, ret_acpi);
>>>> +             ret =3D -ENODEV;
>>>>              goto out_dev_del;
>>>> +     }
>>>>
>>>>      dev_dbg(&ctrl->dev, "serdev%d registered: dev:%p\n",
>>>>              ctrl->nr, &ctrl->dev);
>>>
>>> Shouldn=E2=80=99t we just consider to always register the controller? E=
ven if there are no devices attached to it.
>>
>> You argued for the opposite at least in regards to a serdev ldisc. :)
>> The problem is we use the success or failure here to decide if we
>> create a tty char dev or not. I guess we could move that decision out
>> of the core and let the tty code check for devices and decide.
>
> we never got the serdev ldisc working. Is there still an attempt to get t=
his working. I frankly don=E2=80=99t know what is best here.

I did get it somewhat working, but haven't been working on it more.
Here's what I said in my last mail to you:

> Okay, I've got this kind of working. I can run "ldattach HCI
> /dev/ttyblah" to start the LL driver (nothing attached, just tries
> firmware loading), then kill ldattach and remove the serdev device.
> And it actually works a 2nd time. I've updated my serdev-ldisc branch
> with the fixes. The real question is what have I broken in the tty
> device. At least "echo rob > /dev/ttyS1" still works (in qemu) after
> attaching and de-attaching.

I pushed out my work to serdev-ldisc-v2 branch on my k.org tree.

Rob

  reply	other threads:[~2017-09-07 18:51 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07 12:10 [RFC 0/3] ACPI serdev support Frédéric Danis
2017-09-07 12:10 ` Frédéric Danis
     [not found] ` <1504786214-1866-1-git-send-email-frederic.danis.oss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-07 12:10   ` [RFC 1/3] serdev: Add ACPI support Frédéric Danis
2017-09-07 12:10     ` Frédéric Danis
2017-09-07 12:30     ` Greg KH
2017-09-07 17:15       ` Marcel Holtmann
2017-09-07 17:21     ` Marcel Holtmann
2017-09-07 17:54       ` Rob Herring
2017-09-07 17:54         ` Rob Herring
2017-09-07 17:57         ` Marcel Holtmann
2017-09-07 18:51           ` Rob Herring [this message]
2017-09-07 18:51             ` Rob Herring
2017-09-09 13:46       ` Frédéric Danis
2017-09-09 18:50         ` Marcel Holtmann
2017-09-29 12:00           ` Marcel Holtmann
2017-09-29 12:17             ` Frédéric Danis
2017-09-07 12:10   ` [RFC 2/3] ACPI / scan: Fix enumeration for special UART devices Frédéric Danis
2017-09-07 12:10     ` Frédéric Danis
2017-09-07 17:25     ` Marcel Holtmann
2017-09-09 13:46       ` Frédéric Danis
     [not found]         ` <ce2e3693-437b-1e51-61ad-3873a9e0f0f4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-09 17:24           ` Lukas Wunner
2017-09-09 17:24             ` Lukas Wunner
2017-09-09 18:49             ` Marcel Holtmann
2017-09-07 22:26     ` Lukas Wunner
2017-09-07 12:10   ` [RFC 3/3] Bluetooth: hci_bcm: Add ACPI serdev support for BCM2E39 Frédéric Danis
2017-09-07 12:10     ` Frédéric Danis
2017-09-07 17:27     ` Marcel Holtmann
     [not found]     ` <1504786214-1866-4-git-send-email-frederic.danis.oss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-02  7:07       ` [RFC,3/3] " Hans de Goede
2017-10-02  7:07         ` Hans de Goede
2017-10-02 15:26         ` Hans de Goede

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='CAL_JsqJOzQ5Th_JH_gnP4s8C7=ms_RYkxbB+ooCxG3PAUZVDXA@mail.gmail.com' \
    --to=robh@kernel.org \
    --cc=frederic.danis.oss@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=loic.poulain@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=sre@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.