Ich experimentiere mit einem pwm-Treiber für das Beaglebone-Schwarz, basierend auf this one.Beaglebone devm_pwm_get liefert ENODEV
Wie ich Yocto bin mit der meta-bbb Schicht hatte ich die .dtsi neu zu schreiben:
&am33xx_pinmux {
bbb_pwm_P8_13_pins: bbb_pwm_P8_13_pins {
pinctrl-single,pins = <0x024 0x4>; /* P8_13 (ZCZ ball T10) | MODE 4 */
};
};
/{
[email protected] {
compatible = "tfe,bbb_pwm-1.00.a";
pwms = <&ehrpwm2 1 0 1>;
pwm-names = "PWM_P8_13";
pinctrl-names = "default";
pinctrl-0 = <&bbb_pwm_P8_13_pins>;
enabled = <0>;
duty = <0>;
status = "okay";
};
};
Doch während der Fahrer-Probe-Funktion, um den Anruf
pwm_test->pwm = devm_pwm_get(&pdev->dev, NULL);
kehrt ENODEV:
[ 7.538249] pinctrl-single 44e10800.pinmux: found group selector 15 for bbb_pwm_P8_13_pins
[ 7.538278] pinctrl-single 44e10800.pinmux: request pin 9 (44e10824.0) for [email protected]
[ 7.538291] pinctrl-single 44e10800.pinmux: enabling bbb_pwm_P8_13_pins function15
[ 7.538366] Loading bbb_pwm
[ 7.541304] bbb-pwm [email protected]: obtain a copy of previously claimed pinctrl
[ 7.541321] bbb-pwm [email protected]: Unable to request PWM (err = -19)
fand ich, dass der Fehler-Code von einem von sub-call d zurückgegeben evm_pwm_get:
static int pwm_device_request(struct pwm_device *pwm, const char *label)
{
/* .... */
if (!try_module_get(pwm->chip->ops->owner))
return -ENODEV;
/* ... */
}
Da ich aber recht neu bin auf Linux-Treiber, ich verstehe nicht, warum dies geschieht. Irgendwelche Hinweise?