Re: Ad5064 SPI probe not called

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

 



But sir i  want to enable the ad5604 Digital to analog sensor , where
to add the sensor information

On Wed, Nov 30, 2016 at 6:01 PM, Slawomir Stepien <sst@xxxxxxxxx> wrote:
> On Nov 30, 2016 12:02, Akshay Vijapur wrote:
>> Respected sir ,
>>
>> I am using a DAC device with raspberry pi board connected via SPI , So
>> i am using ad5064 driver in the kernel .
>>
>>  I am seeing that spi probe is not being called . after days of
>> researching i got to know that i need to add the device tree for this
>> driver . since i am new to the driver development and usage i tried to
>> create device tree like this
>
> Yes, the overlay.
>
>>
>> /dts-v1/;
>> /plugin/;
>>
>> / {
>>
>>         compatible = "brcm,bcm2708";
>>
>>         fragment@0 {
>>                 target = <&spidev0>;
>>                 __overlay__ {
>>                          status = "okay";
>
> I think this is not what you want. You should disable the spidev driver, so the
> AD5064 will be able to use SPI lines.
>
>>                 };
>>         };
>>
>>
>>         fragment@2 {
>>                 target = <&spidev0>;
>
> When adding new device on SPI line, you should add it to the spi target.
>
>>                 (...)
>>
>> since i am using raspberry 3 board i tried to add some info about spi
>> in the dts file , But still spi probe is not happing . so Could you
>> please help me by specifying how to use the device driver with
>> raspberry pi 3 board with linux kernel 4.4 in it .
>
> Guys on rpi forum are quite helpful with solving that kind of problems.
> Nevertheless please analyze this (it is for different driver, but you should get
> the idea):
>
> /dts-v1/;
> /plugin/;
>
> / {
>         compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
>
>         fragment@0 {
>                 target = <&spi0>;
>                 __overlay__ {
>                         status = "okay";
>                 };
>         };
>
>         fragment@1 {
>                 target = <&spidev0>;
>                 __overlay__ {
>                         status = "disabled";
>                 };
>         };
>
>         fragment@2 {
>                 target = <&spidev1>;
>                 __overlay__ {
>                         status = "disabled";
>                 };
>         };
>
>         fragment@3 {
>                 target = <&spi0>;
>                 __overlay__ {
>                         #address-cells = <1>;
>                         #size-cells = <0>;
>
>                         mcp4131: mcp4131@0 {
>                                 compatible = "microchip,mcp4162-502";
>                                 reg = <0>;
>                                 spi-max-frequency = <10000>;
>                         };
>                 };
>         };
> };
>
> --
> Slawomir Stepien
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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