Re: [linux-sunxi] PWM driver for mainline

2014-08-18 Thread jonsm...@gmail.com
On Mon, Aug 18, 2014 at 5:36 PM, wrote: > On 17/08/14 21:18, jonsm...@gmail.com wrote: >> I think I found the bug, my sgtl5000 is happy now at lower clock >> speeds. I was missing a 'L' and a value got truncated to 32 bits. > > Sorry for the late reply, I guess we're in different timezones :) > >

Re: [linux-sunxi] PWM driver for mainline

2014-08-18 Thread selsinork
On 17/08/14 21:18, jonsm...@gmail.com wrote: > I think I found the bug, my sgtl5000 is happy now at lower clock > speeds. I was missing a 'L' and a value got truncated to 32 bits. Sorry for the late reply, I guess we're in different timezones :) Yes, that seems to work here too, giving expected o

Re: [linux-sunxi] PWM driver for mainline

2014-08-17 Thread jonsm...@gmail.com
I think I found the bug, my sgtl5000 is happy now at lower clock speeds. I was missing a 'L' and a value got truncated to 32 bits. On Sun, Aug 17, 2014 at 4:04 PM, jonsm...@gmail.com wrote: > On Sun, Aug 17, 2014 at 3:22 PM, wrote: >> I should probably add that I'm applying your patch onto a va

Re: [linux-sunxi] PWM driver for mainline

2014-08-17 Thread jonsm...@gmail.com
On Sun, Aug 17, 2014 at 3:22 PM, wrote: > I should probably add that I'm applying your patch onto a vanilla 3.16 > and I'm using a cubietruck. > > Let me know if you'd like me to start with a different base kernel or > to try it on different hardware, I have a couple of other A20 boards > I can t

Re: [linux-sunxi] PWM driver for mainline

2014-08-17 Thread selsinork
I should probably add that I'm applying your patch onto a vanilla 3.16 and I'm using a cubietruck. Let me know if you'd like me to start with a different base kernel or to try it on different hardware, I have a couple of other A20 boards I can try if needed -- You received this message beca

Re: [linux-sunxi] PWM driver for mainline

2014-08-17 Thread selsinork
On 17/08/14 16:03, jonsm...@gmail.com wrote: > Debug output from my test. Don't know if the pin is ticking. debug output looks identical here If I leave enable at 0 the output stays high, set enable to 1 and the output goes low and stays there regardless of any other changes I make. Even in th

Re: [linux-sunxi] PWM driver for mainline

2014-08-17 Thread selsinork
On 17/08/14 16:02, jonsm...@gmail.com wrote: > Thanks for testing. That gave me some things to fix. New version > revmoved the SGTL clutter. It still has a lot of debug in it so that I > can see what is going one. > > Note that the sysfs parameter 'duty_cycle' is not a percent > duty_cycle. It wan

Re: [linux-sunxi] PWM driver for mainline

2014-08-17 Thread jonsm...@gmail.com
On Sun, Aug 17, 2014 at 11:16 AM, Chen-Yu Tsai wrote: > Curious, why did you make a PWM driver when there is one in the works? > > See: https://lkml.org/lkml/2014/5/19/568 I suspect this one is going to have trouble with generating high frequency clocks. I had to do the math in picoseconds to kee

Re: [linux-sunxi] PWM driver for mainline

2014-08-17 Thread jonsm...@gmail.com
On Sun, Aug 17, 2014 at 11:16 AM, Chen-Yu Tsai wrote: > Curious, why did you make a PWM driver when there is one in the works? Because I didn't know about it. > > See: https://lkml.org/lkml/2014/5/19/568 > > On Sun, Aug 17, 2014 at 4:16 AM, jonsm...@gmail.com > wrote: >> I attached a PWM drive

Re: [linux-sunxi] PWM driver for mainline

2014-08-17 Thread Chen-Yu Tsai
Curious, why did you make a PWM driver when there is one in the works? See: https://lkml.org/lkml/2014/5/19/568 On Sun, Aug 17, 2014 at 4:16 AM, jonsm...@gmail.com wrote: > I attached a PWM driver for the mainline kernel. I think it is working > but I don't have access to a scope at my current l

Re: [linux-sunxi] PWM driver for mainline

2014-08-17 Thread jonsm...@gmail.com
Debug output from my test. Don't know if the pin is ticking. # ls duty_cycle enable period polaritypower uevent # echo 5 > period [ 41.678063] JDS - sunxi_pwm_config duty 0 period 5 # echo 50 > duty_cycle [ 48.753739] JDS - sunxi_pwm_config duty 50 period 5 [

Re: [linux-sunxi] PWM driver for mainline

2014-08-17 Thread jonsm...@gmail.com
Thanks for testing. That gave me some things to fix. New version revmoved the SGTL clutter. It still has a lot of debug in it so that I can see what is going one. Note that the sysfs parameter 'duty_cycle' is not a percent duty_cycle. It wants the duty_cycle in nanoseconds like the period. That's

Re: [linux-sunxi] PWM driver for mainline

2014-08-17 Thread selsinork
On 16/08/14 21:16, jonsm...@gmail.com wrote: > I attached a PWM driver for the mainline kernel. I think it is working > but I don't have access to a scope at my current location. I know it > is making pulses, but without a scope I have no idea if they are the > correct pulses. > > I tried this and

[linux-sunxi] PWM driver for mainline

2014-08-16 Thread jonsm...@gmail.com
I attached a PWM driver for the mainline kernel. I think it is working but I don't have access to a scope at my current location. I know it is making pulses, but without a scope I have no idea if they are the correct pulses. I tried this and the audio chip wasn't happy with the pulses. It should h