mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 15:55:02 +07:00
01dc79cd6f
This pushes the handling of inversion semantics and open drain settings to the GPIO descriptor and gpiolib. All affected board files are also augmented. This is especially nice since we don't have to have any confusing flags passed around to the left and right littering the fixed and GPIO regulator drivers and the regulator core. It is all just very straight-forward: the core asks the GPIO line to be asserted or deasserted and gpiolib deals with the rest depending on how the platform is configured: if the line is active low, it deals with that, if the line is open drain, it deals with that too. Cc: Alexander Shiyan <shc_work@mail.ru> # i.MX boards user Cc: Haojian Zhuang <haojian.zhuang@gmail.com> # MMP2 maintainer Cc: Aaro Koskinen <aaro.koskinen@iki.fi> # OMAP1 maintainer Cc: Tony Lindgren <tony@atomide.com> # OMAP1,2,3 maintainer Cc: Mike Rapoport <rppt@linux.vnet.ibm.com> # EM-X270 maintainer Cc: Robert Jarzmik <robert.jarzmik@free.fr> # EZX maintainer Cc: Philipp Zabel <philipp.zabel@gmail.com> # Magician maintainer Cc: Petr Cvek <petr.cvek@tul.cz> # Magician Cc: Robert Jarzmik <robert.jarzmik@free.fr> # PXA Cc: Paul Parsons <lost.distance@yahoo.com> # hx4700 Cc: Daniel Mack <zonque@gmail.com> # Raumfeld maintainer Cc: Marc Zyngier <marc.zyngier@arm.com> # Zeus maintainer Cc: Geert Uytterhoeven <geert+renesas@glider.be> # SuperH pinctrl/GPIO maintainer Cc: Russell King <rmk+kernel@armlinux.org.uk> # SA1100 Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Tested-by: Janusz Krzysztofik <jmkrzyszt@gmail.com> #OMAP1 Amstrad Delta Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
64 lines
1.9 KiB
C
64 lines
1.9 KiB
C
/*
|
|
* fixed.h
|
|
*
|
|
* Copyright 2008 Wolfson Microelectronics PLC.
|
|
*
|
|
* Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
*
|
|
* Copyright (c) 2009 Nokia Corporation
|
|
* Roger Quadros <ext-roger.quadros@nokia.com>
|
|
*
|
|
* 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; either version 2 of the
|
|
* License, or (at your option) any later version.
|
|
*/
|
|
|
|
#ifndef __REGULATOR_FIXED_H
|
|
#define __REGULATOR_FIXED_H
|
|
|
|
struct regulator_init_data;
|
|
|
|
/**
|
|
* struct fixed_voltage_config - fixed_voltage_config structure
|
|
* @supply_name: Name of the regulator supply
|
|
* @input_supply: Name of the input regulator supply
|
|
* @microvolts: Output voltage of regulator
|
|
* @startup_delay: Start-up time in microseconds
|
|
* @enabled_at_boot: Whether regulator has been enabled at
|
|
* boot or not. 1 = Yes, 0 = No
|
|
* This is used to keep the regulator at
|
|
* the default state
|
|
* @init_data: regulator_init_data
|
|
*
|
|
* This structure contains fixed voltage regulator configuration
|
|
* information that must be passed by platform code to the fixed
|
|
* voltage regulator driver.
|
|
*/
|
|
struct fixed_voltage_config {
|
|
const char *supply_name;
|
|
const char *input_supply;
|
|
int microvolts;
|
|
unsigned startup_delay;
|
|
unsigned enabled_at_boot:1;
|
|
struct regulator_init_data *init_data;
|
|
};
|
|
|
|
struct regulator_consumer_supply;
|
|
|
|
#if IS_ENABLED(CONFIG_REGULATOR)
|
|
struct platform_device *regulator_register_always_on(int id, const char *name,
|
|
struct regulator_consumer_supply *supplies, int num_supplies, int uv);
|
|
#else
|
|
static inline struct platform_device *regulator_register_always_on(int id, const char *name,
|
|
struct regulator_consumer_supply *supplies, int num_supplies, int uv)
|
|
{
|
|
return NULL;
|
|
}
|
|
#endif
|
|
|
|
#define regulator_register_fixed(id, s, ns) regulator_register_always_on(id, \
|
|
"fixed-dummy", s, ns, 0)
|
|
|
|
#endif
|