An IR LED is connected to GPIO_6 of the PMIC pm6150l as in the refernce schematics and the device tree node is
irled {
irled_pwm: irled_pwm_default {
pins = "gpio6";
function = "func1";
qcom,drive-strength = <2>;
power-source = <0>;
bias-disable;
output-low;
};
};
By default this IR led is used by the qcom,camera-ir-led driver and the corresponding device tree is shown below,
ir_led: camera-ir-led@0 {
cell-index = <0>;
reg = <0x00>;
compatible = "qcom,camera-ir-led";
pwms = <&pm6150l_pwm_1 0 0>;
enable-active-high;
pinctrl-names = "default", "cam_default", "cam_suspend";
pinctrl-0 = <&irled_pwm>;
pinctrl-1 = <&cam_sensor_ir_cut_on>;
pinctrl-2 = <&cam_sensor_ir_cut_off>;
gpios = <&tlmm 73 0>,
<&tlmm 74 0>;
qcom,gpio-ir-p = <0>;
qcom,gpio-ir-m = <1>;
qcom,gpio-req-tbl-num = <0 1>;
qcom,gpio-req-tbl-flags = <0 0>;
qcom,gpio-req-tbl-label = "IR_CUT_FILTER_P",
"IR_CUT_FILTER_M";
gpio-no-mux = <0>;
status = "ok";
};
This driver uses pwm which most probably controls the IR LED but I don't want to use qcom,camera-ir-led driver instead I want to configure GPIO_6 of pm6150l as pwm or lpg so as to control the IR led through sysfs.
The technical overview document (80-PL631-500) says that "LPG can be used for HR LED, GPIO, RGB LED, and Haptics". I want to know how to configure the pwm/lpg out to the pmic gpio.