Re: invensense mpu9250 ak8963 and devicetree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Philippe,

I would recommend letting mpu9250 chip drives the magnetometer instead of using the ak8963 driver.

This is simpler to use and guarantees a good synchronization between all sensors and no possible latency coming from kernel scheduling when polling the magnetometer. And it enables the use of spi bus for connecting the device.

You just need to define mpu9250 dts without an i2c-gate, and delete all definition of ak8963 chip.

Best regards,
JB


From: Philippe De Muyter <phdm@xxxxxxx>
Sent: Wednesday, March 3, 2021 16:31
To: linux-iio@xxxxxxxxxxxxxxx <linux-iio@xxxxxxxxxxxxxxx>
Subject: invensense mpu9250 ak8963 and devicetree 
 
 CAUTION: This email originated from outside of the organization. Please make sure the sender is who they say they are and do not click links or open attachments unless you recognize the sender and know the content is safe.

Hello,

I am trying to use a mpu9250 imu, but I have trouble with the ak8963 part.

Currently, ak8975_probe fails in this code :

        /* Fetch the regulators */
        data->vdd = devm_regulator_get(&client->dev, "vdd");
        if (IS_ERR(data->vdd))
                return PTR_ERR(data->vdd);
        data->vid = devm_regulator_get(&client->dev, "vid");
        if (IS_ERR(data->vid))
                return PTR_ERR(data->vid);

but Documentation/devicetree/bindings/iio/magnetometer/asahi-kasei,ak8975.yaml
says :

  vdd-supply:
    description: |
      an optional regulator that needs to be on to provide VDD power to
      the sensor.

I have no vdd or vdd-supply property in my ak8963 description.

Is that unrelated ?

What should I write in my dts file for this ak8963 embedded in a mpu9250 ?

Thanks in advance

Philippe

-- 
Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux