From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Thu, 14 Jun 2012 17:35:50 -0600 Subject: [U-Boot] [PATCH v2 08/19] tegra: Add support for PWFM In-Reply-To: <1339604395-6621-9-git-send-email-sjg@chromium.org> References: <1339604395-6621-1-git-send-email-sjg@chromium.org> <1339604395-6621-9-git-send-email-sjg@chromium.org> Message-ID: <4FDA7556.2080308@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06/13/2012 10:19 AM, Simon Glass wrote: > The pulse width/frequency modulation peripheral supports generating > a repeating pulse. It is useful for controlling LCD brightness. Surely this should be modeled as a driver that's instantiated from DT, which provides n PWMs. As such, I'd expect the driver to have some kind of init/probe function, and: > +void pwfm_enable(struct pwfm_ctlr *pwfm, int rate, int pulse_width, > + int freq_divider); to take a pwm_id parameter too.