linux/drivers/pinctrl/pinctrl-as3722.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * ams AS3722 pin control and GPIO driver.
 *
 * Copyright (c) 2013, NVIDIA Corporation.
 *
 * Author: Laxman Dewangan <[email protected]>
 */

#include <linux/delay.h>
#include <linux/gpio/driver.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/mfd/as3722.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/property.h>
#include <linux/slab.h>

#include <linux/pinctrl/consumer.h>
#include <linux/pinctrl/machine.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinconf-generic.h>
#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinmux.h>

#include "core.h"
#include "pinconf.h"
#include "pinctrl-utils.h"

#define AS3722_PIN_GPIO0
#define AS3722_PIN_GPIO1
#define AS3722_PIN_GPIO2
#define AS3722_PIN_GPIO3
#define AS3722_PIN_GPIO4
#define AS3722_PIN_GPIO5
#define AS3722_PIN_GPIO6
#define AS3722_PIN_GPIO7
#define AS3722_PIN_NUM

#define AS3722_GPIO_MODE_PULL_UP
#define AS3722_GPIO_MODE_PULL_DOWN
#define AS3722_GPIO_MODE_HIGH_IMPED
#define AS3722_GPIO_MODE_OPEN_DRAIN

struct as3722_pin_function {};

struct as3722_gpio_pin_control {};

struct as3722_pingroup {};

struct as3722_pctrl_info {};

static const struct pinctrl_pin_desc as3722_pins_desc[] =;

static const char * const gpio_groups[] =;

enum as3722_pinmux_option {};

#define FUNCTION_GROUP(fname, mux)

static const struct as3722_pin_function as3722_pin_function[] =;

#define AS3722_PINGROUP(pg_name, pin_id)

static const struct as3722_pingroup as3722_pingroups[] =;

static int as3722_pinctrl_get_groups_count(struct pinctrl_dev *pctldev)
{}

static const char *as3722_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
		unsigned group)
{}

static int as3722_pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
		unsigned group, const unsigned **pins, unsigned *num_pins)
{}

static const struct pinctrl_ops as3722_pinctrl_ops =;

static int as3722_pinctrl_get_funcs_count(struct pinctrl_dev *pctldev)
{}

static const char *as3722_pinctrl_get_func_name(struct pinctrl_dev *pctldev,
			unsigned function)
{}

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

static int as3722_pinctrl_set(struct pinctrl_dev *pctldev, unsigned function,
		unsigned group)
{}

static int as3722_pinctrl_gpio_get_mode(unsigned gpio_mode_prop, bool input)
{}

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

static int as3722_pinctrl_gpio_set_direction(struct pinctrl_dev *pctldev,
		struct pinctrl_gpio_range *range, unsigned offset, bool input)
{}

static const struct pinmux_ops as3722_pinmux_ops =;

static int as3722_pinconf_get(struct pinctrl_dev *pctldev,
			unsigned pin, unsigned long *config)
{}

static int as3722_pinconf_set(struct pinctrl_dev *pctldev,
			unsigned pin, unsigned long *configs,
			unsigned num_configs)
{}

static const struct pinconf_ops as3722_pinconf_ops =;

static struct pinctrl_desc as3722_pinctrl_desc =;

static int as3722_gpio_get(struct gpio_chip *chip, unsigned offset)
{}

static void as3722_gpio_set(struct gpio_chip *chip, unsigned offset,
		int value)
{}

static int as3722_gpio_direction_output(struct gpio_chip *chip,
		unsigned offset, int value)
{}

static int as3722_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
{}

static const struct gpio_chip as3722_gpio_chip =;

static int as3722_pinctrl_probe(struct platform_device *pdev)
{}

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

static struct platform_driver as3722_pinctrl_driver =;
module_platform_driver();

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