The Infineon TLV493D is a Low-Power 3D Magnetic Sensor. The Sensor
applications includes joysticks, control elements (white goods,
multifunction knops), or electric meters (anti tampering) and any
other application that requires accurate angular measurements at
low power consumptions.
+ ret = read_poll_timeout(regmap_bulk_read, err, err ||
+ FIELD_GET(TLV493D_VAL_CHANNEL, buff[TLV493D_RD_REG_TEMP]) == 0,
+ mode->sleep_us, (3 * mode->sleep_us), false, data->map, TLV493D_RD_REG_BX,
+ buff, ARRAY_SIZE(buff));
+ if (ret) {
+ dev_err(data->dev, "read poll timeout, error:%d", ret);
+ goto out;
+ }
+ if (err) {
+ dev_err(data->dev, "read data failed, error:%d\n", ret);
+ ret = err;
+ goto out;
+ }
+ ret = tlv493d_init(data);
+ if (ret)
+ return dev_err_probe(dev, ret, "failed to initialized\n");
+
+ indio_dev->info = &tlv493d_info;
+ indio_dev->modes = INDIO_DIRECT_MODE;