Re: [PATCH v4 3/3] phy: phy-can-transceiver: Add support for generic CAN transceiver driver

From: Marc Kleine-Budde
Date: Fri Apr 16 2021 - 03:51:32 EST


On 16.04.2021 10:56:47, Aswath Govindraju wrote:
> The driver adds support for generic CAN transceivers. Currently
> the modes supported by this driver are standby and normal modes for TI
> TCAN1042 and TCAN1043 CAN transceivers.
>
> The transceiver is modelled as a phy with pins controlled by gpios, to put
> the transceiver in various device functional modes. It also gets the phy
> attribute max_link_rate for the usage of CAN drivers.
>
> Signed-off-by: Aswath Govindraju <a-govindraju@xxxxxx>
> ---
> MAINTAINERS | 1 +
> drivers/phy/Kconfig | 9 ++
> drivers/phy/Makefile | 1 +
> drivers/phy/phy-can-transceiver.c | 146 ++++++++++++++++++++++++++++++
> 4 files changed, 157 insertions(+)
> create mode 100644 drivers/phy/phy-can-transceiver.c
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index e666d33af10d..4e868f2a97c7 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -4048,6 +4048,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git
> F: Documentation/devicetree/bindings/net/can/
> F: Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml
> F: drivers/net/can/
> +F: drivers/phy/phy-can-transceiver.c
> F: include/linux/can/bittiming.h
> F: include/linux/can/dev.h
> F: include/linux/can/led.h
> diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
> index 54c1f2f0985f..51902b629fc6 100644
> --- a/drivers/phy/Kconfig
> +++ b/drivers/phy/Kconfig
> @@ -61,6 +61,15 @@ config USB_LGM_PHY
> interface to interact with USB GEN-II and USB 3.x PHY that is part
> of the Intel network SOC.
>
> +config PHY_CAN_TRANSCEIVER
> + tristate "CAN transceiver PHY"
> + select GENERIC_PHY
> + help
> + This option enables support for CAN transceivers as a PHY. This
> + driver provides function for putting the transceivers in various
> + functional modes using gpios and sets the attribute max link
> + rate, for mcan drivers.
^^^^

CAN

Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

Attachment: signature.asc
Description: PGP signature