Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1526898

Re: [RFC PATCH net v2 2/3] dt: bindings: add ethernet phy eee-disable-advert option documentation

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [RFC PATCH net v2 2/3] dt: bindings: add ethernet phy eee-disable-advert option documentation
Date 2016-11-21 17:50 +0100
Message-ID <sFZX3-3Fn-17@gated-at.bofh.it> (permalink)
References <sFYRk-2Wx-25@gated-at.bofh.it> <sFYRk-2Wx-41@gated-at.bofh.it> <sFZkr-3oh-53@gated-at.bofh.it> <sFZu1-3uU-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> What I did not realize when doing this patch for the realtek driver is
> that there is already 6 valid modes defined in the kernel
> 
> #define MDIO_EEE_100TX		MDIO_AN_EEE_ADV_100TX	/*
> 100TX EEE cap */
> #define MDIO_EEE_1000T		MDIO_AN_EEE_ADV_1000T	/*
> 1000T EEE cap */
> #define MDIO_EEE_10GT		0x0008	/* 10GT EEE cap */
> #define MDIO_EEE_1000KX		0x0010	/* 1000KX EEE cap
> */
> #define MDIO_EEE_10GKX4		0x0020	/* 10G KX4 EEE cap
> */
> #define MDIO_EEE_10GKR		0x0040	/* 10G KR EEE cap
> */
> 
> I took care of only 2 in the case of realtek.c since it only support
> MDIO_EEE_100TX and MDIO_EEE_1000T.
> 
> Defining a property for each is certainly doable but it does not look
> very nice either. If it extends in the future, it will get even more
> messier, especially if you want to disable everything.

Yes, agreed.
 
> What do you think about keeping a single mask value but use the define
> above in the DT ? It would be more readable than hex and easy to
> extend, don't you think ?
> 
> These defines are already part of the uapi so I guess we can use those
> in the DT bindings ?

I don't think they are accessible from the dtc include path. You will
need to make a copy, in include/dt-bindings/net/phy.h

But yes, using these defines is a good idea.

     Andrew

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH net v2 0/3] Fix OdroidC2 Gigabit Tx link issue Jerome Brunet <jbrunet@baylibre.com> - 2016-11-21 16:40 +0100
  [RFC PATCH net v2 2/3] dt: bindings: add ethernet phy eee-disable-advert option documentation Jerome Brunet <jbrunet@baylibre.com> - 2016-11-21 16:40 +0100
    Re: [RFC PATCH net v2 2/3] dt: bindings: add ethernet phy  eee-disable-advert option documentation Andrew Lunn <andrew@lunn.ch> - 2016-11-21 17:10 +0100
      Re: [RFC PATCH net v2 2/3] dt: bindings: add ethernet phy  eee-disable-advert option documentation Jerome Brunet <jbrunet@baylibre.com> - 2016-11-21 17:20 +0100
        Re: [RFC PATCH net v2 2/3] dt: bindings: add ethernet phy  eee-disable-advert option documentation Andrew Lunn <andrew@lunn.ch> - 2016-11-21 17:50 +0100
          Re: [RFC PATCH net v2 2/3] dt: bindings: add ethernet phy  eee-disable-advert option documentation Florian Fainelli <f.fainelli@gmail.com> - 2016-11-22 06:40 +0100
            Re: [RFC PATCH net v2 2/3] dt: bindings: add ethernet phy  eee-disable-advert option documentation Jerome Brunet <jbrunet@baylibre.com> - 2016-11-22 11:20 +0100
  [RFC PATCH net v2 3/3] ARM64: dts: meson: odroidc2: disable advertisement EEE for GbE. Jerome Brunet <jbrunet@baylibre.com> - 2016-11-21 16:50 +0100
  Re: [RFC PATCH net v2 0/3] Fix OdroidC2 Gigabit Tx link issue Martin Blumenstingl <martin.blumenstingl@googlemail.com> - 2016-11-24 15:50 +0100
    Re: [RFC PATCH net v2 0/3] Fix OdroidC2 Gigabit Tx link issue Jerome Brunet <jbrunet@baylibre.com> - 2016-11-24 17:10 +0100
      Re: [RFC PATCH net v2 0/3] Fix OdroidC2 Gigabit Tx link issue Martin Blumenstingl <martin.blumenstingl@googlemail.com> - 2016-11-24 18:30 +0100

csiph-web