Loadable Kernel Module Access to PRCM Clock Source Settings

Hello,

I am trying to build an application or LKM that will allow me to monitor the watchdog timer or dmTimer’s state through the use of interrupts. The details I haven’t decided yet, with the main thing holding me back is figuring out how to change the clock sources for the different counters and peripherals. I have looked in the AM335x TRM and found the right register I want to modify, however I am trying to learn more about system programming, not just bare-metal development. What I would like to do is modify the clock source for the hardware watchdog timer to be the 32KHz RC oscillator, instead of the fixed 32KHz oscillator through a LKM system call. If anyone could point me in the right direction about which headers to include and which calls may come in handy for me, I would greatly appreciate it.

Thanks!
Jake