/* SPDX-License-Identifier: GPL-2.0-only OR MIT */


#ifndef _LINUX_SOC_APPLE_TUNABLE_H_
#define _LINUX_SOC_APPLE_TUNABLE_H_

#include <linux/device.h>
#include <linux/types.h>


struct apple_tunable {
	size_t sz;
	struct {
		u32 offset;
		u32 mask;
		u32 value;
	} values[] __counted_by(sz);
};


struct apple_tunable *devm_apple_tunable_parse(struct device *dev,
					       struct device_node *np,
					       const char *name,
					       struct resource *res);


void apple_tunable_apply(void __iomem *regs, struct apple_tunable *tunable);

#endif
