diff mbox series

[v2,3/3] platform/x86/intel_cht_int33fe: Add displayport altmode fwnode to the connector fwnode

Message ID 20210409134033.105834-4-hdegoede@redhat.com
State New
Headers show
Series [v2,1/3] usb: typec: Add typec_port_register_altmodes() | expand

Commit Message

Hans de Goede April 9, 2021, 1:40 p.m. UTC
Add a displayport altmode fwnode to the usb-connector fwnode,
devices which use this driver support display-port altmode through
the PI3USB30532 USB switch, this enables support for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 .../platform/x86/intel_cht_int33fe_typec.c    | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Comments

Heikki Krogerus April 9, 2021, 1:46 p.m. UTC | #1
On Fri, Apr 09, 2021 at 03:40:33PM +0200, Hans de Goede wrote:
> Add a displayport altmode fwnode to the usb-connector fwnode,
> devices which use this driver support display-port altmode through
> the PI3USB30532 USB switch, this enables support for this.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  .../platform/x86/intel_cht_int33fe_typec.c    | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/drivers/platform/x86/intel_cht_int33fe_typec.c b/drivers/platform/x86/intel_cht_int33fe_typec.c
> index 48638d1c56e5..b61bad9cc8d2 100644
> --- a/drivers/platform/x86/intel_cht_int33fe_typec.c
> +++ b/drivers/platform/x86/intel_cht_int33fe_typec.c
> @@ -124,12 +124,31 @@ static const struct software_node usb_connector_node = {
>  	.properties = usb_connector_properties,
>  };
>  
> +static const struct software_node altmodes_node = {
> +	.name = "altmodes",
> +	.parent = &usb_connector_node,
> +};
> +
> +static const struct property_entry dp_altmode_properties[] = {
> +	PROPERTY_ENTRY_U32("svid", 0xff01),
> +	PROPERTY_ENTRY_U32("vdo", 0x0c0086),
> +	{ }
> +};
> +
> +static const struct software_node dp_altmode_node = {
> +	.name = "displayport-altmode",
> +	.parent = &altmodes_node,
> +	.properties = dp_altmode_properties,
> +};
> +
>  static const struct software_node *node_group[] = {
>  	&fusb302_node,
>  	&max17047_node,
>  	&pi3usb30532_node,
>  	&displayport_node,
>  	&usb_connector_node,
> +	&altmodes_node,
> +	&dp_altmode_node,
>  	NULL
>  };

thanks,
Guenter Roeck April 10, 2021, 2:13 a.m. UTC | #2
On 4/9/21 6:40 AM, Hans de Goede wrote:
> Add a displayport altmode fwnode to the usb-connector fwnode,

> devices which use this driver support display-port altmode through

> the PI3USB30532 USB switch, this enables support for this.

> 

> Signed-off-by: Hans de Goede <hdegoede@redhat.com>


Reviewed-by: Guenter Roeck <linux@roeck-us.net>


> ---

>  .../platform/x86/intel_cht_int33fe_typec.c    | 19 +++++++++++++++++++

>  1 file changed, 19 insertions(+)

> 

> diff --git a/drivers/platform/x86/intel_cht_int33fe_typec.c b/drivers/platform/x86/intel_cht_int33fe_typec.c

> index 48638d1c56e5..b61bad9cc8d2 100644

> --- a/drivers/platform/x86/intel_cht_int33fe_typec.c

> +++ b/drivers/platform/x86/intel_cht_int33fe_typec.c

> @@ -124,12 +124,31 @@ static const struct software_node usb_connector_node = {

>  	.properties = usb_connector_properties,

>  };

>  

> +static const struct software_node altmodes_node = {

> +	.name = "altmodes",

> +	.parent = &usb_connector_node,

> +};

> +

> +static const struct property_entry dp_altmode_properties[] = {

> +	PROPERTY_ENTRY_U32("svid", 0xff01),

> +	PROPERTY_ENTRY_U32("vdo", 0x0c0086),

> +	{ }

> +};

> +

> +static const struct software_node dp_altmode_node = {

> +	.name = "displayport-altmode",

> +	.parent = &altmodes_node,

> +	.properties = dp_altmode_properties,

> +};

> +

>  static const struct software_node *node_group[] = {

>  	&fusb302_node,

>  	&max17047_node,

>  	&pi3usb30532_node,

>  	&displayport_node,

>  	&usb_connector_node,

> +	&altmodes_node,

> +	&dp_altmode_node,

>  	NULL

>  };

>  

>
diff mbox series

Patch

diff --git a/drivers/platform/x86/intel_cht_int33fe_typec.c b/drivers/platform/x86/intel_cht_int33fe_typec.c
index 48638d1c56e5..b61bad9cc8d2 100644
--- a/drivers/platform/x86/intel_cht_int33fe_typec.c
+++ b/drivers/platform/x86/intel_cht_int33fe_typec.c
@@ -124,12 +124,31 @@  static const struct software_node usb_connector_node = {
 	.properties = usb_connector_properties,
 };
 
+static const struct software_node altmodes_node = {
+	.name = "altmodes",
+	.parent = &usb_connector_node,
+};
+
+static const struct property_entry dp_altmode_properties[] = {
+	PROPERTY_ENTRY_U32("svid", 0xff01),
+	PROPERTY_ENTRY_U32("vdo", 0x0c0086),
+	{ }
+};
+
+static const struct software_node dp_altmode_node = {
+	.name = "displayport-altmode",
+	.parent = &altmodes_node,
+	.properties = dp_altmode_properties,
+};
+
 static const struct software_node *node_group[] = {
 	&fusb302_node,
 	&max17047_node,
 	&pi3usb30532_node,
 	&displayport_node,
 	&usb_connector_node,
+	&altmodes_node,
+	&dp_altmode_node,
 	NULL
 };