/* SPDX-License-Identifier: GPL-2.0-or-later */ /******************************************************************************* * * CTU CAN FD IP Core * * Copyright (C) 2015-2018 Ondrej Ille <[email protected]> FEE CTU * Copyright (C) 2018-2021 Ondrej Ille <[email protected]> self-funded * Copyright (C) 2018-2019 Martin Jerabek <[email protected]> FEE CTU * Copyright (C) 2018-2021 Pavel Pisa <[email protected]> FEE CTU/self-funded * * Project advisors: * Jiri Novak <[email protected]> * Pavel Pisa <[email protected]> * * Department of Measurement (http://meas.fel.cvut.cz/) * Faculty of Electrical Engineering (http://www.fel.cvut.cz) * Czech Technical University (http://www.cvut.cz/) ******************************************************************************/ #ifndef __CTUCANFD__ #define __CTUCANFD__ #include <linux/netdevice.h> #include <linux/can/dev.h> #include <linux/list.h> enum ctu_can_fd_can_registers; struct ctucan_priv { … }; /** * ctucan_probe_common - Device type independent registration call * * This function does all the memory allocation and registration for the CAN * device. * * @dev: Handle to the generic device structure * @addr: Base address of CTU CAN FD core address * @irq: Interrupt number * @ntxbufs: Number of implemented Tx buffers * @can_clk_rate: Clock rate, if 0 then clock are taken from device node * @pm_enable_call: Whether pm_runtime_enable should be called * @set_drvdata_fnc: Function to set network driver data for physical device * * Return: 0 on success and failure value on error */ int ctucan_probe_common(struct device *dev, void __iomem *addr, int irq, unsigned int ntxbufs, unsigned long can_clk_rate, int pm_enable_call, void (*set_drvdata_fnc)(struct device *dev, struct net_device *ndev)); int ctucan_suspend(struct device *dev) __maybe_unused; int ctucan_resume(struct device *dev) __maybe_unused; #endif /*__CTUCANFD__*/