>
> *On 7 November 2015 at 02:53, William Hermans <[email protected] 
> <[email protected]>> wrote:*
>
>> *OK, thanks. That uio guide I've already run into, and I was afraid you 
> were going to link to that  . . . heh. Beaglebone register address I did 
> not need help with, but understanding how to interface the uio adc "driver" 
> once running.*
>
> *One problem I'm seeing thus far, is the ADC clock needs to be enabled 
> etc. Which is in a completely different memory location . . . but my 
> imagination is not that limited, so would not slow me down too much . . .*
> *Happens automagically when you open /dev/uio/adc (and the kernel will 
> disable the clock again when you close it).*
>
> *The reason for that is that my DTS fragment reuses the existing DT node 
> for the ADC. A standalone definition would be:*
>
> *tscadc@44e0d000 {
>       reg = <0x44e0d000 0x1000>;
>       interrupt-parent = <&intc>;
>       interrupts = <16>;
>       ti,hwmods = "adc_tsc";
>       compatible = "uio";
>       uio-alias = "adc";
> };*
>
> *The magic clock enabling part is due to "ti,hwmods", which associates the 
> node with platform data still hardcoded into the kernel. I'm not entirely 
> sure how the mechanism works exactly, and my understanding is that it's 
> destined to become deprecated eventually ("replaced by genpd along the 
> lines of simple-pm-bus"). I don't know how things will look after that.*
>
>
> *(the two child nodes declared in the main DT are ignored by uio and 
> harmless)*
>
>
> Matthijs
>
> *PS although your reply was by direct email I'm sending this to the list 
again since, although off-topic, I think it may still be of interest to 
other readers.*


Matthijs,

So doing some digging, am33xxx.dtsi has this fragment:
tscadc: tscadc@44e0d000 {
            compatible = "ti,am3359-tscadc";
            reg = <0x44e0d000 0x1000>;
            interrupt-parent = <&intc>;
            interrupts = <16>;
            ti,hwmods = "adc_tsc";
            status = "disabled";

            tsc {
                compatible = "ti,am3359-tsc";
            };
            am335x_adc: adc {
                #io-channel-cells = <1>;
                compatible = "ti,am3359-adc";
            };
        };

So I am thinking the code snippet for the /dev/uio/adc would not work 
without modifying that file to reflect those changes. Am I wrong ? 
Everything, well most everything looks the same except for the compatible 
field, status field is disabled instead of "ok", and you have an additional 
field for a uio alias I suppose.

You had mentioned you do not use overlays. How do you enable all this then 
? Perhaps I'd learn more from that. 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to