Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1661590 > unrolled thread
| Started by | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| First post | 2017-06-08 21:10 +0200 |
| Last post | 2017-06-08 21:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH net-next 7/7] net: dsa: mv88e6xxx: prefix PHY macros Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-06-08 21:10 +0200
Re: [PATCH net-next 7/7] net: dsa: mv88e6xxx: prefix PHY macros Andrew Lunn <andrew@lunn.ch> - 2017-06-08 21:50 +0200
| From | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| Date | 2017-06-08 21:10 +0200 |
| Subject | [PATCH net-next 7/7] net: dsa: mv88e6xxx: prefix PHY macros |
| Message-ID | <tQaYG-8eD-17@gated-at.bofh.it> |
Prefix the PHY_* macros with a Marvell specific MV88E6XXX_ prefix.
There is no functional changes.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
drivers/net/dsa/mv88e6xxx/phy.c | 11 ++++++-----
drivers/net/dsa/mv88e6xxx/phy.h | 4 ++--
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/phy.c b/drivers/net/dsa/mv88e6xxx/phy.c
index 0db624f0993c..3500ac0ea848 100644
--- a/drivers/net/dsa/mv88e6xxx/phy.c
+++ b/drivers/net/dsa/mv88e6xxx/phy.c
@@ -62,7 +62,7 @@ int mv88e6xxx_phy_write(struct mv88e6xxx_chip *chip, int phy, int reg, u16 val)
static int mv88e6xxx_phy_page_get(struct mv88e6xxx_chip *chip, int phy, u8 page)
{
- return mv88e6xxx_phy_write(chip, phy, PHY_PAGE, page);
+ return mv88e6xxx_phy_write(chip, phy, MV88E6XXX_PHY_PAGE, page);
}
static void mv88e6xxx_phy_page_put(struct mv88e6xxx_chip *chip, int phy)
@@ -72,7 +72,8 @@ static void mv88e6xxx_phy_page_put(struct mv88e6xxx_chip *chip, int phy)
/* Restore PHY page Copper 0x0 for access via the registered
* MDIO bus
*/
- err = mv88e6xxx_phy_write(chip, phy, PHY_PAGE, PHY_PAGE_COPPER);
+ err = mv88e6xxx_phy_write(chip, phy, MV88E6XXX_PHY_PAGE,
+ MV88E6XXX_PHY_PAGE_COPPER);
if (unlikely(err)) {
dev_err(chip->dev,
"failed to restore PHY %d page Copper (%d)\n",
@@ -86,7 +87,7 @@ int mv88e6xxx_phy_page_read(struct mv88e6xxx_chip *chip, int phy,
int err;
/* There is no paging for registers 22 */
- if (reg == PHY_PAGE)
+ if (reg == MV88E6XXX_PHY_PAGE)
return -EINVAL;
err = mv88e6xxx_phy_page_get(chip, phy, page);
@@ -104,12 +105,12 @@ int mv88e6xxx_phy_page_write(struct mv88e6xxx_chip *chip, int phy,
int err;
/* There is no paging for registers 22 */
- if (reg == PHY_PAGE)
+ if (reg == MV88E6XXX_PHY_PAGE)
return -EINVAL;
err = mv88e6xxx_phy_page_get(chip, phy, page);
if (!err) {
- err = mv88e6xxx_phy_write(chip, phy, PHY_PAGE, page);
+ err = mv88e6xxx_phy_write(chip, phy, MV88E6XXX_PHY_PAGE, page);
mv88e6xxx_phy_page_put(chip, phy);
}
diff --git a/drivers/net/dsa/mv88e6xxx/phy.h b/drivers/net/dsa/mv88e6xxx/phy.h
index 4131a4e8206a..556b74a0502a 100644
--- a/drivers/net/dsa/mv88e6xxx/phy.h
+++ b/drivers/net/dsa/mv88e6xxx/phy.h
@@ -14,8 +14,8 @@
#ifndef _MV88E6XXX_PHY_H
#define _MV88E6XXX_PHY_H
-#define PHY_PAGE 0x16
-#define PHY_PAGE_COPPER 0x00
+#define MV88E6XXX_PHY_PAGE 0x16
+#define MV88E6XXX_PHY_PAGE_COPPER 0x00
/* PHY Registers accesses implementations */
int mv88e6165_phy_read(struct mv88e6xxx_chip *chip, struct mii_bus *bus,
--
2.13.1
[toc] | [next] | [standalone]
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Date | 2017-06-08 21:50 +0200 |
| Message-ID | <tQbBn-8th-11@gated-at.bofh.it> |
| In reply to | #1661590 |
On Thu, Jun 08, 2017 at 03:04:45PM -0400, Vivien Didelot wrote:
> Prefix the PHY_* macros with a Marvell specific MV88E6XXX_ prefix.
> There is no functional changes.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web