linux/drivers/pinctrl/pinctrl-mlxbf3.c

// SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause
/* Copyright (C) 2022 NVIDIA CORPORATION & AFFILIATES */

#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/types.h>

#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>

#define MLXBF3_NGPIOS_GPIO0
#define MLXBF3_MAX_GPIO_PINS

enum {};

struct mlxbf3_pinctrl {};

#define MLXBF3_GPIO_RANGE(_id, _pinbase, _gpiobase, _npins)

static struct pinctrl_gpio_range mlxbf3_pinctrl_gpio_ranges[] =;

static const struct pinctrl_pin_desc mlxbf3_pins[] =;

/*
 * All single-pin functions can be mapped to any GPIO, however pinmux applies
 * functions to pin groups and only those groups declared as supporting that
 * function. To make this work we must put each pin in its own dummy group so
 * that the functions can be described as applying to all pins.
 * We use the same name as in the datasheet.
 */
static const char * const mlxbf3_pinctrl_single_group_names[] =;

static int mlxbf3_get_groups_count(struct pinctrl_dev *pctldev)
{}

static const char *mlxbf3_get_group_name(struct pinctrl_dev *pctldev,
					 unsigned int selector)
{}

static int mlxbf3_get_group_pins(struct pinctrl_dev *pctldev,
				 unsigned int selector,
				 const unsigned int **pins,
				 unsigned int *num_pins)
{}

static const struct pinctrl_ops mlxbf3_pinctrl_group_ops =;

/*
 * Only 2 functions are supported and they apply to all pins:
 * 1) Default hardware functionality
 * 2) Software controlled GPIO
 */
static const char * const mlxbf3_gpiofunc_group_names[] =;
static const char * const mlxbf3_hwfunc_group_names[]   =;

static struct pinfunction mlxbf3_pmx_funcs[] =;

static int mlxbf3_pmx_get_funcs_count(struct pinctrl_dev *pctldev)
{}

static const char *mlxbf3_pmx_get_func_name(struct pinctrl_dev *pctldev,
					   unsigned int selector)
{}

static int mlxbf3_pmx_get_groups(struct pinctrl_dev *pctldev,
				 unsigned int selector,
				 const char * const **groups,
				 unsigned int * const num_groups)
{}

static int mlxbf3_pmx_set(struct pinctrl_dev *pctldev,
			      unsigned int selector,
			      unsigned int group)
{}

static int mlxbf3_gpio_request_enable(struct pinctrl_dev *pctldev,
				     struct pinctrl_gpio_range *range,
				     unsigned int offset)
{}

static const struct pinmux_ops mlxbf3_pmx_ops =;

static struct pinctrl_desc mlxbf3_pin_desc =;

static_assert();

static int mlxbf3_pinctrl_probe(struct platform_device *pdev)
{}

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

static struct platform_driver mlxbf3_pinctrl_driver =;
module_platform_driver();

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