From a5969cabbb4660eab42b6ef0412cbbd1200cf14d Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Sat, 12 Oct 2024 07:10:09 +0000
Subject: [PATCH] 修改led为gpio
---
kernel/include/linux/regulator/gpio-regulator.h | 26 ++++++++------------------
1 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/kernel/include/linux/regulator/gpio-regulator.h b/kernel/include/linux/regulator/gpio-regulator.h
index ed9b69c..fdeb312 100644
--- a/kernel/include/linux/regulator/gpio-regulator.h
+++ b/kernel/include/linux/regulator/gpio-regulator.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* gpio-regulator.h
*
@@ -11,15 +12,12 @@
*
* 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_GPIO_H
#define __REGULATOR_GPIO_H
+
+#include <linux/gpio/consumer.h>
struct regulator_init_data;
@@ -44,19 +42,14 @@
/**
* struct gpio_regulator_config - config structure
* @supply_name: Name of the regulator supply
- * @input_supply: Name of the regulator input supply
- * @enable_gpio: GPIO to use for enable control
- * set to -EINVAL if not used
- * @enable_high: Polarity of enable GPIO
- * 1 = Active high, 0 = Active low
* @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
* @startup_delay: Start-up time in microseconds
- * @gpios: Array containing the gpios needed to control
- * the setting of the regulator
- * @nr_gpios: Number of gpios
+ * @gflags: Array of GPIO configuration flags for initial
+ * states
+ * @ngpios: Number of GPIOs and configurations available
* @states: Array of gpio_regulator_state entries describing
* the gpio state for specific voltages
* @nr_states: Number of states available
@@ -69,15 +62,12 @@
*/
struct gpio_regulator_config {
const char *supply_name;
- const char *input_supply;
- int enable_gpio;
- unsigned enable_high:1;
unsigned enabled_at_boot:1;
unsigned startup_delay;
- struct gpio *gpios;
- int nr_gpios;
+ enum gpiod_flags *gflags;
+ int ngpios;
struct gpio_regulator_state *states;
int nr_states;
--
Gitblit v1.6.2