summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPhilip, Avinash <avinashphilip@ti.com>2012-11-21 08:40:44 +0100
committerThierry Reding <thierry.reding@avionic-design.de>2012-11-22 22:47:12 +0100
commit83af24027b3df1af5c5a9aa9adcdcfeb3429d3be (patch)
tree3e104ed41554bb7e97378cc7cc3866c842306dff /include
parentpwm: vt8500: Ensure PWM clock is enabled during pwm_config (diff)
downloadlinux-83af24027b3df1af5c5a9aa9adcdcfeb3429d3be.tar.xz
linux-83af24027b3df1af5c5a9aa9adcdcfeb3429d3be.zip
pwm: Device tree support for PWM polarity
Add support for encoding PWM properties in bit encoded form with of_pwm_xlate_with_flags() function support. Platforms require platform specific PWM properties has to populate in 3rd cell of the pwm-specifier and PWM driver should also set .of_xlate support with this function. Currently PWM property polarity encoded in bit position 0 of the third cell in pwm-specifier. Signed-off-by: Philip, Avinash <avinashphilip@ti.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pwm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 112b31436848..6d661f32e0e4 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -171,6 +171,9 @@ struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip,
unsigned int index,
const char *label);
+struct pwm_device *of_pwm_xlate_with_flags(struct pwm_chip *pc,
+ const struct of_phandle_args *args);
+
struct pwm_device *pwm_get(struct device *dev, const char *consumer);
void pwm_put(struct pwm_device *pwm);