Commit 96a2d53f authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files
Vinod Koul says:

====================
phy common properties

Introduce "rx-polarity" and "tx-polarity" device tree properties
with Kunit tests (from Vladimir Oltean).

* tag 'phy_common_properties' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy:
  phy: add phy_get_rx_polarity() and phy_get_tx_polarity()
  dt-bindings: phy-common-props: RX and TX lane polarity inversion
  dt-bindings: phy-common-props: ensure protocol-names are unique
  dt-bindings: phy-common-props: create a reusable "protocol-names" definition
  dt-bindings: phy: rename transmit-amplitude.yaml to phy-common-props.yaml
====================

Link: https://patch.msgid.link/aWeXvFcGNK5T6As9@vaman


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 56787300 e7556b59
Loading
Loading
Loading
Loading
+157 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/phy/transmit-amplitude.yaml#
$id: http://devicetree.org/schemas/phy/phy-common-props.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Common PHY and network PCS transmit amplitude property
title: Common PHY and network PCS properties

description:
  Binding describing the peak-to-peak transmit amplitude for common PHYs
  and network PCSes.
  Common PHY and network PCS properties, such as peak-to-peak transmit
  amplitude.

maintainers:
  - Marek Behún <kabel@kernel.org>

properties:
  tx-p2p-microvolt:
$defs:
  protocol-names:
    description:
      Transmit amplitude voltages in microvolts, peak-to-peak. If this property
      contains multiple values for various PHY modes, the
      'tx-p2p-microvolt-names' property must be provided and contain
      corresponding mode names.

  tx-p2p-microvolt-names:
    description: |
      Names of the modes corresponding to voltages in the 'tx-p2p-microvolt'
      property. Required only if multiple voltages are provided.

      If a value of 'default' is provided, the system should use it for any PHY
      mode that is otherwise not defined here. If 'default' is not provided, the
      system should use manufacturer default value.
      Names of the PHY modes. If a value of 'default' is provided, the system
      should use it for any PHY mode that is otherwise not defined here. If
      'default' is not provided, the system should use manufacturer default value.
    minItems: 1
    maxItems: 16
    uniqueItems: true
    items:
      enum:
        - default
@@ -89,15 +80,78 @@ properties:
        - mipi-dphy-univ
        - mipi-dphy-v2.5-univ

properties:
  tx-p2p-microvolt:
    description:
      Transmit amplitude voltages in microvolts, peak-to-peak. If this property
      contains multiple values for various PHY modes, the
      'tx-p2p-microvolt-names' property must be provided and contain
      corresponding mode names.

  tx-p2p-microvolt-names:
    description:
      Names of the modes corresponding to voltages in the 'tx-p2p-microvolt'
      property. Required only if multiple voltages are provided.
    $ref: "#/$defs/protocol-names"

  rx-polarity:
    description:
      An array of values indicating whether the differential receiver's
      polarity is inverted. Each value can be one of
      PHY_POL_NORMAL (0) which means the negative signal is decoded from the
      RXN input, and the positive signal from the RXP input;
      PHY_POL_INVERT (1) which means the negative signal is decoded from the
      RXP input, and the positive signal from the RXN input;
      PHY_POL_AUTO (2) which means the receiver performs automatic polarity
      detection and correction, which is a mandatory part of link training for
      some protocols (PCIe, USB SS).

      The values are defined in <dt-bindings/phy/phy.h>. If the property is
      absent, the default value is undefined.

      Note that the RXP and RXN inputs refer to the block that this property is
      under, and do not necessarily directly translate to external pins.

      If this property contains multiple values for various protocols, the
      'rx-polarity-names' property must be provided.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 16
    items:
      enum: [0, 1, 2]

  rx-polarity-names:
    $ref: '#/$defs/protocol-names'

  tx-polarity:
    description:
      Like 'rx-polarity', except it applies to differential transmitters,
      and only the values of PHY_POL_NORMAL and PHY_POL_INVERT are possible.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 16
    items:
      enum: [0, 1]

  tx-polarity-names:
    $ref: '#/$defs/protocol-names'

dependencies:
  tx-p2p-microvolt-names: [ tx-p2p-microvolt ]
  rx-polarity-names: [ rx-polarity ]
  tx-polarity-names: [ tx-polarity ]

additionalProperties: true

examples:
  - |
    #include <dt-bindings/phy/phy.h>

    phy: phy {
      #phy-cells = <1>;
      tx-p2p-microvolt = <915000>, <1100000>, <1200000>;
      tx-p2p-microvolt-names = "2500base-x", "usb-hs", "usb-ss";
      rx-polarity = <PHY_POL_AUTO>, <PHY_POL_NORMAL>;
      rx-polarity-names = "usb-ss", "default";
      tx-polarity = <PHY_POL_INVERT>;
    };
+10 −0
Original line number Diff line number Diff line
@@ -20543,6 +20543,16 @@ L: linux-mtd@lists.infradead.org
S:	Maintained
F:	drivers/mtd/devices/phram.c
PHY COMMON PROPERTIES
M:	Vladimir Oltean <vladimir.oltean@nxp.com>
L:	netdev@vger.kernel.org
S:	Maintained
Q:	https://patchwork.kernel.org/project/netdevbpf/list/
F:	Documentation/devicetree/bindings/phy/phy-common-props.yaml
F:	drivers/phy/phy-common-props-test.c
F:	drivers/phy/phy-common-props.c
F:	include/linux/phy/phy-common-props.h
PICOLCD HID DRIVER
M:	Bruno Prémont <bonbons@linux-vserver.org>
L:	linux-input@vger.kernel.org
+22 −0
Original line number Diff line number Diff line
@@ -5,6 +5,28 @@

menu "PHY Subsystem"

config PHY_COMMON_PROPS
	bool
	help
	  This parses properties common between generic PHYs and Ethernet PHYs.

	  Select this from consumer drivers to gain access to helpers for
	  parsing properties from the
	  Documentation/devicetree/bindings/phy/phy-common-props.yaml schema.

config PHY_COMMON_PROPS_TEST
	tristate "KUnit tests for PHY common props" if !KUNIT_ALL_TESTS
	select PHY_COMMON_PROPS
	depends on KUNIT
	default KUNIT_ALL_TESTS
	help
	  This builds KUnit tests for the PHY common property API.

	  For more information on KUnit and unit tests in general,
	  please refer to the KUnit documentation in Documentation/dev-tools/kunit/.

	  When in doubt, say N.

config GENERIC_PHY
	bool "PHY Core"
	help
+2 −0
Original line number Diff line number Diff line
@@ -3,6 +3,8 @@
# Makefile for the phy drivers.
#

obj-$(CONFIG_PHY_COMMON_PROPS)		+= phy-common-props.o
obj-$(CONFIG_PHY_COMMON_PROPS_TEST)	+= phy-common-props-test.o
obj-$(CONFIG_GENERIC_PHY)		+= phy-core.o
obj-$(CONFIG_GENERIC_PHY_MIPI_DPHY)	+= phy-core-mipi-dphy.o
obj-$(CONFIG_PHY_CAN_TRANSCEIVER)	+= phy-can-transceiver.o
+422 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/*
 * phy-common-props-test.c  --  Unit tests for PHY common properties API
 *
 * Copyright 2025-2026 NXP
 */
#include <kunit/test.h>
#include <linux/property.h>
#include <linux/phy/phy-common-props.h>
#include <dt-bindings/phy/phy.h>

/* Test: rx-polarity property is missing */
static void phy_test_rx_polarity_is_missing(struct kunit *test)
{
	static const struct property_entry entries[] = {
		{}
	};
	struct fwnode_handle *node;
	unsigned int val;
	int ret;

	node = fwnode_create_software_node(entries, NULL);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);

	ret = phy_get_manual_rx_polarity(node, "sgmii", &val);
	KUNIT_EXPECT_EQ(test, ret, 0);
	KUNIT_EXPECT_EQ(test, val, PHY_POL_NORMAL);

	fwnode_remove_software_node(node);
}

/* Test: rx-polarity has more values than rx-polarity-names */
static void phy_test_rx_polarity_more_values_than_names(struct kunit *test)
{
	static const u32 rx_pol[] = { PHY_POL_NORMAL, PHY_POL_INVERT, PHY_POL_NORMAL };
	static const char * const rx_pol_names[] = { "sgmii", "2500base-x" };
	static const struct property_entry entries[] = {
		PROPERTY_ENTRY_U32_ARRAY("rx-polarity", rx_pol),
		PROPERTY_ENTRY_STRING_ARRAY("rx-polarity-names", rx_pol_names),
		{}
	};
	struct fwnode_handle *node;
	unsigned int val;
	int ret;

	node = fwnode_create_software_node(entries, NULL);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);

	ret = phy_get_manual_rx_polarity(node, "sgmii", &val);
	KUNIT_EXPECT_EQ(test, ret, -EINVAL);

	fwnode_remove_software_node(node);
}

/* Test: rx-polarity has 1 value and rx-polarity-names does not exist */
static void phy_test_rx_polarity_single_value_no_names(struct kunit *test)
{
	static const u32 rx_pol[] = { PHY_POL_INVERT };
	static const struct property_entry entries[] = {
		PROPERTY_ENTRY_U32_ARRAY("rx-polarity", rx_pol),
		{}
	};
	struct fwnode_handle *node;
	unsigned int val;
	int ret;

	node = fwnode_create_software_node(entries, NULL);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);

	ret = phy_get_manual_rx_polarity(node, "sgmii", &val);
	KUNIT_EXPECT_EQ(test, ret, 0);
	KUNIT_EXPECT_EQ(test, val, PHY_POL_INVERT);

	fwnode_remove_software_node(node);
}

/* Test: rx-polarity-names has more values than rx-polarity */
static void phy_test_rx_polarity_more_names_than_values(struct kunit *test)
{
	static const u32 rx_pol[] = { PHY_POL_NORMAL, PHY_POL_INVERT };
	static const char * const rx_pol_names[] = { "sgmii", "2500base-x", "1000base-x" };
	static const struct property_entry entries[] = {
		PROPERTY_ENTRY_U32_ARRAY("rx-polarity", rx_pol),
		PROPERTY_ENTRY_STRING_ARRAY("rx-polarity-names", rx_pol_names),
		{}
	};
	struct fwnode_handle *node;
	unsigned int val;
	int ret;

	node = fwnode_create_software_node(entries, NULL);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);

	ret = phy_get_manual_rx_polarity(node, "sgmii", &val);
	KUNIT_EXPECT_EQ(test, ret, -EINVAL);

	fwnode_remove_software_node(node);
}

/* Test: rx-polarity and rx-polarity-names have same length, find the name */
static void phy_test_rx_polarity_find_by_name(struct kunit *test)
{
	static const u32 rx_pol[] = { PHY_POL_NORMAL, PHY_POL_INVERT, PHY_POL_AUTO };
	static const char * const rx_pol_names[] = { "sgmii", "2500base-x", "usb-ss" };
	static const struct property_entry entries[] = {
		PROPERTY_ENTRY_U32_ARRAY("rx-polarity", rx_pol),
		PROPERTY_ENTRY_STRING_ARRAY("rx-polarity-names", rx_pol_names),
		{}
	};
	struct fwnode_handle *node;
	unsigned int val;
	int ret;

	node = fwnode_create_software_node(entries, NULL);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);

	ret = phy_get_manual_rx_polarity(node, "sgmii", &val);
	KUNIT_EXPECT_EQ(test, ret, 0);
	KUNIT_EXPECT_EQ(test, val, PHY_POL_NORMAL);

	ret = phy_get_manual_rx_polarity(node, "2500base-x", &val);
	KUNIT_EXPECT_EQ(test, ret, 0);
	KUNIT_EXPECT_EQ(test, val, PHY_POL_INVERT);

	ret = phy_get_rx_polarity(node, "usb-ss", BIT(PHY_POL_AUTO),
				  PHY_POL_AUTO, &val);
	KUNIT_EXPECT_EQ(test, ret, 0);
	KUNIT_EXPECT_EQ(test, val, PHY_POL_AUTO);

	fwnode_remove_software_node(node);
}

/* Test: same length, name not found, no "default" - error */
static void phy_test_rx_polarity_name_not_found_no_default(struct kunit *test)
{
	static const u32 rx_pol[] = { PHY_POL_NORMAL, PHY_POL_INVERT };
	static const char * const rx_pol_names[] = { "2500base-x", "1000base-x" };
	static const struct property_entry entries[] = {
		PROPERTY_ENTRY_U32_ARRAY("rx-polarity", rx_pol),
		PROPERTY_ENTRY_STRING_ARRAY("rx-polarity-names", rx_pol_names),
		{}
	};
	struct fwnode_handle *node;
	unsigned int val;
	int ret;

	node = fwnode_create_software_node(entries, NULL);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);

	ret = phy_get_manual_rx_polarity(node, "sgmii", &val);
	KUNIT_EXPECT_EQ(test, ret, -EINVAL);

	fwnode_remove_software_node(node);
}

/* Test: same length, name not found, but "default" exists */
static void phy_test_rx_polarity_name_not_found_with_default(struct kunit *test)
{
	static const u32 rx_pol[] = { PHY_POL_NORMAL, PHY_POL_INVERT };
	static const char * const rx_pol_names[] = { "2500base-x", "default" };
	static const struct property_entry entries[] = {
		PROPERTY_ENTRY_U32_ARRAY("rx-polarity", rx_pol),
		PROPERTY_ENTRY_STRING_ARRAY("rx-polarity-names", rx_pol_names),
		{}
	};
	struct fwnode_handle *node;
	unsigned int val;
	int ret;

	node = fwnode_create_software_node(entries, NULL);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);

	ret = phy_get_manual_rx_polarity(node, "sgmii", &val);
	KUNIT_EXPECT_EQ(test, ret, 0);
	KUNIT_EXPECT_EQ(test, val, PHY_POL_INVERT);

	fwnode_remove_software_node(node);
}

/* Test: polarity found but value is unsupported */
static void phy_test_rx_polarity_unsupported_value(struct kunit *test)
{
	static const u32 rx_pol[] = { PHY_POL_AUTO };
	static const char * const rx_pol_names[] = { "sgmii" };
	static const struct property_entry entries[] = {
		PROPERTY_ENTRY_U32_ARRAY("rx-polarity", rx_pol),
		PROPERTY_ENTRY_STRING_ARRAY("rx-polarity-names", rx_pol_names),
		{}
	};
	struct fwnode_handle *node;
	unsigned int val;
	int ret;

	node = fwnode_create_software_node(entries, NULL);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);

	ret = phy_get_manual_rx_polarity(node, "sgmii", &val);
	KUNIT_EXPECT_EQ(test, ret, -EOPNOTSUPP);

	fwnode_remove_software_node(node);
}

/* Test: tx-polarity property is missing */
static void phy_test_tx_polarity_is_missing(struct kunit *test)
{
	static const struct property_entry entries[] = {
		{}
	};
	struct fwnode_handle *node;
	unsigned int val;
	int ret;

	node = fwnode_create_software_node(entries, NULL);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);

	ret = phy_get_manual_tx_polarity(node, "sgmii", &val);
	KUNIT_EXPECT_EQ(test, ret, 0);
	KUNIT_EXPECT_EQ(test, val, PHY_POL_NORMAL);

	fwnode_remove_software_node(node);
}

/* Test: tx-polarity has more values than tx-polarity-names */
static void phy_test_tx_polarity_more_values_than_names(struct kunit *test)
{
	static const u32 tx_pol[] = { PHY_POL_NORMAL, PHY_POL_INVERT, PHY_POL_NORMAL };
	static const char * const tx_pol_names[] = { "sgmii", "2500base-x" };
	static const struct property_entry entries[] = {
		PROPERTY_ENTRY_U32_ARRAY("tx-polarity", tx_pol),
		PROPERTY_ENTRY_STRING_ARRAY("tx-polarity-names", tx_pol_names),
		{}
	};
	struct fwnode_handle *node;
	unsigned int val;
	int ret;

	node = fwnode_create_software_node(entries, NULL);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);

	ret = phy_get_manual_tx_polarity(node, "sgmii", &val);
	KUNIT_EXPECT_EQ(test, ret, -EINVAL);

	fwnode_remove_software_node(node);
}

/* Test: tx-polarity has 1 value and tx-polarity-names does not exist */
static void phy_test_tx_polarity_single_value_no_names(struct kunit *test)
{
	static const u32 tx_pol[] = { PHY_POL_INVERT };
	static const struct property_entry entries[] = {
		PROPERTY_ENTRY_U32_ARRAY("tx-polarity", tx_pol),
		{}
	};
	struct fwnode_handle *node;
	unsigned int val;
	int ret;

	node = fwnode_create_software_node(entries, NULL);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);

	ret = phy_get_manual_tx_polarity(node, "sgmii", &val);
	KUNIT_EXPECT_EQ(test, ret, 0);
	KUNIT_EXPECT_EQ(test, val, PHY_POL_INVERT);

	fwnode_remove_software_node(node);
}

/* Test: tx-polarity-names has more values than tx-polarity */
static void phy_test_tx_polarity_more_names_than_values(struct kunit *test)
{
	static const u32 tx_pol[] = { PHY_POL_NORMAL, PHY_POL_INVERT };
	static const char * const tx_pol_names[] = { "sgmii", "2500base-x", "1000base-x" };
	static const struct property_entry entries[] = {
		PROPERTY_ENTRY_U32_ARRAY("tx-polarity", tx_pol),
		PROPERTY_ENTRY_STRING_ARRAY("tx-polarity-names", tx_pol_names),
		{}
	};
	struct fwnode_handle *node;
	unsigned int val;
	int ret;

	node = fwnode_create_software_node(entries, NULL);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);

	ret = phy_get_manual_tx_polarity(node, "sgmii", &val);
	KUNIT_EXPECT_EQ(test, ret, -EINVAL);

	fwnode_remove_software_node(node);
}

/* Test: tx-polarity and tx-polarity-names have same length, find the name */
static void phy_test_tx_polarity_find_by_name(struct kunit *test)
{
	static const u32 tx_pol[] = { PHY_POL_NORMAL, PHY_POL_INVERT, PHY_POL_NORMAL };
	static const char * const tx_pol_names[] = { "sgmii", "2500base-x", "1000base-x" };
	static const struct property_entry entries[] = {
		PROPERTY_ENTRY_U32_ARRAY("tx-polarity", tx_pol),
		PROPERTY_ENTRY_STRING_ARRAY("tx-polarity-names", tx_pol_names),
		{}
	};
	struct fwnode_handle *node;
	unsigned int val;
	int ret;

	node = fwnode_create_software_node(entries, NULL);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);

	ret = phy_get_manual_tx_polarity(node, "sgmii", &val);
	KUNIT_EXPECT_EQ(test, ret, 0);
	KUNIT_EXPECT_EQ(test, val, PHY_POL_NORMAL);

	ret = phy_get_manual_tx_polarity(node, "2500base-x", &val);
	KUNIT_EXPECT_EQ(test, ret, 0);
	KUNIT_EXPECT_EQ(test, val, PHY_POL_INVERT);

	ret = phy_get_manual_tx_polarity(node, "1000base-x", &val);
	KUNIT_EXPECT_EQ(test, ret, 0);
	KUNIT_EXPECT_EQ(test, val, PHY_POL_NORMAL);

	fwnode_remove_software_node(node);
}

/* Test: same length, name not found, no "default" - error */
static void phy_test_tx_polarity_name_not_found_no_default(struct kunit *test)
{
	static const u32 tx_pol[] = { PHY_POL_NORMAL, PHY_POL_INVERT };
	static const char * const tx_pol_names[] = { "2500base-x", "1000base-x" };
	static const struct property_entry entries[] = {
		PROPERTY_ENTRY_U32_ARRAY("tx-polarity", tx_pol),
		PROPERTY_ENTRY_STRING_ARRAY("tx-polarity-names", tx_pol_names),
		{}
	};
	struct fwnode_handle *node;
	unsigned int val;
	int ret;

	node = fwnode_create_software_node(entries, NULL);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);

	ret = phy_get_manual_tx_polarity(node, "sgmii", &val);
	KUNIT_EXPECT_EQ(test, ret, -EINVAL);

	fwnode_remove_software_node(node);
}

/* Test: same length, name not found, but "default" exists */
static void phy_test_tx_polarity_name_not_found_with_default(struct kunit *test)
{
	static const u32 tx_pol[] = { PHY_POL_NORMAL, PHY_POL_INVERT };
	static const char * const tx_pol_names[] = { "2500base-x", "default" };
	static const struct property_entry entries[] = {
		PROPERTY_ENTRY_U32_ARRAY("tx-polarity", tx_pol),
		PROPERTY_ENTRY_STRING_ARRAY("tx-polarity-names", tx_pol_names),
		{}
	};
	struct fwnode_handle *node;
	unsigned int val;
	int ret;

	node = fwnode_create_software_node(entries, NULL);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);

	ret = phy_get_manual_tx_polarity(node, "sgmii", &val);
	KUNIT_EXPECT_EQ(test, ret, 0);
	KUNIT_EXPECT_EQ(test, val, PHY_POL_INVERT);

	fwnode_remove_software_node(node);
}

/* Test: polarity found but value is unsupported (AUTO for TX) */
static void phy_test_tx_polarity_unsupported_value(struct kunit *test)
{
	static const u32 tx_pol[] = { PHY_POL_AUTO };
	static const char * const tx_pol_names[] = { "sgmii" };
	static const struct property_entry entries[] = {
		PROPERTY_ENTRY_U32_ARRAY("tx-polarity", tx_pol),
		PROPERTY_ENTRY_STRING_ARRAY("tx-polarity-names", tx_pol_names),
		{}
	};
	struct fwnode_handle *node;
	unsigned int val;
	int ret;

	node = fwnode_create_software_node(entries, NULL);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);

	ret = phy_get_manual_tx_polarity(node, "sgmii", &val);
	KUNIT_EXPECT_EQ(test, ret, -EOPNOTSUPP);

	fwnode_remove_software_node(node);
}

static struct kunit_case phy_common_props_test_cases[] = {
	KUNIT_CASE(phy_test_rx_polarity_is_missing),
	KUNIT_CASE(phy_test_rx_polarity_more_values_than_names),
	KUNIT_CASE(phy_test_rx_polarity_single_value_no_names),
	KUNIT_CASE(phy_test_rx_polarity_more_names_than_values),
	KUNIT_CASE(phy_test_rx_polarity_find_by_name),
	KUNIT_CASE(phy_test_rx_polarity_name_not_found_no_default),
	KUNIT_CASE(phy_test_rx_polarity_name_not_found_with_default),
	KUNIT_CASE(phy_test_rx_polarity_unsupported_value),
	KUNIT_CASE(phy_test_tx_polarity_is_missing),
	KUNIT_CASE(phy_test_tx_polarity_more_values_than_names),
	KUNIT_CASE(phy_test_tx_polarity_single_value_no_names),
	KUNIT_CASE(phy_test_tx_polarity_more_names_than_values),
	KUNIT_CASE(phy_test_tx_polarity_find_by_name),
	KUNIT_CASE(phy_test_tx_polarity_name_not_found_no_default),
	KUNIT_CASE(phy_test_tx_polarity_name_not_found_with_default),
	KUNIT_CASE(phy_test_tx_polarity_unsupported_value),
	{}
};

static struct kunit_suite phy_common_props_test_suite = {
	.name = "phy-common-props",
	.test_cases = phy_common_props_test_cases,
};

kunit_test_suite(phy_common_props_test_suite);

MODULE_DESCRIPTION("Test module for PHY common properties API");
MODULE_AUTHOR("Vladimir Oltean <vladimir.oltean@nxp.com>");
MODULE_LICENSE("GPL");
Loading