How to configure a general purpose clock (GP_CLKxx)?


How does one configure one of the general purpose clocks mentioned in section of the Snapdragon Device Specification document? That text states one must select a clock source, program a desired division ratio, and program a duty cycle. Where does one input this data?

Device Tree?
C/C++ program that imports a library?
Some PWM driver or other type of driver?

If any sample configuration exists, that would help me a lot.

Ultimately, I want to put a pwm signal on GP_CLK2A (gpio50).



I will be interested in the answer of this question as I was facing the similar situation. I feel that due to the absence of ADC the analog signal on a snapdragon gpio couldn’t be converted to a digital output. I will be very happy to see any positive responses.