-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 03/24/2015 01:53 PM, Thierry Reding wrote: > On Fri, Mar 13, 2015 at 07:28:02PM +0530, Shobhit Kumar wrote: >> Some chips instead of using period_ns and duty_ns can be >> configured using the clock divisor and duty percent. Adds an >> alternative configuration method for such chips > > I don't see a need to introduce this alternative configuration > mechanism. Most, of not all, of the other drivers program a clock > divisor and some percentage of the duty cycle as well and it should > be easy to convert to that internally from the period and > duty_cycle parameters that you get in ->config(). Perhaps. Probably I misunderstood but as per Documentation/pwm.txt, it is suggested that rather than calculating in the driver, we can add additional helpers. So I tried doing just that. And it also means that the consumer(which is directly aware of the percent it wants) has to do the calculation and pass as ns values and we internally again convert back to percentage ? > > Adding an alternative means of configuring the PWM also means that > every user driver now potentially needs to support both the > traditional and the alternative way because PWM providers may not > implement both. I just assumed either or implementation should suffice. Even in my implementation the error checks assumes either of the two should be available else to fail the pwmchip_add Regards Shobhit > > Thierry > > > > _______________________________________________ Intel-gfx mailing > list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/intel-gfx > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVG5AiAAoJEHuQFv2//5Kq9LYIAKlRfsm4hnDFTlOmhBs5hPhT 2xOx03Vwf5V0U1FisNFr1ZhK9CuJJGGUq4zTvVDmokHNHEtQk4o751fxxY4eVE+a quw7o6BhLcQkwKdHvcHzLYHR+Szs5h60bR8qtAg1UhmGMpPkWiiPytIVOiKHjSfg yxHyAEqjxn9Q07yuhj0g2U/nqvNwODQ72cQXoI8nKNYJsRzNVhlJh8nZ1CxyYqBZ wubMJvjaM7jyFQZf3YDb7zaW3CXqkkxLhJpb/iL3grxQICO6DCnAbqnIagPgjq0H dNetFOAQfmL4i4+gonnSWEW+UBmszeDNlVKTiTH5DNuNigju+HEDGWZaF2e1hKY= =r1M/ -----END PGP SIGNATURE----- _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx