mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 04:45:12 +07:00
efdfeb079c
As we augmented the regulator core to accept a GPIO descriptor instead of a GPIO number, we can augment the fixed GPIO regulator to look up and pass that descriptor directly from device tree or board GPIO descriptor look up tables. Some boards just auto-enumerate their fixed regulator platform devices and I have assumed they get names like "fixed-regulator.0" but it's pretty hard to guess this. I need some testing from board maintainers to be sure. Other boards are straight forward, using just plain "fixed-regulator" (ID -1) or "fixed-regulator.1" hammering down the device ID. It seems the da9055 and da9211 has never got around to actually passing any enable gpio into its platform data (not the in-tree code anyway) so we can just decide to simply pass a descriptor instead. The fixed GPIO-controlled regulator in mach-pxa/ezx.c was confusingly named "*_dummy_supply_device" while it is a very real device backed by a GPIO line. There is nothing dummy about it at all, so I renamed it with the infix *_regulator_* as part of this patch set. Intel MID portions tested by Andy. Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Check the x86 BCM stuff Acked-by: Tony Lindgren <tony@atomide.com> # OMAP1,2,3 maintainer Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Janusz Krzysztofik <jmkrzyszt@gmail.com> Reviewed-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
59 lines
1.6 KiB
C
59 lines
1.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* linux/arch/arm/mach-sa1100/generic.h
|
|
*
|
|
* Author: Nicolas Pitre
|
|
*/
|
|
#include <linux/cpufreq.h>
|
|
#include <linux/reboot.h>
|
|
|
|
extern void sa1100_timer_init(void);
|
|
extern void __init sa1100_map_io(void);
|
|
extern void __init sa1100_init_irq(void);
|
|
extern void __init sa1100_init_gpio(void);
|
|
extern void sa11x0_restart(enum reboot_mode, const char *);
|
|
extern void sa11x0_init_late(void);
|
|
|
|
#define SET_BANK(__nr,__start,__size) \
|
|
mi->bank[__nr].start = (__start), \
|
|
mi->bank[__nr].size = (__size)
|
|
|
|
extern void sa1110_mb_enable(void);
|
|
extern void sa1110_mb_disable(void);
|
|
|
|
extern struct cpufreq_frequency_table sa11x0_freq_table[];
|
|
extern unsigned int sa11x0_getspeed(unsigned int cpu);
|
|
|
|
struct flash_platform_data;
|
|
struct resource;
|
|
|
|
void sa11x0_register_mtd(struct flash_platform_data *flash,
|
|
struct resource *res, int nr);
|
|
|
|
struct irda_platform_data;
|
|
void sa11x0_register_irda(struct irda_platform_data *irda);
|
|
|
|
struct mcp_plat_data;
|
|
void sa11x0_ppc_configure_mcp(void);
|
|
void sa11x0_register_mcp(struct mcp_plat_data *data);
|
|
|
|
struct sa1100fb_mach_info;
|
|
void sa11x0_register_lcd(struct sa1100fb_mach_info *inf);
|
|
|
|
#ifdef CONFIG_PM
|
|
int sa11x0_pm_init(void);
|
|
#else
|
|
static inline int sa11x0_pm_init(void) { return 0; }
|
|
#endif
|
|
|
|
int sa11xx_clk_init(void);
|
|
|
|
struct gpiod_lookup_table;
|
|
void sa11x0_register_pcmcia(int socket, struct gpiod_lookup_table *);
|
|
|
|
struct fixed_voltage_config;
|
|
struct regulator_consumer_supply;
|
|
int sa11x0_register_fixed_regulator(int n, struct fixed_voltage_config *cfg,
|
|
struct regulator_consumer_supply *supplies, unsigned num_supplies,
|
|
bool uses_gpio);
|