diff options
author | Philip, Avinash <avinashphilip@ti.com> | 2012-11-21 13:10:44 +0530 |
---|---|---|
committer | Thierry Reding <thierry.reding@avionic-design.de> | 2012-11-22 22:47:12 +0100 |
commit | 83af24027b3df1af5c5a9aa9adcdcfeb3429d3be (patch) | |
tree | 3e104ed41554bb7e97378cc7cc3866c842306dff /include/linux/pwm.h | |
parent | 422470a8265fbb1d182c00ab2421f4b416ab2dba (diff) | |
download | linux-83af24027b3df1af5c5a9aa9adcdcfeb3429d3be.tar.gz linux-83af24027b3df1af5c5a9aa9adcdcfeb3429d3be.tar.bz2 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/linux/pwm.h')
-rw-r--r-- | include/linux/pwm.h | 3 |
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); |