#include <linux/debugfs.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/random.h>
#include <linux/slab.h>
#include <linux/soc/qcom/smem.h>
#include <linux/soc/qcom/socinfo.h>
#include <linux/string.h>
#include <linux/stringify.h>
#include <linux/sys_soc.h>
#include <linux/types.h>
#include <asm/unaligned.h>
#include <dt-bindings/arm/qcom,ids.h>
#define qcom_board_id(id) …
#define qcom_board_id_named(id, name) …
#ifdef CONFIG_DEBUG_FS
#define SMEM_IMAGE_VERSION_BLOCKS_COUNT …
#define SMEM_IMAGE_VERSION_SIZE …
#define SMEM_IMAGE_VERSION_NAME_SIZE …
#define SMEM_IMAGE_VERSION_VARIANT_SIZE …
#define SMEM_IMAGE_VERSION_OEM_SIZE …
#define SMEM_IMAGE_TABLE_BOOT_INDEX …
#define SMEM_IMAGE_TABLE_TZ_INDEX …
#define SMEM_IMAGE_TABLE_RPM_INDEX …
#define SMEM_IMAGE_TABLE_APPS_INDEX …
#define SMEM_IMAGE_TABLE_MPSS_INDEX …
#define SMEM_IMAGE_TABLE_ADSP_INDEX …
#define SMEM_IMAGE_TABLE_CNSS_INDEX …
#define SMEM_IMAGE_TABLE_VIDEO_INDEX …
#define SMEM_IMAGE_TABLE_DSPS_INDEX …
#define SMEM_IMAGE_TABLE_CDSP_INDEX …
#define SMEM_IMAGE_TABLE_CDSP1_INDEX …
#define SMEM_IMAGE_TABLE_GPDSP_INDEX …
#define SMEM_IMAGE_TABLE_GPDSP1_INDEX …
#define SMEM_IMAGE_VERSION_TABLE …
static const char *const socinfo_image_names[] = …;
static const char *const pmic_models[] = …;
struct socinfo_params { … };
struct smem_image_version { … };
#endif
struct qcom_socinfo { … };
struct soc_id { … };
static const struct soc_id soc_id[] = …;
static const char *socinfo_machine(struct device *dev, unsigned int id)
{ … }
#ifdef CONFIG_DEBUG_FS
#define QCOM_OPEN(name, _func) …
#define DEBUGFS_ADD(info, name) …
static int qcom_show_build_id(struct seq_file *seq, void *p)
{ … }
static int qcom_show_pmic_model(struct seq_file *seq, void *p)
{ … }
static int qcom_show_pmic_model_array(struct seq_file *seq, void *p)
{ … }
static int qcom_show_pmic_die_revision(struct seq_file *seq, void *p)
{ … }
static int qcom_show_chip_id(struct seq_file *seq, void *p)
{ … }
QCOM_OPEN(…);
QCOM_OPEN(…);
QCOM_OPEN(…);
QCOM_OPEN(…);
QCOM_OPEN(…);
#define DEFINE_IMAGE_OPS(type) …
DEFINE_IMAGE_OPS(…);
DEFINE_IMAGE_OPS(…);
DEFINE_IMAGE_OPS(…);
static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
struct socinfo *info, size_t info_size)
{ … }
static void socinfo_debugfs_exit(struct qcom_socinfo *qcom_socinfo)
{ … }
#else
static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
struct socinfo *info, size_t info_size)
{
}
static void socinfo_debugfs_exit(struct qcom_socinfo *qcom_socinfo) { }
#endif
static int qcom_socinfo_probe(struct platform_device *pdev)
{ … }
static void qcom_socinfo_remove(struct platform_device *pdev)
{ … }
static struct platform_driver qcom_socinfo_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;