diff options
Diffstat (limited to 'patches.tizen/1006-pwm-Use-the-DT-macro-directly-when-parsing-PWM-DT-fl.patch')
-rw-r--r-- | patches.tizen/1006-pwm-Use-the-DT-macro-directly-when-parsing-PWM-DT-fl.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/patches.tizen/1006-pwm-Use-the-DT-macro-directly-when-parsing-PWM-DT-fl.patch b/patches.tizen/1006-pwm-Use-the-DT-macro-directly-when-parsing-PWM-DT-fl.patch new file mode 100644 index 00000000000..544b1924f80 --- /dev/null +++ b/patches.tizen/1006-pwm-Use-the-DT-macro-directly-when-parsing-PWM-DT-fl.patch @@ -0,0 +1,46 @@ +From 73ef24362fe595524f4de6b3bc1ea7934a156670 Mon Sep 17 00:00:00 2001 +From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> +Date: Thu, 18 Jul 2013 00:54:22 +0200 +Subject: [PATCH 1006/1302] pwm: Use the DT macro directly when parsing PWM DT + flags + +Don't redefine a PWM_SPEC_POLARITY macro with a value identical to +PWM_POLARITY_INVERTED, use the PWM DT macro directly. + +Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> +Reviewed-by: Stephen Warren <swarren@nvidia.com> +Signed-off-by: Thierry Reding <thierry.reding@gmail.com> +Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> +--- + drivers/pwm/core.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c +index dfbfbc5..2ca9504 100644 +--- a/drivers/pwm/core.c ++++ b/drivers/pwm/core.c +@@ -30,10 +30,9 @@ + #include <linux/debugfs.h> + #include <linux/seq_file.h> + +-#define MAX_PWMS 1024 ++#include <dt-bindings/pwm/pwm.h> + +-/* flags in the third cell of the DT PWM specifier */ +-#define PWM_SPEC_POLARITY (1 << 0) ++#define MAX_PWMS 1024 + + static DEFINE_MUTEX(pwm_lookup_lock); + static LIST_HEAD(pwm_lookup_list); +@@ -149,7 +148,7 @@ of_pwm_xlate_with_flags(struct pwm_chip *pc, const struct of_phandle_args *args) + + pwm_set_period(pwm, args->args[1]); + +- if (args->args[2] & PWM_SPEC_POLARITY) ++ if (args->args[2] & PWM_POLARITY_INVERTED) + pwm_set_polarity(pwm, PWM_POLARITY_INVERSED); + else + pwm_set_polarity(pwm, PWM_POLARITY_NORMAL); +-- +1.8.3.2 + |