ZHCUCR3 January 2025 TPS65219
要将 TI PMIC 集成到基于 NXP SDK 的新系统中,请按照以下步骤应用 TPS65219 补丁文件。
打开以下文件:
在 linux 存储库文件夹(标签:v6.1)中:将 kernel-pmic.patch 移到正在使用的内核分支:
mv <file-path-to-your-patch>/kernel-pmic.patch <file-path-to-your-linux-branch>/linux/
在 uboot 存储库文件夹(标签:2023_04)中:
mv <file-path-to-your-patch>/u-boot-pmic.patch <file-path-to-your-uboot-branch>/u-boot/
在应用以下内容之前解压补丁文件:
gunzip pmic_device-patch.gz
xz -d pmic_device-patch.gz
(可选):逐步完成所述的修补程序,但使用 --dry-run 选项以避免永久性更改:
patch --dry-run <original_file_name_path> <mypatch.patch>
应用补丁文件的两个选项:
在 Linux 和 U-Boot 存储库目录中,逐个文件应用相应的修补程序文件:
patch <original_file_name> TPS65219-pmic.patchoriginal_file 替换示例:
patch <original_file> TPS65219-pmic.patch将 <original_file> 替换为:drivers/tps65219.c
命令示例
patch drivers/mfd/tps65219.c TPS65219-pmic.patchgit am -i <file-directory>/linux_patch_file.patch
git am -i <file-directory>/uboot_patch_file.patch使用 git am 时,如果文件不存在,该命令会显示错误。
如果出现这种情况:请使用 touch <file-directory-path> 创建缺失的文件,然后重新启动 git am。
由于文件在 v6.1 中缺失但存在于上游主线分支中,因此在应用内核补丁之前需要创建以下文件:
touch drivers/gpio/gpio-tps65219.c
touch drivers/input/misc/tps65219-pwrbutton.c
touch drivers/mfd/tps65219.c
touch include/linux/mfd/tps65219.h