Wie wende ich einen Patch auf meinem eingebetteten Gerät an?

Wie wende ich einen Patch auf meinem eingebetteten Gerät an?

Ich bin nicht sicher, ob dies das beste Subreddit dafür ist, aber ich werde es versuchen. Ich versuche, ein PWM-Signal auf einem eingebetteten Gerät mit Linux zu erzeugen. Dafür muss ich aber zuerst einen Patch anwenden. Das Problem ist, dass ich überhaupt keine Ahnung habe, was ich damit machen und wie ich es anwenden soll. Das ist, was ich bekomme:

$ git diff

diff --git a/arch/arm/mach-tegra/board-ardbeg-panel.c b/arch/arm/mach- tegra/board-ardbeg-panel.c
index c7da1e3..f954956 100644
--- a/arch/arm/mach-tegra/board-ardbeg-panel.c
+++ b/arch/arm/mach-tegra/board-ardbeg-panel.c
@@ -765,7 +765,6 @@ static struct tegra_panel      *ardbeg_panel_configure(struct board_info *board_out,
tegra_io_dpd_enable(&dsid_io);
break;
default:
- panel = &dsi_p_wuxga_10_1;
tegra_io_dpd_enable(&dsic_io);
tegra_io_dpd_enable(&dsid_io);
break;
@@ -775,7 +774,7 @@ static struct tegra_panel                      *ardbeg_panel_configure(struct board_info *board_out,
return panel;
}

-static void ardbeg_panel_select(void)
+static struct tegra_panel *ardbeg_panel_select(void)
{
struct tegra_panel *panel = NULL;
struct board_info board;
@@ -828,6 +827,8 @@ static void ardbeg_panel_select(void)
panel->register_i2c_bridge();
}

+ return panel;
+
}
#endif

@@ -837,7 +838,7 @@ int __init ardbeg_panel_init(void)
struct resource __maybe_unused *res;
struct platform_device *phost1x = NULL;
struct board_info board_info;
-
+ struct tegra_panel *panel = NULL;
struct device_node *dc1_node = NULL;
struct device_node *dc2_node = NULL;
#ifdef CONFIG_NVMAP_USE_CMA_FOR_CARVEOUT
@@ -848,7 +849,7 @@ int __init ardbeg_panel_init(void)
find_dc_node(&dc1_node, &dc2_node);

#ifndef CONFIG_TEGRA_HDMI_PRIMARY
- ardbeg_panel_select();
+ panel = ardbeg_panel_select();
#endif

#ifdef CONFIG_TEGRA_NVMAP
@@ -943,8 +944,8 @@ int __init ardbeg_panel_init(void)
tegra_fb2_start, tegra_fb2_size);

#ifndef CONFIG_TEGRA_HDMI_PRIMARY
- if (!of_have_populated_dt() || !dc1_node ||
- !of_device_is_available(dc1_node)) {
+ if (panel && (!of_have_populated_dt() || !dc1_node ||
+ !of_device_is_available(dc1_node))) {
ardbeg_disp1_device.dev.parent = &phost1x->dev;
err = platform_device_register(&ardbeg_disp1_device);
if (err) {

Quelle:http://elinux.org/Jetson/PWM

Ich versuche ein Signal über pwm1 zu erzeugen

verwandte Informationen