/* SPDX-License-Identifier: GPL-2.0 */


#ifndef AMD_PMF_IO_H
#define AMD_PMF_IO_H

#include <linux/types.h>


enum sfh_message_type {
	MT_HPD,
	MT_ALS,
	MT_SRA,
};


enum sfh_hpd_info {
	SFH_NOT_DETECTED,
	SFH_USER_PRESENT,
	SFH_USER_AWAY,
};


struct amd_sfh_info {
	u32 ambient_light;
	u8 user_present;
	u32 platform_type;
	u32 laptop_placement;
};

enum laptop_placement {
	LP_UNKNOWN = 0,
	ON_TABLE,
	ON_LAP_MOTION,
	IN_BAG,
	OUT_OF_BAG,
	LP_UNDEFINED,
};


struct amd_pmf_npu_metrics {
	u16 npuclk_freq;
	u16 npu_busy[8];
	u16 npu_power;
	u16 mpnpuclk_freq;
	u16 npu_reads;
	u16 npu_writes;
};

int amd_get_sfh_info(struct amd_sfh_info *sfh_info, enum sfh_message_type op);


int amd_pmf_get_npu_data(struct amd_pmf_npu_metrics *info);
#endif
