| .. | .. |
|---|
| 5 | 5 | #include <linux/err.h> |
|---|
| 6 | 6 | #include <linux/mutex.h> |
|---|
| 7 | 7 | #include <linux/of.h> |
|---|
| 8 | +#include <linux/android_kabi.h> |
|---|
| 8 | 9 | |
|---|
| 9 | 10 | struct pwm_capture; |
|---|
| 10 | 11 | struct seq_file; |
|---|
| .. | .. |
|---|
| 59 | 60 | PWM_OUTPUT_MODULATED = 1 << 1, |
|---|
| 60 | 61 | }; |
|---|
| 61 | 62 | |
|---|
| 62 | | -/** |
|---|
| 63 | | - * struct pwm_output_pattern - PWM duty pattern for MODULATED duty type |
|---|
| 64 | | - * @duty_pattern: PWM duty cycles in the pattern for duty modulation |
|---|
| 65 | | - * @num_entries: number of entries in the pattern |
|---|
| 66 | | - * @cycles_per_duty: number of PWM period cycles an entry stays at |
|---|
| 67 | | - */ |
|---|
| 68 | | -struct pwm_output_pattern { |
|---|
| 69 | | - u64 *duty_pattern; |
|---|
| 70 | | - unsigned int num_entries; |
|---|
| 71 | | - u64 cycles_per_duty; |
|---|
| 72 | | -}; |
|---|
| 73 | | - |
|---|
| 74 | 63 | /* |
|---|
| 75 | 64 | * struct pwm_state - state of a PWM channel |
|---|
| 76 | 65 | * @period: PWM period (in nanoseconds) |
|---|
| .. | .. |
|---|
| 83 | 72 | u64 duty_cycle; |
|---|
| 84 | 73 | enum pwm_polarity polarity; |
|---|
| 85 | 74 | enum pwm_output_type output_type; |
|---|
| 86 | | - struct pwm_output_pattern *output_pattern; |
|---|
| 87 | 75 | #ifdef CONFIG_PWM_ROCKCHIP_ONESHOT |
|---|
| 88 | 76 | u64 oneshot_count; |
|---|
| 89 | 77 | #endif /* CONFIG_PWM_ROCKCHIP_ONESHOT */ |
|---|
| .. | .. |
|---|
| 99 | 87 | * @chip: PWM chip providing this PWM device |
|---|
| 100 | 88 | * @chip_data: chip-private data associated with the PWM device |
|---|
| 101 | 89 | * @args: PWM arguments |
|---|
| 102 | | - * @state: curent PWM channel state |
|---|
| 90 | + * @state: last applied state |
|---|
| 91 | + * @last: last implemented state (for PWM_DEBUG) |
|---|
| 103 | 92 | */ |
|---|
| 104 | 93 | struct pwm_device { |
|---|
| 105 | 94 | const char *label; |
|---|
| .. | .. |
|---|
| 111 | 100 | |
|---|
| 112 | 101 | struct pwm_args args; |
|---|
| 113 | 102 | struct pwm_state state; |
|---|
| 103 | + struct pwm_state last; |
|---|
| 104 | + |
|---|
| 105 | + ANDROID_KABI_RESERVE(1); |
|---|
| 114 | 106 | }; |
|---|
| 115 | 107 | |
|---|
| 116 | 108 | /** |
|---|
| .. | .. |
|---|
| 133 | 125 | return state.enabled; |
|---|
| 134 | 126 | } |
|---|
| 135 | 127 | |
|---|
| 136 | | -static inline void pwm_set_period(struct pwm_device *pwm, unsigned int period) |
|---|
| 128 | +static inline void pwm_set_period(struct pwm_device *pwm, u64 period) |
|---|
| 137 | 129 | { |
|---|
| 138 | 130 | if (pwm) |
|---|
| 139 | 131 | pwm->state.period = period; |
|---|
| 140 | 132 | } |
|---|
| 141 | 133 | |
|---|
| 142 | | -static inline void pwm_set_period_extend(struct pwm_device *pwm, u64 period) |
|---|
| 143 | | -{ |
|---|
| 144 | | - if (pwm) |
|---|
| 145 | | - pwm->state.period = period; |
|---|
| 146 | | -} |
|---|
| 147 | | - |
|---|
| 148 | | -static inline unsigned int pwm_get_period(const struct pwm_device *pwm) |
|---|
| 149 | | -{ |
|---|
| 150 | | - struct pwm_state state; |
|---|
| 151 | | - |
|---|
| 152 | | - pwm_get_state(pwm, &state); |
|---|
| 153 | | - |
|---|
| 154 | | - if (state.period > UINT_MAX) |
|---|
| 155 | | - pr_warn("PWM period %llu is truncated\n", state.period); |
|---|
| 156 | | - |
|---|
| 157 | | - return (unsigned int)state.period; |
|---|
| 158 | | -} |
|---|
| 159 | | - |
|---|
| 160 | | -static inline u64 pwm_get_period_extend(const struct pwm_device *pwm) |
|---|
| 134 | +static inline u64 pwm_get_period(const struct pwm_device *pwm) |
|---|
| 161 | 135 | { |
|---|
| 162 | 136 | struct pwm_state state; |
|---|
| 163 | 137 | |
|---|
| .. | .. |
|---|
| 172 | 146 | pwm->state.duty_cycle = duty; |
|---|
| 173 | 147 | } |
|---|
| 174 | 148 | |
|---|
| 175 | | -static inline void pwm_set_duty_cycle_extend(struct pwm_device *pwm, u64 duty) |
|---|
| 176 | | -{ |
|---|
| 177 | | - if (pwm) |
|---|
| 178 | | - pwm->state.duty_cycle = duty; |
|---|
| 179 | | -} |
|---|
| 180 | | - |
|---|
| 181 | | -static inline unsigned int pwm_get_duty_cycle(const struct pwm_device *pwm) |
|---|
| 182 | | -{ |
|---|
| 183 | | - struct pwm_state state; |
|---|
| 184 | | - |
|---|
| 185 | | - pwm_get_state(pwm, &state); |
|---|
| 186 | | - |
|---|
| 187 | | - if (state.duty_cycle > UINT_MAX) |
|---|
| 188 | | - pr_warn("PWM duty cycle %llu is truncated\n", state.duty_cycle); |
|---|
| 189 | | - |
|---|
| 190 | | - return (unsigned int)state.duty_cycle; |
|---|
| 191 | | -} |
|---|
| 192 | | - |
|---|
| 193 | | -static inline u64 pwm_get_duty_cycle_extend(const struct pwm_device *pwm) |
|---|
| 149 | +static inline u64 pwm_get_duty_cycle(const struct pwm_device *pwm) |
|---|
| 194 | 150 | { |
|---|
| 195 | 151 | struct pwm_state state; |
|---|
| 196 | 152 | |
|---|
| .. | .. |
|---|
| 216 | 172 | pwm_get_state(pwm, &state); |
|---|
| 217 | 173 | |
|---|
| 218 | 174 | return state.output_type; |
|---|
| 219 | | -} |
|---|
| 220 | | - |
|---|
| 221 | | -static inline struct pwm_output_pattern *pwm_get_output_pattern( |
|---|
| 222 | | - struct pwm_device *pwm) |
|---|
| 223 | | -{ |
|---|
| 224 | | - struct pwm_state state; |
|---|
| 225 | | - |
|---|
| 226 | | - pwm_get_state(pwm, &state); |
|---|
| 227 | | - |
|---|
| 228 | | - return pwm->state.output_pattern ?: NULL; |
|---|
| 229 | 175 | } |
|---|
| 230 | 176 | |
|---|
| 231 | 177 | static inline void pwm_get_args(const struct pwm_device *pwm, |
|---|
| .. | .. |
|---|
| 326 | 272 | * struct pwm_ops - PWM controller operations |
|---|
| 327 | 273 | * @request: optional hook for requesting a PWM |
|---|
| 328 | 274 | * @free: optional hook for freeing a PWM |
|---|
| 329 | | - * @config: configure duty cycles and period length for this PWM |
|---|
| 330 | | - * @config_extend: configure duty cycles and period length for this |
|---|
| 331 | | - * PWM with u64 data type |
|---|
| 332 | | - * @set_polarity: configure the polarity of this PWM |
|---|
| 333 | 275 | * @capture: capture and report PWM signal |
|---|
| 334 | | - * @enable: enable PWM output toggling |
|---|
| 335 | | - * @disable: disable PWM output toggling |
|---|
| 336 | | - * @get_output_type_supported: get the supported output type |
|---|
| 337 | | - * @set_output_type: set PWM output type |
|---|
| 338 | | - * @set_output_pattern: set the pattern for the modulated output |
|---|
| 339 | | - * @apply: atomically apply a new PWM config. The state argument |
|---|
| 340 | | - * should be adjusted with the real hardware config (if the |
|---|
| 341 | | - * approximate the period or duty_cycle value, state should |
|---|
| 342 | | - * reflect it) |
|---|
| 276 | + * @apply: atomically apply a new PWM config |
|---|
| 343 | 277 | * @get_state: get the current PWM state. This function is only |
|---|
| 344 | 278 | * called once per PWM device when the PWM chip is |
|---|
| 345 | 279 | * registered. |
|---|
| 346 | | - * @dbg_show: optional routine to show contents in debugfs |
|---|
| 280 | + * @get_output_type_supported: get the supported output type of this PWM |
|---|
| 347 | 281 | * @owner: helps prevent removal of modules exporting active PWMs |
|---|
| 282 | + * @config: configure duty cycles and period length for this PWM |
|---|
| 283 | + * @set_polarity: configure the polarity of this PWM |
|---|
| 284 | + * @enable: enable PWM output toggling |
|---|
| 285 | + * @disable: disable PWM output toggling |
|---|
| 348 | 286 | */ |
|---|
| 349 | 287 | struct pwm_ops { |
|---|
| 350 | 288 | int (*request)(struct pwm_chip *chip, struct pwm_device *pwm); |
|---|
| 351 | 289 | void (*free)(struct pwm_chip *chip, struct pwm_device *pwm); |
|---|
| 352 | | - int (*config)(struct pwm_chip *chip, struct pwm_device *pwm, |
|---|
| 353 | | - int duty_ns, int period_ns); |
|---|
| 354 | | - int (*config_extend)(struct pwm_chip *chip, struct pwm_device *pwm, |
|---|
| 355 | | - u64 duty_ns, u64 period_ns); |
|---|
| 356 | | - int (*set_polarity)(struct pwm_chip *chip, struct pwm_device *pwm, |
|---|
| 357 | | - enum pwm_polarity polarity); |
|---|
| 358 | 290 | int (*capture)(struct pwm_chip *chip, struct pwm_device *pwm, |
|---|
| 359 | 291 | struct pwm_capture *result, unsigned long timeout); |
|---|
| 360 | | - int (*enable)(struct pwm_chip *chip, struct pwm_device *pwm); |
|---|
| 361 | | - void (*disable)(struct pwm_chip *chip, struct pwm_device *pwm); |
|---|
| 362 | | - int (*get_output_type_supported)(struct pwm_chip *chip, |
|---|
| 363 | | - struct pwm_device *pwm); |
|---|
| 364 | | - int (*set_output_type)(struct pwm_chip *chip, struct pwm_device *pwm, |
|---|
| 365 | | - enum pwm_output_type output_type); |
|---|
| 366 | | - int (*set_output_pattern)(struct pwm_chip *chip, |
|---|
| 367 | | - struct pwm_device *pwm, |
|---|
| 368 | | - struct pwm_output_pattern *output_pattern); |
|---|
| 369 | 292 | int (*apply)(struct pwm_chip *chip, struct pwm_device *pwm, |
|---|
| 370 | | - struct pwm_state *state); |
|---|
| 293 | + const struct pwm_state *state); |
|---|
| 371 | 294 | void (*get_state)(struct pwm_chip *chip, struct pwm_device *pwm, |
|---|
| 372 | 295 | struct pwm_state *state); |
|---|
| 373 | | -#ifdef CONFIG_DEBUG_FS |
|---|
| 374 | | - void (*dbg_show)(struct pwm_chip *chip, struct seq_file *s); |
|---|
| 375 | | -#endif |
|---|
| 296 | + int (*get_output_type_supported)(struct pwm_chip *chip, |
|---|
| 297 | + struct pwm_device *pwm); |
|---|
| 376 | 298 | struct module *owner; |
|---|
| 299 | + |
|---|
| 300 | + /* Only used by legacy drivers */ |
|---|
| 301 | + int (*config)(struct pwm_chip *chip, struct pwm_device *pwm, |
|---|
| 302 | + int duty_ns, int period_ns); |
|---|
| 303 | + int (*set_polarity)(struct pwm_chip *chip, struct pwm_device *pwm, |
|---|
| 304 | + enum pwm_polarity polarity); |
|---|
| 305 | + int (*enable)(struct pwm_chip *chip, struct pwm_device *pwm); |
|---|
| 306 | + void (*disable)(struct pwm_chip *chip, struct pwm_device *pwm); |
|---|
| 307 | + |
|---|
| 308 | + ANDROID_KABI_RESERVE(1); |
|---|
| 377 | 309 | }; |
|---|
| 378 | 310 | |
|---|
| 379 | 311 | /** |
|---|
| 380 | 312 | * struct pwm_chip - abstract a PWM controller |
|---|
| 381 | 313 | * @dev: device providing the PWMs |
|---|
| 382 | | - * @list: list node for internal use |
|---|
| 383 | 314 | * @ops: callbacks for this PWM controller |
|---|
| 384 | 315 | * @base: number of first PWM controlled by this chip |
|---|
| 385 | 316 | * @npwm: number of PWMs controlled by this chip |
|---|
| 386 | | - * @pwms: array of PWM devices allocated by the framework |
|---|
| 387 | 317 | * @of_xlate: request a PWM device given a device tree PWM specifier |
|---|
| 388 | 318 | * @of_pwm_n_cells: number of cells expected in the device tree PWM specifier |
|---|
| 319 | + * @list: list node for internal use |
|---|
| 320 | + * @pwms: array of PWM devices allocated by the framework |
|---|
| 389 | 321 | */ |
|---|
| 390 | 322 | struct pwm_chip { |
|---|
| 391 | 323 | struct device *dev; |
|---|
| 392 | | - struct list_head list; |
|---|
| 393 | 324 | const struct pwm_ops *ops; |
|---|
| 394 | 325 | int base; |
|---|
| 395 | 326 | unsigned int npwm; |
|---|
| 396 | 327 | |
|---|
| 397 | | - struct pwm_device *pwms; |
|---|
| 398 | | - |
|---|
| 399 | 328 | struct pwm_device * (*of_xlate)(struct pwm_chip *pc, |
|---|
| 400 | 329 | const struct of_phandle_args *args); |
|---|
| 401 | 330 | unsigned int of_pwm_n_cells; |
|---|
| 331 | + |
|---|
| 332 | + /* only used internally by the PWM framework */ |
|---|
| 333 | + struct list_head list; |
|---|
| 334 | + struct pwm_device *pwms; |
|---|
| 335 | + |
|---|
| 336 | + ANDROID_KABI_RESERVE(1); |
|---|
| 402 | 337 | }; |
|---|
| 403 | 338 | |
|---|
| 404 | 339 | /** |
|---|
| .. | .. |
|---|
| 407 | 342 | * @duty_cycle: duty cycle of the PWM signal (in nanoseconds) |
|---|
| 408 | 343 | */ |
|---|
| 409 | 344 | struct pwm_capture { |
|---|
| 410 | | - u64 period; |
|---|
| 411 | | - u64 duty_cycle; |
|---|
| 345 | + unsigned int period; |
|---|
| 346 | + unsigned int duty_cycle; |
|---|
| 412 | 347 | }; |
|---|
| 413 | 348 | |
|---|
| 414 | 349 | #if IS_ENABLED(CONFIG_PWM) |
|---|
| 415 | 350 | /* PWM user APIs */ |
|---|
| 416 | 351 | struct pwm_device *pwm_request(int pwm_id, const char *label); |
|---|
| 417 | 352 | void pwm_free(struct pwm_device *pwm); |
|---|
| 418 | | -int pwm_apply_state(struct pwm_device *pwm, struct pwm_state *state); |
|---|
| 353 | +int pwm_apply_state(struct pwm_device *pwm, const struct pwm_state *state); |
|---|
| 419 | 354 | int pwm_adjust_config(struct pwm_device *pwm); |
|---|
| 420 | 355 | |
|---|
| 421 | 356 | /** |
|---|
| 422 | | - * pwm_output_type_support() |
|---|
| 357 | + * pwm_get_output_type_supported() - obtain output type of a PWM device. |
|---|
| 423 | 358 | * @pwm: PWM device |
|---|
| 424 | 359 | * |
|---|
| 425 | | - * Returns: output types supported by the PWM device |
|---|
| 360 | + * Returns: output type supported by the PWM device |
|---|
| 426 | 361 | */ |
|---|
| 427 | 362 | static inline int pwm_get_output_type_supported(struct pwm_device *pwm) |
|---|
| 428 | 363 | { |
|---|
| 429 | | - if (pwm->chip->ops->get_output_type_supported != NULL) |
|---|
| 364 | + if (!pwm) |
|---|
| 365 | + return -EINVAL; |
|---|
| 366 | + |
|---|
| 367 | + if (pwm->chip->ops->get_output_type_supported) |
|---|
| 430 | 368 | return pwm->chip->ops->get_output_type_supported(pwm->chip, |
|---|
| 431 | | - pwm); |
|---|
| 432 | | - else |
|---|
| 433 | | - return PWM_OUTPUT_FIXED; |
|---|
| 369 | + pwm); |
|---|
| 370 | + |
|---|
| 371 | + return PWM_OUTPUT_FIXED; |
|---|
| 434 | 372 | } |
|---|
| 435 | 373 | |
|---|
| 436 | 374 | /** |
|---|
| .. | .. |
|---|
| 458 | 396 | |
|---|
| 459 | 397 | state.duty_cycle = duty_ns; |
|---|
| 460 | 398 | state.period = period_ns; |
|---|
| 461 | | - return pwm_apply_state(pwm, &state); |
|---|
| 462 | | -} |
|---|
| 463 | | - |
|---|
| 464 | | -/** |
|---|
| 465 | | - * pwm_config_extend() - change PWM period and duty length with u64 data type |
|---|
| 466 | | - * @pwm: PWM device |
|---|
| 467 | | - * @duty_ns: "on" time (in nanoseconds) |
|---|
| 468 | | - * @period_ns: duration (in nanoseconds) of one cycle |
|---|
| 469 | | - * |
|---|
| 470 | | - * Returns: 0 on success or a negative error code on failure. |
|---|
| 471 | | - */ |
|---|
| 472 | | -static inline int pwm_config_extend(struct pwm_device *pwm, u64 duty_ns, |
|---|
| 473 | | - u64 period_ns) |
|---|
| 474 | | -{ |
|---|
| 475 | | - struct pwm_state state; |
|---|
| 476 | | - |
|---|
| 477 | | - if (!pwm) |
|---|
| 478 | | - return -EINVAL; |
|---|
| 479 | | - |
|---|
| 480 | | - pwm_get_state(pwm, &state); |
|---|
| 481 | | - if (state.duty_cycle == duty_ns && state.period == period_ns) |
|---|
| 482 | | - return 0; |
|---|
| 483 | | - |
|---|
| 484 | | - state.duty_cycle = duty_ns; |
|---|
| 485 | | - state.period = period_ns; |
|---|
| 486 | | - return pwm_apply_state(pwm, &state); |
|---|
| 487 | | -} |
|---|
| 488 | | - |
|---|
| 489 | | -/** |
|---|
| 490 | | - * pwm_set_polarity() - configure the polarity of a PWM signal |
|---|
| 491 | | - * @pwm: PWM device |
|---|
| 492 | | - * @polarity: new polarity of the PWM signal |
|---|
| 493 | | - * |
|---|
| 494 | | - * Note that the polarity cannot be configured while the PWM device is |
|---|
| 495 | | - * enabled. |
|---|
| 496 | | - * |
|---|
| 497 | | - * Returns: 0 on success or a negative error code on failure. |
|---|
| 498 | | - */ |
|---|
| 499 | | -static inline int pwm_set_polarity(struct pwm_device *pwm, |
|---|
| 500 | | - enum pwm_polarity polarity) |
|---|
| 501 | | -{ |
|---|
| 502 | | - struct pwm_state state; |
|---|
| 503 | | - |
|---|
| 504 | | - if (!pwm) |
|---|
| 505 | | - return -EINVAL; |
|---|
| 506 | | - |
|---|
| 507 | | - pwm_get_state(pwm, &state); |
|---|
| 508 | | - if (state.polarity == polarity) |
|---|
| 509 | | - return 0; |
|---|
| 510 | | - |
|---|
| 511 | | - /* |
|---|
| 512 | | - * Changing the polarity of a running PWM without adjusting the |
|---|
| 513 | | - * dutycycle/period value is a bit risky (can introduce glitches). |
|---|
| 514 | | - * Return -EBUSY in this case. |
|---|
| 515 | | - * Note that this is allowed when using pwm_apply_state() because |
|---|
| 516 | | - * the user specifies all the parameters. |
|---|
| 517 | | - */ |
|---|
| 518 | | - if (state.enabled) |
|---|
| 519 | | - return -EBUSY; |
|---|
| 520 | | - |
|---|
| 521 | | - state.polarity = polarity; |
|---|
| 522 | 399 | return pwm_apply_state(pwm, &state); |
|---|
| 523 | 400 | } |
|---|
| 524 | 401 | |
|---|
| .. | .. |
|---|
| 580 | 457 | const struct of_phandle_args *args); |
|---|
| 581 | 458 | |
|---|
| 582 | 459 | struct pwm_device *pwm_get(struct device *dev, const char *con_id); |
|---|
| 583 | | -struct pwm_device *of_pwm_get(struct device_node *np, const char *con_id); |
|---|
| 460 | +struct pwm_device *of_pwm_get(struct device *dev, struct device_node *np, |
|---|
| 461 | + const char *con_id); |
|---|
| 584 | 462 | void pwm_put(struct pwm_device *pwm); |
|---|
| 585 | 463 | |
|---|
| 586 | 464 | struct pwm_device *devm_pwm_get(struct device *dev, const char *con_id); |
|---|
| 587 | 465 | struct pwm_device *devm_of_pwm_get(struct device *dev, struct device_node *np, |
|---|
| 588 | 466 | const char *con_id); |
|---|
| 467 | +struct pwm_device *devm_fwnode_pwm_get(struct device *dev, |
|---|
| 468 | + struct fwnode_handle *fwnode, |
|---|
| 469 | + const char *con_id); |
|---|
| 589 | 470 | void devm_pwm_put(struct device *dev, struct pwm_device *pwm); |
|---|
| 590 | 471 | #else |
|---|
| 591 | 472 | static inline struct pwm_device *pwm_request(int pwm_id, const char *label) |
|---|
| .. | .. |
|---|
| 608 | 489 | return -ENOTSUPP; |
|---|
| 609 | 490 | } |
|---|
| 610 | 491 | |
|---|
| 492 | +static inline int pwm_get_output_type_supported(struct pwm_device *pwm) |
|---|
| 493 | +{ |
|---|
| 494 | + return -EINVAL; |
|---|
| 495 | +} |
|---|
| 496 | + |
|---|
| 611 | 497 | static inline int pwm_config(struct pwm_device *pwm, int duty_ns, |
|---|
| 612 | 498 | int period_ns) |
|---|
| 613 | 499 | { |
|---|
| .. | .. |
|---|
| 619 | 505 | unsigned long timeout) |
|---|
| 620 | 506 | { |
|---|
| 621 | 507 | return -EINVAL; |
|---|
| 622 | | -} |
|---|
| 623 | | - |
|---|
| 624 | | -static inline int pwm_set_polarity(struct pwm_device *pwm, |
|---|
| 625 | | - enum pwm_polarity polarity) |
|---|
| 626 | | -{ |
|---|
| 627 | | - return -ENOTSUPP; |
|---|
| 628 | 508 | } |
|---|
| 629 | 509 | |
|---|
| 630 | 510 | static inline int pwm_enable(struct pwm_device *pwm) |
|---|
| .. | .. |
|---|
| 674 | 554 | return ERR_PTR(-ENODEV); |
|---|
| 675 | 555 | } |
|---|
| 676 | 556 | |
|---|
| 677 | | -static inline struct pwm_device *of_pwm_get(struct device_node *np, |
|---|
| 557 | +static inline struct pwm_device *of_pwm_get(struct device *dev, |
|---|
| 558 | + struct device_node *np, |
|---|
| 678 | 559 | const char *con_id) |
|---|
| 679 | 560 | { |
|---|
| 680 | 561 | return ERR_PTR(-ENODEV); |
|---|
| .. | .. |
|---|
| 697 | 578 | return ERR_PTR(-ENODEV); |
|---|
| 698 | 579 | } |
|---|
| 699 | 580 | |
|---|
| 581 | +static inline struct pwm_device * |
|---|
| 582 | +devm_fwnode_pwm_get(struct device *dev, struct fwnode_handle *fwnode, |
|---|
| 583 | + const char *con_id) |
|---|
| 584 | +{ |
|---|
| 585 | + return ERR_PTR(-ENODEV); |
|---|
| 586 | +} |
|---|
| 587 | + |
|---|
| 700 | 588 | static inline void devm_pwm_put(struct device *dev, struct pwm_device *pwm) |
|---|
| 701 | 589 | { |
|---|
| 702 | 590 | } |
|---|