Hi William Breathitt Gray, > Subject: RE: [PATCH v3 4/4] counter: Add RZ/G2L MTU3 counter driver > > Hi William Breathitt Gray, > > Thanks for the feedback. > > > Subject: Re: [PATCH v3 4/4] counter: Add RZ/G2L MTU3 counter driver > > > > On Sat, Oct 08, 2022 at 09:01:21AM +0000, Biju Das wrote: > > > Hi William Breathitt Gray, > > > > > > Thanks for the feedback. > > > > Hello Biju, > > > > I see that you have already released a v4, so some of my comments > may > > no longer apply, but I want to respond here to continue our > > discussions; I'll reiterate any relevant suggestions when I review > v4 > > in the coming days. > > > > By the way, if you agree with a review comment there is no need to > > reply with "OK"; just delete the parts you agree with from your > > response and I'll know those are okay. Doing this will reduce the > > amount of text we have to scroll through and thus allow us to focus > on > > just the questions we have remaining. ;-) > > OK. > > > > > Looks like something different is done when ceiling is set to 0. > > > > Would you explain what's happening in this case and why it's > > > > different that then else case below; in other words, what's the > > > > difference between RZ_MTU3_TCR_CCLR_NONE and > > RZ_MTU3_TCR_CCLR_TGRA? > > > > > > RZ_MTU3_TCR_CCLR_TGRA --> for triggering counter count using Z- > Phase > > signal. > > > RZ_MTU3_TCR_CCLR_NONE --> No clearing. > > > > Does the Z-Phase signal trigger a reset of the counter count back to > > the ceiling value? > > No, It resets to 0. It reset to 0 for forward counting and resets to U16_MAX or U32_MAX for backword counting > > Does the count loop back to 0 when it passes the > > ceiling value, > > Yes, it loopback to 0. Same as above. > > or does it remain at the ceiling until the direction > > changes? > > No. > > > By "no clearing" do you mean that the ceiling is disabled in this > case > > and the Counter count increases without limit? > > Counter clear source disabled. So the counter won't reset to 0 by > applying Z-Phase signal. > > > > > In the Counter subsystem, the "ceiling" Count extension puts an > upper > > limit on the Count value. This means that setting "ceiling" to 0 > would > > put the upper limit at 0, effectively restricting the Count value to > 0 > > until the value of "ceiling" is raised. > > > > If the device is unable to support a ceiling value of 0, you should > > return -ERANGE rather than disable the ceiling. > > OK, will check this. HW supports ceiling value of 0. Cheers, Biju