Lines Matching +full:tx +full:- +full:mask
1 /* ST Microelectronics LIS2DH 3-axis accelerometer driver
5 * SPDX-License-Identifier: Apache-2.0
29 const struct lis2dh_config *cfg = dev->config; in lis2dh_raw_read()
35 const struct spi_buf_set tx = { in lis2dh_raw_read() local
56 return -EIO; in lis2dh_raw_read()
63 if (spi_transceive_dt(&cfg->bus_cfg.spi, &tx, &rx)) { in lis2dh_raw_read()
64 return -EIO; in lis2dh_raw_read()
73 const struct lis2dh_config *cfg = dev->config; in lis2dh_raw_write()
85 const struct spi_buf_set tx = { in lis2dh_raw_write() local
92 return -EIO; in lis2dh_raw_write()
99 if (spi_write_dt(&cfg->bus_cfg.spi, &tx)) { in lis2dh_raw_write()
100 return -EIO; in lis2dh_raw_write()
133 uint8_t mask, uint8_t value) in lis2dh_spi_update_reg() argument
138 tmp_val = (tmp_val & ~mask) | (value & mask); in lis2dh_spi_update_reg()
153 struct lis2dh_data *data = dev->data; in lis2dh_spi_init()
154 const struct lis2dh_config *cfg = dev->config; in lis2dh_spi_init()
156 data->hw_tf = &lis2dh_spi_transfer_fn; in lis2dh_spi_init()
158 if (!spi_is_ready_dt(&cfg->bus_cfg.spi)) { in lis2dh_spi_init()
160 return -ENODEV; in lis2dh_spi_init()