mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-24 19:25:07 -04:00
The Cirrus Logic Madera codecs are a family of related codecs with extensive digital and analogue I/O, digital mixing and routing, signal processing and programmable DSPs. This patch adds common support code shared by all Madera codecs. This patch also adds the pdata to the parent mfd pdata struct. Since there is a circular build dependency it's convenient to patch them both atomically. Signed-off-by: Nariman Poushin <nariman@opensource.cirrus.com> Signed-off-by: Nikesh Oswal <Nikesh.Oswal@cirrus.com> Signed-off-by: Piotr Stankiewicz <piotrs@opensource.cirrus.com> Signed-off-by: Ajit Pandey <ajit.pandey@incubesol.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
63 lines
1.7 KiB
C
63 lines
1.7 KiB
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Platform data for Cirrus Logic Madera codecs
|
|
*
|
|
* Copyright (C) 2015-2018 Cirrus Logic
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by the
|
|
* Free Software Foundation; version 2.
|
|
*/
|
|
|
|
#ifndef MADERA_PDATA_H
|
|
#define MADERA_PDATA_H
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/regulator/arizona-ldo1.h>
|
|
#include <linux/regulator/arizona-micsupp.h>
|
|
#include <linux/regulator/machine.h>
|
|
#include <sound/madera-pdata.h>
|
|
|
|
#define MADERA_MAX_MICBIAS 4
|
|
#define MADERA_MAX_CHILD_MICBIAS 4
|
|
|
|
#define MADERA_MAX_GPSW 2
|
|
|
|
struct gpio_desc;
|
|
struct pinctrl_map;
|
|
struct madera_codec_pdata;
|
|
|
|
/**
|
|
* struct madera_pdata - Configuration data for Madera devices
|
|
*
|
|
* @reset: GPIO controlling /RESET (NULL = none)
|
|
* @ldo1: Substruct of pdata for the LDO1 regulator
|
|
* @micvdd: Substruct of pdata for the MICVDD regulator
|
|
* @irq_flags: Mode for primary IRQ (defaults to active low)
|
|
* @gpio_base: Base GPIO number
|
|
* @gpio_configs: Array of GPIO configurations (See Documentation/pinctrl.txt)
|
|
* @n_gpio_configs: Number of entries in gpio_configs
|
|
* @gpsw: General purpose switch mode setting. Depends on the external
|
|
* hardware connected to the switch. (See the SW1_MODE field
|
|
* in the datasheet for the available values for your codec)
|
|
* @codec: Substruct of pdata for the ASoC codec driver
|
|
*/
|
|
struct madera_pdata {
|
|
struct gpio_desc *reset;
|
|
|
|
struct arizona_ldo1_pdata ldo1;
|
|
struct arizona_micsupp_pdata micvdd;
|
|
|
|
unsigned int irq_flags;
|
|
int gpio_base;
|
|
|
|
const struct pinctrl_map *gpio_configs;
|
|
int n_gpio_configs;
|
|
|
|
u32 gpsw[MADERA_MAX_GPSW];
|
|
|
|
struct madera_codec_pdata codec;
|
|
};
|
|
|
|
#endif
|