diff mbox series

[v2,01/19] pwm: Export pwm_add_table() / pwm_remove_table()

Message ID 20230430165807.472798-2-hdegoede@redhat.com
State Superseded
Headers show
Series platform/x86: lenovo-yogabook: Modify to also work on Android version | expand

Commit Message

Hans de Goede April 30, 2023, 4:57 p.m. UTC
Lenovo Yoga Book 1 (yb1-x90f/l) models have a backlit keyboard where
the brightness is directly controlled by one of the Intel Cherry Trail
SoCs PWM controllers.

To control the backlight the drivers/platform/lenovo-yogabook.c needs
to add a pwm_lookup table entry so that it can call pwm_get() to get
a reference to the PWM controller.

The lenovo-yogabook driver can be build as a module, export
pwm_add_table() and pwm_remove_table() so that the lenovo-yogabook
driver can use them when build as a module.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/pwm/core.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 474725714a05..c66daac6154f 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -881,6 +881,7 @@  void pwm_add_table(struct pwm_lookup *table, size_t num)
 
 	mutex_unlock(&pwm_lookup_lock);
 }
+EXPORT_SYMBOL_GPL(pwm_add_table);
 
 /**
  * pwm_remove_table() - unregister PWM device consumers
@@ -898,6 +899,7 @@  void pwm_remove_table(struct pwm_lookup *table, size_t num)
 
 	mutex_unlock(&pwm_lookup_lock);
 }
+EXPORT_SYMBOL_GPL(pwm_remove_table);
 
 /**
  * pwm_get() - look up and request a PWM device