Commit 82c944d0 authored by Herve Codina's avatar Herve Codina Committed by Linus Walleij
Browse files

net: wan: Add framer framework support



A framer is a component in charge of an E1/T1 line interface.
Connected usually to a TDM bus, it converts TDM frames to/from E1/T1
frames. It also provides information related to the E1/T1 line.

The framer framework provides a set of APIs for the framer drivers
(framer provider) to create/destroy a framer and APIs for the framer
users (framer consumer) to obtain a reference to the framer, and
use the framer.

This basic implementation provides a framer abstraction for:
 - power on/off the framer
 - get the framer status (line state)
 - be notified on framer status changes
 - get/set the framer configuration

Signed-off-by: default avatarHerve Codina <herve.codina@bootlin.com>
Reviewed-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: default avatarJakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20231128132534.258459-2-herve.codina@bootlin.com


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent b85ea95d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -95,6 +95,8 @@ config HDLC_X25
comment "X.25/LAPB support is disabled"
	depends on HDLC && (LAPB!=m || HDLC!=m) && LAPB!=y

source "drivers/net/wan/framer/Kconfig"

config PCI200SYN
	tristate "Goramo PCI200SYN support"
	depends on HDLC && PCI
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@ obj-$(CONFIG_HDLC_FR) += hdlc_fr.o
obj-$(CONFIG_HDLC_PPP)		+= hdlc_ppp.o
obj-$(CONFIG_HDLC_X25)		+= hdlc_x25.o

obj-y				+= framer/

obj-$(CONFIG_FARSYNC)		+= farsync.o

obj-$(CONFIG_LAPBETHER)		+= lapbether.o
+25 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
#
# FRAMER
#

menuconfig FRAMER
	tristate "Framer Subsystem"
	help
	  A framer is a component in charge of an E1/T1 line interface.
	  Connected usually to a TDM bus, it converts TDM frames to/from E1/T1
	  frames. It also provides information related to the E1/T1 line.
	  Used with HDLC, the network can be reached through the E1/T1 line.

	  This framework is designed to provide a generic interface for framer
	  devices present in the kernel. This layer will have the generic
	  API by which framer drivers can create framer using the framer
	  framework and framer users can obtain reference to the framer.
	  All the users of this framework should select this config.

if FRAMER

config GENERIC_FRAMER
	bool

endif # FRAMER
+6 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
#
# Makefile for the framer drivers.
#

obj-$(CONFIG_GENERIC_FRAMER)			+= framer-core.o
+882 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading