how to trigger pwm_backlight_probe function ?

Hi:
we want LCD0_BKLT_PWM(b27) to be a pwm-backlight to driver a panel. we already know how to configure it at sysfs or let it to be a GPIO,but someone want to configure it as a pwm-backlight.

The problem is : I can’t trigger the pwm_backlight_probe function of pwm_bl.c .

May be I missed something?

There are something What I have did:

1. I added a panel panel-a-edp-1080p-13-3.dtsi,just like panel-a-edp-1080p-14-0.dtsi
 
2. modify tegra186-quill-common.dtsi
#include "tegra186-soc/tegra186-soc-cvm.dtsi"
#include "tegra186-platforms-simple-bus.dtsi"
#include "panels/panel-s-wuxga-8-0.dtsi"
#include "panels/panel-null-hotpluggable.dtsi"
#include "panels/panel-s-wqxga-10-1.dtsi"
#include <tegra186-soc/mods-simple-bus.dtsi>
#include "t18x-common-platforms/tegra186-quill-eqos.dtsi"
#include "tegra186-hdmi.dtsi"
#include "tegra186-dp.dtsi"
#include "panels/panel-s-edp-uhdtv-15-6.dtsi"
#include "panels/panel-a-edp-1080p-14-0.dtsi"
<b>#include "panels/panel-a-edp-1080p-13-3.dtsi"</b>
#include "tegra186-quill-pwm-fan.dtsi"
#include "tegra186-quill-thermal-fan-est.dtsi"
#include "tegra186-host1x-camera.dtsi"

............................................
	backlight {
		status = "okay";
		panel-s-wuxga-8-0-bl {
			pwms = <&tegra_pwm1 0 40161>;
		};
		panel-s-wqxga-10-1-bl {
			pwms = <&tegra_pwm1 0 1000000>;
		};
                panel-s-edp-uhdtv-15-6-bl {
                        pwms = <&tegra_pwm3 0 5000000>;
                };
		panel-a-edp-1080p-14-0-bl {
			pwms = <&tegra_pwm1 0 1000000>;
		};
		[b]panel-a-edp-1080p-13-3-bl {
			pwms = <&tegra_pwm1 0 1000000>;
		};[/b]
	};
  1. tegra186-quill-p3310-1000-a00-00-base.dts
#include <t18x-common-platforms/tegra186-quill-common-p3310-1000-a00.dtsi>
#include <t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi>
//#include <t18x-common-platforms/tegra186-quill-camera-modules.dtsi>
#include <t18x-common-modules/tegra186-camera-ar0134-li-mipi-adpt-a00.dtsi>
#include <t18x-common-modules/tegra186-display-e3320-1000-a00.dtsi>

/* comms dtsi file should be included after gpio dtsi file */
#include <t18x-common-platforms/tegra186-quill-comms.dtsi>
#include <t18x-common-plugin-manager/tegra186-quill-p3310-1000-a00-plugin-manager.dtsi>
#include <t18x-common-modules/tegra186-super-module-e2614-p2597-1000-a00.dtsi>
//#include <t18x-common-plugin-manager/tegra186-quill-display-plugin-manager.dtsi>
#include <t18x-common-prod/tegra186-priv-quill-p3310-1000-a00-prod.dtsi>
//#include <t18x-common-plugin-manager/tegra186-quill-camera-plugin-manager.dtsi>

#include <dt-bindings/linux/driver-info.h>

...................................................
nvdisplay@15200000 {
			status = "okay";
			nvidia,dc-or-node = "/host1x/sor";
		};

		sor {
			status = "okay";
			dp-display {
				status = "disabled";
			};
			hdmi-display {
				status = "disabled";
			};

			panel-s-edp-uhdtv-15-6 {
				status = "disabled";
			};

			panel-a-edp-1080p-14-0 {
				status = "disabled";
				smartdimmer {
				    status = "disabled";
				};
            };

			[b]panel-a-edp-1080p-13-3 {
				status = "okay";
				nvidia,is_ext_dp_panel = <0>;
			
				nvidia,panel-bl-en-gpio = <&tegra_aon_gpio TEGRA_AON_GPIO(U, 3) 1>; /* PU3 */
				nvidia,panel-en-gpio = <&tegra_main_gpio TEGRA_MAIN_GPIO(P, 3) 1>; /* PP3 */

				disp-default-out {
					/* SOR0->eDP on plld3; SOR1->HDMI on plld2 */
					nvidia,out-parent-clk = "plld3";
				};
				smartdimmer {
				    status = "disabled";
				};
			}; [/b]
		};

		dpaux@155c0000 {
			status = "okay";
		};
  1. added panel-a-edp-1080p-13-3.c just like panel-a-edp-1080p-14-0.c ,but use gpio,not regulator

    1. modify nvdisp_stub.c ,modify tegra_primary_panel_get_dt_node(…) ,tegra_secondary_panel_get_dt_node(…),tegra_tertiary_panel_get_dt_node(…)

I modified the panel-a-edp-1080p-13-3.dtsi,
from
backlight{
panel-a-edp-1080p-13-3-bl{
compatible = “a-edp,1080p-13-3-bl

}

}

to
backlight{
panel-a-edp-1080p-13-3-bl{
compatible = “pwm-backlight

}

}

found useless…

XuXiang,

The only working pwm-backlight is for DSI panel: panel-s-wuxga-8-0-bl.

Please refer to it as first step.

Thanks,I will try it!