Skip to content

Commit ef6f804

Browse files
robi251kartben
authored andcommitted
drivers: dm8806: link speed change interrupt handling
On the interrupt handling, one thread per driver instance is involved into monitoring the semaphor, sends inside the gpio callback triggered by the gpio interrupt. Each time, when the link parameters are change, the DM8806 is generating the gpio interrupt. After getting semaphor, the application callback function which was linked during initialization process is called to get the new link parameters with standard API calls Signed-off-by: Robert Slawinski <robert.slawinski1@gmail.com>
1 parent 19e74f1 commit ef6f804

File tree

4 files changed

+345
-28
lines changed

4 files changed

+345
-28
lines changed

drivers/ethernet/phy/Kconfig

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module-str = Log level for Ethernet PHY driver
1515
module-help = Sets log level for Ethernet PHY Device Drivers.
1616
source "subsys/net/Kconfig.template.log_config.net"
1717
source "drivers/ethernet/phy/Kconfig.tja1103"
18+
source "drivers/ethernet/phy/Kconfig.dm8806"
1819

1920
config PHY_INIT_PRIORITY
2021
int "Ethernet PHY driver init priority"
@@ -40,13 +41,6 @@ config PHY_ADIN2111
4041
help
4142
Enable ADIN2111 PHY driver.
4243

43-
config PHY_DM8806
44-
bool "DM8806 PHY driver"
45-
default y
46-
depends on DT_HAS_DAVICOM_DM8806_PHY_ENABLED
47-
help
48-
Enable DM8806 PHY driver.
49-
5044
config PHY_MICROCHIP_KSZ8081
5145
bool "Microchip KSZ8081 PHY Driver"
5246
default y

drivers/ethernet/phy/Kconfig.dm8806

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright 2024 Robert Slawinski <robert.slawinski1@gmail.com>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Davicom PHY DM8806 driver configuration options
5+
6+
menuconfig PHY_DM8806
7+
bool "Davicom PHY DM8806 driver"
8+
default y
9+
depends on DT_HAS_DAVICOM_DM8806_PHY_ENABLED
10+
depends on MDIO
11+
help
12+
Enable driver for Davicom DM8806 PHY.
13+
14+
if PHY_DM8806
15+
16+
choice PHY_DM8806_TRIGGER_MODE
17+
prompt "Trigger mode"
18+
default PHY_DM8806_TRIGGER_GLOBAL_THREAD
19+
help
20+
Specify the type of triggering to be used by the driver.
21+
22+
config PHY_DM8806_TRIGGER_NONE
23+
bool "No trigger"
24+
25+
config PHY_DM8806_TRIGGER_GLOBAL_THREAD
26+
bool "Use global thread"
27+
depends on GPIO
28+
select PHY_DM8806_TRIGGER
29+
30+
endchoice
31+
32+
config PHY_DM8806_TRIGGER
33+
bool
34+
35+
config PHY_DM8806_THREAD_PRIORITY
36+
int "Thread priority"
37+
depends on PHY_DM8806_TRIGGER_GLOBAL_THREAD
38+
default 13
39+
help
40+
Priority of thread used by the driver to handle interrupts.
41+
42+
config PHY_DM8806_THREAD_STACK_SIZE
43+
int "Thread stack size"
44+
depends on PHY_DM8806_TRIGGER_GLOBAL_THREAD
45+
default 1024
46+
help
47+
Stack size of thread used by the driver to handle interrupts.
48+
49+
endif # PHY_DM8806_TRIGGER

0 commit comments

Comments
 (0)