Reading ADC that comes from a multiplexer

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

 



Hi Peter,

I have a SN74LV4051 multiplexer that is controlled by 3 GPIOs and I
described like this in DT:

adcmux: mux-controller {
       compatible = "gpio-mux";
       #mux-control-cells = <0>;
       mux-gpios = <&gpio3 31 GPIO_ACTIVE_HIGH>,
                           <&gpio3 30 GPIO_ACTIVE_HIGH>,
                          <&gpio3 26 GPIO_ACTIVE_HIGH>;
};

adc-mux {
       compatible = "io-channel-mux";
       io-channels = <&adc 4>;
       io-channel-names = "parent";
       mux-controls = <&adcmux>;
       channels = "chan0", "chan1", "chan2", "chan3",
                         "chan4", "chan5", "chan6", "chan7";
};

/sys/class/mux/muxchip0/ is created:

# ls /sys/class/mux/muxchip0/
device  of_node  power  subsystem  uevent

Sorry for the trivial question, but I haven't found any examples.

What is the userspace command if I want to expose "chan3" to be read
by the ADC 4 channel?

Thanks,

Fabio Estevam



[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