Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: pm8xxx-vibrator - add DT match table

The driver is only supported on DT enabled platforms. Convert the
driver to DT so that it can probe properly.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Stephen Boyd and committed by
Dmitry Torokhov
877e1f15 57918dfa

+30 -1
+22
Documentation/devicetree/bindings/input/qcom,pm8xxx-vib.txt
··· 1 + Qualcomm PM8xxx PMIC Vibrator 2 + 3 + PROPERTIES 4 + 5 + - compatible: 6 + Usage: required 7 + Value type: <string> 8 + Definition: must be one of: 9 + "qcom,pm8058-vib" 10 + "qcom,pm8921-vib" 11 + 12 + - reg: 13 + Usage: required 14 + Value type: <prop-encoded-array> 15 + Definition: address of vibration control register 16 + 17 + EXAMPLE 18 + 19 + vibrator@4a { 20 + compatible = "qcom,pm8058-vib"; 21 + reg = <0x4a>; 22 + };
+8 -1
drivers/input/misc/pm8xxx-vibrator.c
··· 142 142 } 143 143 144 144 static int pm8xxx_vib_probe(struct platform_device *pdev) 145 - 146 145 { 147 146 struct pm8xxx_vib *vib; 148 147 struct input_dev *input_dev; ··· 213 214 214 215 static SIMPLE_DEV_PM_OPS(pm8xxx_vib_pm_ops, pm8xxx_vib_suspend, NULL); 215 216 217 + static const struct of_device_id pm8xxx_vib_id_table[] = { 218 + { .compatible = "qcom,pm8058-vib" }, 219 + { .compatible = "qcom,pm8921-vib" }, 220 + { } 221 + }; 222 + MODULE_DEVICE_TABLE(of, pm8xxx_vib_id_table); 223 + 216 224 static struct platform_driver pm8xxx_vib_driver = { 217 225 .probe = pm8xxx_vib_probe, 218 226 .driver = { 219 227 .name = "pm8xxx-vib", 220 228 .owner = THIS_MODULE, 221 229 .pm = &pm8xxx_vib_pm_ops, 230 + .of_match_table = pm8xxx_vib_id_table, 222 231 }, 223 232 }; 224 233 module_platform_driver(pm8xxx_vib_driver);