# \[PATCH 4/4\] pwm: omap-dmtimer: add dev\_dbg() message for effective period and duty cycle

- From: Tony Lindgren \<tony@atomide.com\>
- Date: 2016-02-01 18:59:52 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2016/02/8728640
- Thread: https://ratatoskr.run/linux-arm-kernel/2016/01/8728537/t.md

```text
Hi,

* David Rivshin (Allworx) [ref] [160201 10:23]:
> On Sat, 30 Jan 2016 15:51:06 +0100
> Neil Armstrong [ref] wrote:
> 
> > 2016-01-30 5:26 GMT+01:00 David Rivshin (Allworx)
> > [ref]:
> > > From: David Rivshin <redacted>
> > >
> > > After going through the math and constraints checking to compute
> > > load and match values, it is helpful to know what the resultant
> > > period and duty cycle are.
> > >
> > > Signed-off-by: David Rivshin <redacted>
> > > ---
> > >
> > > I found this helpful while testing the other changes, so I included
> > > it in case it may be of use to someone in the future. I would have
> > > no issues with dropping this if it's not considered worthwhile.  
> > 
> > It's useful, but converting it as a sysfs attribute would be great !
> 
> Hrm, yes that is an interesting thought. I imagine that many PWM 
> devices have similar constraints, so perhaps that would be best 
> handled generically in the pwm core? Maybe as new optional get_*() 
> ops, a modification to the config() op to add output params, or just 
> updating new fields in the struct pwm directly?

Yeah for /sys entry it should be Linux generic. The other option
is to use debugfs for driver specific things.

Regards,

Tony
```
