diff options
| -rw-r--r-- | Documentation/pwm.txt | 3 | ||||
| -rw-r--r-- | include/linux/pwm.h | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Documentation/pwm.txt b/Documentation/pwm.txt index 0527f615b115..ca895fd211e4 100644 --- a/Documentation/pwm.txt +++ b/Documentation/pwm.txt | |||
| @@ -19,7 +19,8 @@ should instead register a static mapping that can be used to match PWM | |||
| 19 | consumers to providers, as given in the following example: | 19 | consumers to providers, as given in the following example: |
| 20 | 20 | ||
| 21 | static struct pwm_lookup board_pwm_lookup[] = { | 21 | static struct pwm_lookup board_pwm_lookup[] = { |
| 22 | PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL), | 22 | PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL, |
| 23 | 50000, PWM_POLARITY_NORMAL), | ||
| 23 | }; | 24 | }; |
| 24 | 25 | ||
| 25 | static void __init board_init(void) | 26 | static void __init board_init(void) |
diff --git a/include/linux/pwm.h b/include/linux/pwm.h index 2f45e2fe5b93..e90628cac8fa 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h | |||
| @@ -278,12 +278,14 @@ struct pwm_lookup { | |||
| 278 | enum pwm_polarity polarity; | 278 | enum pwm_polarity polarity; |
| 279 | }; | 279 | }; |
| 280 | 280 | ||
| 281 | #define PWM_LOOKUP(_provider, _index, _dev_id, _con_id) \ | 281 | #define PWM_LOOKUP(_provider, _index, _dev_id, _con_id, _period, _polarity) \ |
| 282 | { \ | 282 | { \ |
| 283 | .provider = _provider, \ | 283 | .provider = _provider, \ |
| 284 | .index = _index, \ | 284 | .index = _index, \ |
| 285 | .dev_id = _dev_id, \ | 285 | .dev_id = _dev_id, \ |
| 286 | .con_id = _con_id, \ | 286 | .con_id = _con_id, \ |
| 287 | .period = _period, \ | ||
| 288 | .polarity = _polarity \ | ||
| 287 | } | 289 | } |
| 288 | 290 | ||
| 289 | #if IS_ENABLED(CONFIG_PWM) | 291 | #if IS_ENABLED(CONFIG_PWM) |
