linux/drivers/platform/x86/intel/int3472/common.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Author: Dan Scally <[email protected]> */

#ifndef _INTEL_SKL_INT3472_H
#define _INTEL_SKL_INT3472_H

#include <linux/clk-provider.h>
#include <linux/gpio/machine.h>
#include <linux/leds.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/types.h>

/* FIXME drop this once the I2C_DEV_NAME_FORMAT macro has been added to include/linux/i2c.h */
#ifndef I2C_DEV_NAME_FORMAT
#define I2C_DEV_NAME_FORMAT
#endif

/* PMIC GPIO Types */
#define INT3472_GPIO_TYPE_RESET
#define INT3472_GPIO_TYPE_POWERDOWN
#define INT3472_GPIO_TYPE_POWER_ENABLE
#define INT3472_GPIO_TYPE_CLK_ENABLE
#define INT3472_GPIO_TYPE_PRIVACY_LED

#define INT3472_PDEV_MAX_NAME_LEN
#define INT3472_MAX_SENSOR_GPIOS

#define GPIO_REGULATOR_NAME_LENGTH
#define GPIO_REGULATOR_SUPPLY_NAME_LENGTH
#define GPIO_REGULATOR_SUPPLY_MAP_COUNT

#define INT3472_LED_MAX_NAME_LEN

#define CIO2_SENSOR_SSDB_MCLKSPEED_OFFSET

#define INT3472_REGULATOR(_name, _supply, _ops)

#define to_int3472_clk(hw)

#define to_int3472_device(clk)

struct acpi_device;
struct i2c_client;
struct platform_device;

struct int3472_cldb {};

struct int3472_discrete_device {};

union acpi_object *skl_int3472_get_acpi_buffer(struct acpi_device *adev,
					       char *id);
int skl_int3472_fill_cldb(struct acpi_device *adev, struct int3472_cldb *cldb);
int skl_int3472_get_sensor_adev_and_name(struct device *dev,
					 struct acpi_device **sensor_adev_ret,
					 const char **name_ret);

int skl_int3472_register_gpio_clock(struct int3472_discrete_device *int3472,
				    struct gpio_desc *gpio);
int skl_int3472_register_dsm_clock(struct int3472_discrete_device *int3472);
void skl_int3472_unregister_clock(struct int3472_discrete_device *int3472);

int skl_int3472_register_regulator(struct int3472_discrete_device *int3472,
				   struct gpio_desc *gpio);
void skl_int3472_unregister_regulator(struct int3472_discrete_device *int3472);

int skl_int3472_register_pled(struct int3472_discrete_device *int3472, struct gpio_desc *gpio);
void skl_int3472_unregister_pled(struct int3472_discrete_device *int3472);

#endif