Skip to content

Commit e3ef4e3

Browse files
decsnyfabiobaltieri
authored andcommitted
drivers: mdio: Remove empty functions
Remove empty functions that were "implementing" the mdio bus_enable and bus_disable apis. Signed-off-by: Declan Snyder <[email protected]>
1 parent 3ef9880 commit e3ef4e3

File tree

6 files changed

+0
-60
lines changed

6 files changed

+0
-60
lines changed

drivers/mdio/mdio_esp32.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,6 @@ static int mdio_esp32_write(const struct device *dev, uint8_t prtad,
8686
return mdio_transfer(dev, prtad, regad, true, data, NULL);
8787
}
8888

89-
static void mdio_esp32_bus_enable(const struct device *dev)
90-
{
91-
ARG_UNUSED(dev);
92-
}
93-
94-
static void mdio_esp32_bus_disable(const struct device *dev)
95-
{
96-
ARG_UNUSED(dev);
97-
}
98-
9989
static int mdio_esp32_initialize(const struct device *dev)
10090
{
10191
const struct mdio_esp32_dev_config *const cfg = dev->config;
@@ -134,8 +124,6 @@ static int mdio_esp32_initialize(const struct device *dev)
134124
static const struct mdio_driver_api mdio_esp32_driver_api = {
135125
.read = mdio_esp32_read,
136126
.write = mdio_esp32_write,
137-
.bus_enable = mdio_esp32_bus_enable,
138-
.bus_disable = mdio_esp32_bus_disable,
139127
};
140128

141129
#define MDIO_ESP32_CONFIG(n) \

drivers/mdio/mdio_gpio.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -157,21 +157,9 @@ static int mdio_gpio_initialize(const struct device *dev)
157157
return 0;
158158
}
159159

160-
static void mdio_gpio_bus_enable(const struct device *dev)
161-
{
162-
ARG_UNUSED(dev);
163-
}
164-
165-
static void mdio_gpio_bus_disable(const struct device *dev)
166-
{
167-
ARG_UNUSED(dev);
168-
}
169-
170160
static const struct mdio_driver_api mdio_gpio_driver_api = {
171161
.read = mdio_gpio_read_mmi,
172162
.write = mdio_gpio_write_mmi,
173-
.bus_enable = mdio_gpio_bus_enable,
174-
.bus_disable = mdio_gpio_bus_disable,
175163
};
176164

177165
#define MDIO_GPIO_CONFIG(inst) \

drivers/mdio/mdio_nxp_enet.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -179,21 +179,9 @@ static int nxp_enet_mdio_write(const struct device *dev,
179179
return ret;
180180
}
181181

182-
/* MDIO bus enable/disable "implementation" */
183-
static void nxp_enet_mdio_bus_fn(const struct device *dev)
184-
{
185-
/*
186-
* MDIO bus device is actually part of ethernet device, and
187-
* does not support ability to disable/enable MDIO bus hardware
188-
* independently of the ethernet/MAC hardware, so do nothing.
189-
*/
190-
}
191-
192182
static const struct mdio_driver_api nxp_enet_mdio_api = {
193183
.read = nxp_enet_mdio_read,
194184
.write = nxp_enet_mdio_write,
195-
.bus_enable = nxp_enet_mdio_bus_fn,
196-
.bus_disable = nxp_enet_mdio_bus_fn,
197185
};
198186

199187
static void nxp_enet_mdio_isr_cb(const struct device *dev)

drivers/mdio/mdio_nxp_enet_qos.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,9 @@ static int nxp_enet_qos_mdio_write(const struct device *dev,
144144
return do_transaction(&mdio_write);
145145
}
146146

147-
static void nxp_enet_qos_mdio_bus_fn(const struct device *dev)
148-
{
149-
/* Intentionally empty. IP does not support this functionality. */
150-
ARG_UNUSED(dev);
151-
}
152-
153147
static const struct mdio_driver_api nxp_enet_qos_mdio_api = {
154148
.read = nxp_enet_qos_mdio_read,
155149
.write = nxp_enet_qos_mdio_write,
156-
.bus_enable = nxp_enet_qos_mdio_bus_fn,
157-
.bus_disable = nxp_enet_qos_mdio_bus_fn,
158150
};
159151

160152
static int nxp_enet_qos_mdio_init(const struct device *dev)

drivers/mdio/mdio_nxp_s32_gmac.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,11 @@ static int mdio_nxp_s32_init(const struct device *dev)
141141
return 0;
142142
}
143143

144-
static void mdio_nxp_s32_noop(const struct device *dev)
145-
{
146-
ARG_UNUSED(dev);
147-
/* Controller does not support enabling/disabling MDIO bus */
148-
}
149-
150144
static const struct mdio_driver_api mdio_nxp_s32_driver_api = {
151145
.read = mdio_nxp_s32_read_c22,
152146
.write = mdio_nxp_s32_write_c22,
153147
.read_c45 = mdio_nxp_s32_read_c45,
154148
.write_c45 = mdio_nxp_s32_write_c45,
155-
.bus_enable = mdio_nxp_s32_noop,
156-
.bus_disable = mdio_nxp_s32_noop,
157149
};
158150

159151
#define MDIO_NXP_S32_HW_INSTANCE_CHECK(i, n) \

drivers/mdio/mdio_nxp_s32_netc.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,9 @@ static int nxp_s32_mdio_initialize(const struct device *dev)
6767
return 0;
6868
}
6969

70-
static void nxp_s32_mdio_noop(const struct device *dev)
71-
{
72-
/* intentionally left empty */
73-
}
74-
7570
static const struct mdio_driver_api nxp_s32_mdio_api = {
7671
.read = nxp_s32_mdio_read,
7772
.write = nxp_s32_mdio_write,
78-
/* NETC does not support enabling/disabling EMDIO controller independently */
79-
.bus_enable = nxp_s32_mdio_noop,
80-
.bus_disable = nxp_s32_mdio_noop,
8173
};
8274

8375
#define NXP_S32_MDIO_HW_INSTANCE_CHECK(i, n) \

0 commit comments

Comments
 (0)