提交 42844029 编写于 作者: A Alexandre Belloni 提交者: Thierry Reding

pwm: modify PWM_LOOKUP to initialize all struct pwm_lookup members

Now that PWM_LOOKUP is not used anymore, modify it to initialize all the
members of struct pwm_lookup.
Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 fcb35506
...@@ -19,7 +19,8 @@ should instead register a static mapping that can be used to match PWM ...@@ -19,7 +19,8 @@ should instead register a static mapping that can be used to match PWM
consumers to providers, as given in the following example: consumers to providers, as given in the following example:
static struct pwm_lookup board_pwm_lookup[] = { static struct pwm_lookup board_pwm_lookup[] = {
PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL), PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL,
50000, PWM_POLARITY_NORMAL),
}; };
static void __init board_init(void) static void __init board_init(void)
......
...@@ -278,12 +278,14 @@ struct pwm_lookup { ...@@ -278,12 +278,14 @@ struct pwm_lookup {
enum pwm_polarity polarity; enum pwm_polarity polarity;
}; };
#define PWM_LOOKUP(_provider, _index, _dev_id, _con_id) \ #define PWM_LOOKUP(_provider, _index, _dev_id, _con_id, _period, _polarity) \
{ \ { \
.provider = _provider, \ .provider = _provider, \
.index = _index, \ .index = _index, \
.dev_id = _dev_id, \ .dev_id = _dev_id, \
.con_id = _con_id, \ .con_id = _con_id, \
.period = _period, \
.polarity = _polarity \
} }
#if IS_ENABLED(CONFIG_PWM) #if IS_ENABLED(CONFIG_PWM)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册