Commit b16001d7 authored by Alexandre Belloni's avatar Alexandre Belloni Committed by Thierry Reding

ARM: shmobile: armadillo: initialize all struct pwm_lookup members

Initializing all the struct pwm_lookup members allows to get rid of the
struct tpu_pwm_platform_data as the polarity initialization will be
taken care of by the PWM core.
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarSimon Horman <horms+renesas@verge.net.au>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 3796ce1d
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
#include <linux/regulator/driver.h> #include <linux/regulator/driver.h>
#include <linux/pinctrl/machine.h> #include <linux/pinctrl/machine.h>
#include <linux/platform_data/pwm-renesas-tpu.h> #include <linux/pwm.h>
#include <linux/pwm_backlight.h> #include <linux/pwm_backlight.h>
#include <linux/regulator/fixed.h> #include <linux/regulator/fixed.h>
#include <linux/regulator/gpio-regulator.h> #include <linux/regulator/gpio-regulator.h>
...@@ -399,24 +399,22 @@ static struct resource pwm_resources[] = { ...@@ -399,24 +399,22 @@ static struct resource pwm_resources[] = {
}, },
}; };
static struct tpu_pwm_platform_data pwm_device_data = {
.channels[2] = {
.polarity = PWM_POLARITY_INVERSED,
}
};
static struct platform_device pwm_device = { static struct platform_device pwm_device = {
.name = "renesas-tpu-pwm", .name = "renesas-tpu-pwm",
.id = -1, .id = -1,
.dev = {
.platform_data = &pwm_device_data,
},
.num_resources = ARRAY_SIZE(pwm_resources), .num_resources = ARRAY_SIZE(pwm_resources),
.resource = pwm_resources, .resource = pwm_resources,
}; };
static struct pwm_lookup pwm_lookup[] = { static struct pwm_lookup pwm_lookup[] = {
PWM_LOOKUP("renesas-tpu-pwm", 2, "pwm-backlight.0", NULL), {
.provider = "renesas-tpu-pwm",
.index = 2,
.dev_id = "pwm-backlight.0",
.con_id = NULL,
.period = 33333,
.polarity = PWM_POLARITY_INVERSED,
},
}; };
/* LCDC and backlight */ /* LCDC and backlight */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment