net: wan: Add framer framework support
authorHerve Codina <herve.codina@bootlin.com>
Tue, 28 Nov 2023 13:25:30 +0000 (14:25 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 12 Dec 2023 22:05:24 +0000 (23:05 +0100)
commit82c944d05b1a24c76948ee9d6bb1d7de1ebb8b3a
tree497159c997d1b6d8c4c863777382ee9bb4b537c4
parentb85ea95d086471afb4ad062012a4d73cd328fa86
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: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20231128132534.258459-2-herve.codina@bootlin.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/net/wan/Kconfig
drivers/net/wan/Makefile
drivers/net/wan/framer/Kconfig [new file with mode: 0644]
drivers/net/wan/framer/Makefile [new file with mode: 0644]
drivers/net/wan/framer/framer-core.c [new file with mode: 0644]
include/linux/framer/framer-provider.h [new file with mode: 0644]
include/linux/framer/framer.h [new file with mode: 0644]