devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Prashant Malani <pmalani@chromium.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Rob Herring <robh+dt@kernel.org>,
	Tobias Schramm <t.schramm@manjaro.org>,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	bleung@chromium.org
Subject: Re: PATCH 0/4] usbd: typec: fusb302: Add support for specifying supported alternate-modes through devicetree/fwnodes
Date: Fri, 3 Dec 2021 12:22:35 -0800	[thread overview]
Message-ID: <CACeCKafantM4ubxTLnge5DZLT87Pyrpc34nQrUvN1Zu1FgyVKw@mail.gmail.com> (raw)
In-Reply-To: <9a5d71ae-a571-248c-173b-7545f9f7d344@redhat.com>

Hi Hans,

On Fri, Dec 3, 2021 at 2:14 AM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Hi Prashant,
>
> On 12/2/21 20:29, Prashant Malani wrote:
> > Hi Hans,
> >
> > Sorry for posting on an old thread, but I was wondering if there was
> > still a plan to submit this? This is something we'd like to use on
> > Chrome OS too.
> >
> > It sounded like the primary discussion was whether to have an "altmodes"
> > property encaspulating the various alt modes, but not sure what the
> > final consensus on that was (sounded to me like your current
> > implementation was fine for now, and ACPI use cases would be handled
> > later?).
>
> Support for this has already landed, but so far has only been tested
> on a x86/ACPI device, where the firmware-nodes parsed by the new
> typec_port_register_altmodes() helper are setup through software-nodes,
> see:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7b458a4c5d7302947556e12c83cfe4da769665d0
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=55d8b34772e0728a224198ba605eed8cfc570aa0
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3d28466e5f4f8
>
> In theory this should be usable for devicetree as is. But that would
> require documenting the current in kernel swnode bindings as
> official devicetree bindings and getting that through the devicetree
> bindings review process.

That's good to hear :)

>
> I have deliberately not done this because the devicetree maintainers
> have asked for properties / swnode "bindings" used only inside
> the kernel (1) to NOT be documented as official devicetree bindings,
> they (the dt bindings maintainers) want to first see at least one
> real devicetree users before adding things like this to the
> official devicetree bindings docs.
>
> Note if the way typec_port_register_altmodes() parses the fwnode
> properties needs to change as result of the devicetree bindings review
> process, please let me know, because then the swnode-s created in
> drivers/platform/x86/intel/int33fe/intel_cht_int33fe_typec.c
> need to change to match so as to not regress things on those devices.

Heikki, can we reconcile this with the format you had in mind for ACPI
devices which specify this in ASL files?
If not, would you rather:
1. We handle the actual ACPI format differently in
typec_port_register_altmodes() itself ? If so, is it documented
in some place that we can reference?
<or>
2. Parse whatever ACPI format there is in the port drivers probe
function, and then inject software nodes like in the int33fe driver
[1]
<or>
3. Is there scope for updating the ACPI altmode descriptor format to
match what is being parsed by typec_port_register_altmodes()

Thanks,

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/platform/x86/intel/int33fe/intel_cht_int33fe_typec.c#n221

  reply	other threads:[~2021-12-03 20:22 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14 11:36 PATCH 0/4] usbd: typec: fusb302: Add support for specifying supported alternate-modes through devicetree/fwnodes Hans de Goede
2020-07-14 11:36 ` [PATCH 1/4] dt-bindings: usb-connector: Add support for Type-C alternate-modes Hans de Goede
2020-07-21  2:26   ` Rob Herring
2020-07-21  5:49     ` Prashant Malani
2020-07-22  7:18     ` Hans de Goede
2021-12-10 22:06       ` Prashant Malani
2020-07-14 11:36 ` [PATCH 2/4] usb: typec: Add typec_port_register_altmodes_from_fwnode() Hans de Goede
2020-07-15 16:39   ` Guenter Roeck
2020-07-15 21:14     ` Hans de Goede
2020-07-16  0:01       ` Guenter Roeck
2020-07-27 13:05   ` Heikki Krogerus
2020-08-10  7:19     ` Hans de Goede
2020-08-11 14:38       ` Heikki Krogerus
2020-08-12  8:36         ` Hans de Goede
2020-08-12 12:49           ` Heikki Krogerus
2020-08-13 14:30             ` Hans de Goede
2020-08-26 12:37             ` Hans de Goede
2020-08-26 13:06               ` Heikki Krogerus
2020-08-26 13:17   ` Heikki Krogerus
2021-04-08 18:59     ` Hans de Goede
2020-07-14 11:36 ` [PATCH 3/4] usb: typec: tcpm: Add support for altmodes Hans de Goede
2020-07-15 16:41   ` Guenter Roeck
2020-07-14 11:36 ` [PATCH 4/4] platform/x86/intel_cht_int33fe: Add displayport altmode fwnode to the connector fwnode Hans de Goede
2021-12-02 19:29 ` PATCH 0/4] usbd: typec: fusb302: Add support for specifying supported alternate-modes through devicetree/fwnodes Prashant Malani
2021-12-03 10:13   ` Hans de Goede
2021-12-03 20:22     ` Prashant Malani [this message]
2021-12-07  9:56       ` Heikki Krogerus
2021-12-07 10:04         ` 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=CACeCKafantM4ubxTLnge5DZLT87Pyrpc34nQrUvN1Zu1FgyVKw@mail.gmail.com \
    --to=pmalani@chromium.org \
    --cc=bleung@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh+dt@kernel.org \
    --cc=t.schramm@manjaro.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).