linux/drivers/platform/x86/intel/int3472/tps68470.c

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

#include <linux/acpi.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/mfd/core.h>
#include <linux/mfd/tps68470.h>
#include <linux/platform_device.h>
#include <linux/platform_data/tps68470.h>
#include <linux/regmap.h>
#include <linux/string.h>

#include "common.h"
#include "tps68470.h"

#define DESIGNED_FOR_CHROMEOS
#define DESIGNED_FOR_WINDOWS

#define TPS68470_WIN_MFD_CELL_COUNT

static const struct mfd_cell tps68470_cros[] =;

static const struct regmap_config tps68470_regmap_config =;

static int tps68470_chip_init(struct device *dev, struct regmap *regmap)
{}

/** skl_int3472_tps68470_calc_type: Check what platform a device is designed for
 * @adev: A pointer to a &struct acpi_device
 *
 * Check CLDB buffer against the PMIC's adev. If present, then we check
 * the value of control_logic_type field and follow one of the
 * following scenarios:
 *
 *	1. No CLDB - likely ACPI tables designed for ChromeOS. We
 *	create platform devices for the GPIOs and OpRegion drivers.
 *
 *	2. CLDB, with control_logic_type = 2 - probably ACPI tables
 *	made for Windows 2-in-1 platforms. Register pdevs for GPIO,
 *	Clock and Regulator drivers to bind to.
 *
 *	3. Any other value in control_logic_type, we should never have
 *	gotten to this point; fail probe and return.
 *
 * Return:
 * * 1		Device intended for ChromeOS
 * * 2		Device intended for Windows
 * * -EINVAL	Where @adev has an object named CLDB but it does not conform to
 *		our expectations
 */
static int skl_int3472_tps68470_calc_type(struct acpi_device *adev)
{}

/*
 * Return the size of the flexible array member, because we'll need that later
 * on to pass .pdata_size to cells.
 */
static int
skl_int3472_fill_clk_pdata(struct device *dev, struct tps68470_clk_platform_data **clk_pdata)
{}

static int skl_int3472_tps68470_probe(struct i2c_client *client)
{}

static void skl_int3472_tps68470_remove(struct i2c_client *client)
{}

static const struct acpi_device_id int3472_device_id[] =;
MODULE_DEVICE_TABLE(acpi, int3472_device_id);

static struct i2c_driver int3472_tps68470 =;
module_i2c_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_SOFTDEP();