[android12-linux-5.1] [ST chip] The file name is garbled after driver transplantation

After the ST sensor chip driver was transplanted, some attribute file names were garbled.

When transplanting the driver, the ST document introduces the need to modify types.h. After comparing the data, it is found that part of the enum is added. Manually add it (as shown below) and the compilation will be successful. But here we only add enum. When using iio devices, we also need to use these enum-related names (strings). This part has not been added, so when the driver generates the file, it will not find the available characters and garbled characters will appear.

/kernel-5.10/include/uapi/linux/iio/types.h

The solution to this problem is to add relevant definitions to the source code of iio, as shown below:

/kernel-5.10/drivers/iio/industrialio-core.c

 New to the industry, share your experience. If there are any mistakes, please point them out~

 Copyright belongs to: Shenzhen Qizhi Technology Co., Ltd.-Huahua

Guess you like

Origin blog.csdn.net/lsh670660992/article/details/132453736