Re: [PATCH 2/2] counter: Add support for Intel Quadrature Encoder Peripheral

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 07, 2021 at 05:25:48PM +0300, Jarkko Nikula wrote:
> On 4/2/21 1:30 PM, William Breathitt Gray wrote:
> > On Thu, Apr 01, 2021 at 06:32:28PM +0300, Jarkko Nikula wrote:
> >> +static const struct counter_device_ext intel_qep_ext[] = {
> >> +	INTEL_QEP_COUNTER_EXT_RW(noise),
> >> +	INTEL_QEP_COUNTER_EXT_RW(preset_enable)
> >> +};
> > 
> > "noise" is a new attribute so you'll need to provide an entry in
> > Documentation/ABI/testing/sysfs-bus-counter explaining it.
> > 
> Should this noise actually be visible as seconds (ns, µs, ms) instead of 
> plain register value? From the spec "It selects the maximum glitch width 
> to remove in terms of peripheral clock cycles: PCLK_CYCLES = MAX_COUNT + 2".
> 
> I think it should since for a person configuring the system plain 
> register value is more or less guesswork.
> 
> Jarkko

If this clock is actually temporal in nature then denominating this
value in a temporal unit such as nanonseconds should be fine as long as
such values have a well-defined behavior for this device. I do recommend
giving this attribute a more fitting name however because it is not
immediately obvious what an attribute called "noise" controls.

William Breathitt Gray

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux