linux/drivers/soc/samsung/exynos-usi.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2021 Linaro Ltd.
 * Author: Sam Protsenko <[email protected]>
 *
 * Samsung Exynos USI driver (Universal Serial Interface).
 */

#include <linux/clk.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>

#include <dt-bindings/soc/samsung,exynos-usi.h>

/* USIv2: System Register: SW_CONF register bits */
#define USI_V2_SW_CONF_NONE
#define USI_V2_SW_CONF_UART
#define USI_V2_SW_CONF_SPI
#define USI_V2_SW_CONF_I2C
#define USI_V2_SW_CONF_MASK

/* USIv2: USI register offsets */
#define USI_CON
#define USI_OPTION

/* USIv2: USI register bits */
#define USI_CON_RESET
#define USI_OPTION_CLKREQ_ON
#define USI_OPTION_CLKSTOP_ON

enum exynos_usi_ver {};

struct exynos_usi_variant {};

struct exynos_usi {};

struct exynos_usi_mode {};

static const struct exynos_usi_mode exynos_usi_modes[] =;

static const char * const exynos850_usi_clk_names[] =;
static const struct exynos_usi_variant exynos850_usi_data =;

static const struct of_device_id exynos_usi_dt_match[] =;
MODULE_DEVICE_TABLE(of, exynos_usi_dt_match);

/**
 * exynos_usi_set_sw_conf - Set USI block configuration mode
 * @usi: USI driver object
 * @mode: Mode index
 *
 * Select underlying serial protocol (UART/SPI/I2C) in USI IP-core.
 *
 * Return: 0 on success, or negative error code on failure.
 */
static int exynos_usi_set_sw_conf(struct exynos_usi *usi, size_t mode)
{}

/**
 * exynos_usi_enable - Initialize USI block
 * @usi: USI driver object
 *
 * USI IP-core start state is "reset" (on startup and after CPU resume). This
 * routine enables the USI block by clearing the reset flag. It also configures
 * HWACG behavior (needed e.g. for UART Rx). It should be performed before
 * underlying protocol becomes functional.
 *
 * Return: 0 on success, or negative error code on failure.
 */
static int exynos_usi_enable(const struct exynos_usi *usi)
{}

static int exynos_usi_configure(struct exynos_usi *usi)
{}

static int exynos_usi_parse_dt(struct device_node *np, struct exynos_usi *usi)
{}

static int exynos_usi_get_clocks(struct exynos_usi *usi)
{}

static int exynos_usi_probe(struct platform_device *pdev)
{}

static int __maybe_unused exynos_usi_resume_noirq(struct device *dev)
{}

static const struct dev_pm_ops exynos_usi_pm =;

static struct platform_driver exynos_usi_driver =;
module_platform_driver();

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