Commit 81f29dd3 authored by Dan Murphy's avatar Dan Murphy Committed by Marc Kleine-Budde

can: tcan4x5x: Remove checking the wake pin

Remove checking the wake pin for every read/write call.
The device is not explicitly put to sleep in the code
and the POR interrupt is cleared during the init of
the device.
Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent be1d2842
...@@ -235,8 +235,6 @@ static u32 tcan4x5x_read_reg(struct m_can_classdev *cdev, int reg) ...@@ -235,8 +235,6 @@ static u32 tcan4x5x_read_reg(struct m_can_classdev *cdev, int reg)
struct tcan4x5x_priv *priv = cdev->device_data; struct tcan4x5x_priv *priv = cdev->device_data;
u32 val; u32 val;
tcan4x5x_check_wake(priv);
regmap_read(priv->regmap, priv->reg_offset + reg, &val); regmap_read(priv->regmap, priv->reg_offset + reg, &val);
return val; return val;
...@@ -247,8 +245,6 @@ static u32 tcan4x5x_read_fifo(struct m_can_classdev *cdev, int addr_offset) ...@@ -247,8 +245,6 @@ static u32 tcan4x5x_read_fifo(struct m_can_classdev *cdev, int addr_offset)
struct tcan4x5x_priv *priv = cdev->device_data; struct tcan4x5x_priv *priv = cdev->device_data;
u32 val; u32 val;
tcan4x5x_check_wake(priv);
regmap_read(priv->regmap, priv->mram_start + addr_offset, &val); regmap_read(priv->regmap, priv->mram_start + addr_offset, &val);
return val; return val;
...@@ -258,8 +254,6 @@ static int tcan4x5x_write_reg(struct m_can_classdev *cdev, int reg, int val) ...@@ -258,8 +254,6 @@ static int tcan4x5x_write_reg(struct m_can_classdev *cdev, int reg, int val)
{ {
struct tcan4x5x_priv *priv = cdev->device_data; struct tcan4x5x_priv *priv = cdev->device_data;
tcan4x5x_check_wake(priv);
return regmap_write(priv->regmap, priv->reg_offset + reg, val); return regmap_write(priv->regmap, priv->reg_offset + reg, val);
} }
...@@ -268,8 +262,6 @@ static int tcan4x5x_write_fifo(struct m_can_classdev *cdev, ...@@ -268,8 +262,6 @@ static int tcan4x5x_write_fifo(struct m_can_classdev *cdev,
{ {
struct tcan4x5x_priv *priv = cdev->device_data; struct tcan4x5x_priv *priv = cdev->device_data;
tcan4x5x_check_wake(priv);
return regmap_write(priv->regmap, priv->mram_start + addr_offset, val); return regmap_write(priv->regmap, priv->mram_start + addr_offset, val);
} }
...@@ -289,18 +281,13 @@ static int tcan4x5x_write_tcan_reg(struct m_can_classdev *cdev, ...@@ -289,18 +281,13 @@ static int tcan4x5x_write_tcan_reg(struct m_can_classdev *cdev,
{ {
struct tcan4x5x_priv *priv = cdev->device_data; struct tcan4x5x_priv *priv = cdev->device_data;
tcan4x5x_check_wake(priv);
return regmap_write(priv->regmap, reg, val); return regmap_write(priv->regmap, reg, val);
} }
static int tcan4x5x_clear_interrupts(struct m_can_classdev *cdev) static int tcan4x5x_clear_interrupts(struct m_can_classdev *cdev)
{ {
struct tcan4x5x_priv *tcan4x5x = cdev->device_data;
int ret; int ret;
tcan4x5x_check_wake(tcan4x5x);
ret = tcan4x5x_write_tcan_reg(cdev, TCAN4X5X_STATUS, ret = tcan4x5x_write_tcan_reg(cdev, TCAN4X5X_STATUS,
TCAN4X5X_CLEAR_ALL_INT); TCAN4X5X_CLEAR_ALL_INT);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment