summaryrefslogtreecommitdiff
path: root/drivers/net/can/spi/mcp251xfd/mcp251xfd.h
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2021-03-03 13:43:41 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2021-03-30 12:14:50 +0300
commitdc09e7e37152d1d18511cd590980d3982a3a0daa (patch)
tree0c94620efeb15cb471316fa5aadc2ffc196b4760 /drivers/net/can/spi/mcp251xfd/mcp251xfd.h
parentae2e9940112064ca21a807f543822a1eea2731d6 (diff)
downloadlinux-dc09e7e37152d1d18511cd590980d3982a3a0daa.tar.xz
can: mcp251xfd: mcp251xfd_get_timestamp(): move to mcp251xfd.h
This is a preparation patch, it moves the mcp251xfd_get_timestamp() function into the mcp251xfd.h file. Link: https://lore.kernel.org/r/20210304160328.2752293-5-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/spi/mcp251xfd/mcp251xfd.h')
-rw-r--r--drivers/net/can/spi/mcp251xfd/mcp251xfd.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd.h b/drivers/net/can/spi/mcp251xfd/mcp251xfd.h
index d0a0d2f91dac..074c5adf9b94 100644
--- a/drivers/net/can/spi/mcp251xfd/mcp251xfd.h
+++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd.h
@@ -728,6 +728,12 @@ mcp251xfd_spi_cmd_write(const struct mcp251xfd_priv *priv,
return data;
}
+static inline int mcp251xfd_get_timestamp(const struct mcp251xfd_priv *priv,
+ u32 *timestamp)
+{
+ return regmap_read(priv->map_reg, MCP251XFD_REG_TBC, timestamp);
+}
+
static inline u16 mcp251xfd_get_tef_obj_addr(u8 n)
{
return MCP251XFD_RAM_START +