linux/drivers/pinctrl/pinctrl-palmas.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * pinctrl-palmas.c -- TI PALMAS series pin control driver.
 *
 * Copyright (c) 2013, NVIDIA Corporation.
 *
 * Author: Laxman Dewangan <[email protected]>
 */

#include <linux/delay.h>
#include <linux/module.h>
#include <linux/mfd/palmas.h>
#include <linux/of.h>
#include <linux/platform_device.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 <linux/pm.h>
#include <linux/slab.h>

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

#define PALMAS_PIN_GPIO0_ID
#define PALMAS_PIN_GPIO1_VBUS_LED1_PWM1
#define PALMAS_PIN_GPIO2_REGEN_LED2_PWM2
#define PALMAS_PIN_GPIO3_CHRG_DET
#define PALMAS_PIN_GPIO4_SYSEN1
#define PALMAS_PIN_GPIO5_CLK32KGAUDIO_USB_PSEL
#define PALMAS_PIN_GPIO6_SYSEN2
#define PALMAS_PIN_GPIO7_MSECURE_PWRHOLD
#define PALMAS_PIN_GPIO8_SIM1RSTI
#define PALMAS_PIN_GPIO9_LOW_VBAT
#define PALMAS_PIN_GPIO10_WIRELESS_CHRG1
#define PALMAS_PIN_GPIO11_RCM
#define PALMAS_PIN_GPIO12_SIM2RSTO
#define PALMAS_PIN_GPIO13
#define PALMAS_PIN_GPIO14
#define PALMAS_PIN_GPIO15_SIM2RSTI
#define PALMAS_PIN_VAC
#define PALMAS_PIN_POWERGOOD_USB_PSEL
#define PALMAS_PIN_NRESWARM
#define PALMAS_PIN_PWRDOWN
#define PALMAS_PIN_GPADC_START
#define PALMAS_PIN_RESET_IN
#define PALMAS_PIN_NSLEEP
#define PALMAS_PIN_ENABLE1
#define PALMAS_PIN_ENABLE2
#define PALMAS_PIN_INT
#define PALMAS_PIN_NUM

struct palmas_pin_function {};

struct palmas_pctrl_chip_info {};

static const struct pinctrl_pin_desc palmas_pins_desc[] =;

static const char * const opt0_groups[] =;

static const char * const opt1_groups[] =;

static const char * const opt2_groups[] =;

static const char * const opt3_groups[] =;

static const char * const gpio_groups[] =;

static const char * const led_groups[] =;

static const char * const pwm_groups[] =;

static const char * const regen_groups[] =;

static const char * const sysen_groups[] =;

static const char * const clk32kgaudio_groups[] =;

static const char * const id_groups[] =;

static const char * const vbus_det_groups[] =;

static const char * const chrg_det_groups[] =;

static const char * const vac_groups[] =;

static const char * const vacok_groups[] =;

static const char * const powergood_groups[] =;

static const char * const usb_psel_groups[] =;

static const char * const msecure_groups[] =;

static const char * const pwrhold_groups[] =;

static const char * const int_groups[] =;

static const char * const nreswarm_groups[] =;

static const char * const simrsto_groups[] =;

static const char * const simrsti_groups[] =;

static const char * const low_vbat_groups[] =;

static const char * const wireless_chrg1_groups[] =;

static const char * const rcm_groups[] =;

static const char * const pwrdown_groups[] =;

static const char * const gpadc_start_groups[] =;

static const char * const reset_in_groups[] =;

static const char * const nsleep_groups[] =;

static const char * const enable_groups[] =;

#define FUNCTION_GROUPS

static const struct palmas_pin_function palmas_pin_function[] =;

enum palmas_pinmux {};

struct palmas_pins_pullup_dn_info {};

struct palmas_pins_od_info {};

struct palmas_pin_info {};

struct palmas_pingroup {};

#define PULL_UP_DN(_name, _rbase, _add, _mask, _nv, _uv, _dv)

PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();
PULL_UP_DN();

#define OD_INFO(_name, _rbase, _add, _mask, _ev, _dv)

OD_INFO();
OD_INFO();
OD_INFO();
OD_INFO();
OD_INFO();
OD_INFO();
OD_INFO();
OD_INFO();
OD_INFO();

#define PIN_INFO(_name, _id, _pud_info, _od_info)

PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();
PIN_INFO();

#define PALMAS_PRIMARY_SECONDARY_NONE
#define PALMAS_NONE_BASE
#define PALMAS_PRIMARY_SECONDARY_INPUT3

#define PALMAS_PINGROUP(pg_name, pin_id, base, reg, _mask, _bshift, o0, o1, o2, o3)

static const struct palmas_pingroup tps65913_pingroups[] =;

static const struct palmas_pingroup tps80036_pingroups[] =;

static int palmas_pinctrl_get_pin_mux(struct palmas_pctrl_chip_info *pci)
{}

static int palmas_pinctrl_set_dvfs1(struct palmas_pctrl_chip_info *pci,
		bool enable)
{}

static int palmas_pinctrl_set_dvfs2(struct palmas_pctrl_chip_info *pci,
		bool enable)
{}

static int palmas_pinctrl_get_groups_count(struct pinctrl_dev *pctldev)
{}

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

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

static const struct pinctrl_ops palmas_pinctrl_ops =;

static int palmas_pinctrl_get_funcs_count(struct pinctrl_dev *pctldev)
{}

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

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

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

static const struct pinmux_ops palmas_pinmux_ops =;

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

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

static const struct pinconf_ops palmas_pinconf_ops =;

static struct pinctrl_desc palmas_pinctrl_desc =;

struct palmas_pinctrl_data {};

static struct palmas_pinctrl_data tps65913_pinctrl_data =;

static struct palmas_pinctrl_data tps80036_pinctrl_data =;

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

static int palmas_pinctrl_probe(struct platform_device *pdev)
{}

static struct platform_driver palmas_pinctrl_driver =;

module_platform_driver();

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