Lines Matching defs:cdev

234 static u32 tcan4x5x_read_reg(struct m_can_classdev *cdev, int reg)
236 struct tcan4x5x_priv *priv = cdev->device_data;
244 static u32 tcan4x5x_read_fifo(struct m_can_classdev *cdev, int addr_offset)
246 struct tcan4x5x_priv *priv = cdev->device_data;
254 static int tcan4x5x_write_reg(struct m_can_classdev *cdev, int reg, int val)
256 struct tcan4x5x_priv *priv = cdev->device_data;
261 static int tcan4x5x_write_fifo(struct m_can_classdev *cdev,
264 struct tcan4x5x_priv *priv = cdev->device_data;
280 static int tcan4x5x_write_tcan_reg(struct m_can_classdev *cdev,
283 struct tcan4x5x_priv *priv = cdev->device_data;
288 static int tcan4x5x_clear_interrupts(struct m_can_classdev *cdev)
292 ret = tcan4x5x_write_tcan_reg(cdev, TCAN4X5X_STATUS,
297 ret = tcan4x5x_write_tcan_reg(cdev, TCAN4X5X_INT_FLAGS,
302 ret = tcan4x5x_write_tcan_reg(cdev, TCAN4X5X_ERROR_STATUS,
310 static int tcan4x5x_init(struct m_can_classdev *cdev)
312 struct tcan4x5x_priv *tcan4x5x = cdev->device_data;
317 ret = tcan4x5x_clear_interrupts(cdev);
321 ret = tcan4x5x_write_tcan_reg(cdev, TCAN4X5X_INT_EN,
327 m_can_init_ram(cdev);
337 static int tcan4x5x_disable_wake(struct m_can_classdev *cdev)
339 struct tcan4x5x_priv *tcan4x5x = cdev->device_data;
345 static int tcan4x5x_disable_state(struct m_can_classdev *cdev)
347 struct tcan4x5x_priv *tcan4x5x = cdev->device_data;
353 static int tcan4x5x_parse_config(struct m_can_classdev *cdev)
355 struct tcan4x5x_priv *tcan4x5x = cdev->device_data;
358 tcan4x5x->device_wake_gpio = devm_gpiod_get(cdev->dev, "device-wake",
364 tcan4x5x_disable_wake(cdev);
367 tcan4x5x->reset_gpio = devm_gpiod_get_optional(cdev->dev, "reset",
376 tcan4x5x->device_state_gpio = devm_gpiod_get_optional(cdev->dev,
381 tcan4x5x_disable_state(cdev);