Re: [RFC PATCH v4 04/21] x86/hpet: Add hpet_set_comparator() for periodic and one-shot modes

2019-06-18 Thread Ricardo Neri
On Fri, Jun 14, 2019 at 08:17:14PM +0200, Thomas Gleixner wrote: > On Thu, 23 May 2019, Ricardo Neri wrote: > > +/** > > + * hpet_set_comparator() - Helper function for setting comparator register > > + * @num: The timer ID > > + * @cmp: The value to be written to the comparator/accumulator >

Re: [RFC PATCH v4 04/21] x86/hpet: Add hpet_set_comparator() for periodic and one-shot modes

2019-06-14 Thread Thomas Gleixner
On Thu, 23 May 2019, Ricardo Neri wrote: > +/** > + * hpet_set_comparator() - Helper function for setting comparator register > + * @num: The timer ID > + * @cmp: The value to be written to the comparator/accumulator > + * @period: The value to be written to the period (0 = oneshot mode)

[RFC PATCH v4 04/21] x86/hpet: Add hpet_set_comparator() for periodic and one-shot modes

2019-05-23 Thread Ricardo Neri
Instead of setting the timer period directly in hpet_set_periodic(), add a new helper function hpet_set_comparator() that only sets the accumulator and comparator. hpet_set_periodic() will only prepare the timer for periodic mode and leave the expiration programming to hpet_set_comparator(). This