1
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-11-24 12:36:18 +00:00
Lakka-LibreELEC/projects/Ayn/devices/Odin/patches/linux/0001-iio-adc-qcom-spmi-adc5-add-more-channels-needed-by-o.patch
GavinDarkglider 4f8d2a57e9
WIP - Add Support for Ayn Odin (#1713)
* Initial fully buildable/bootable Odin Support

* Rework NX-Boot to FAT32 Boot for shared usage between switch and odin

* Move shared packages from switch/odin to main packages folder
2023-01-21 16:11:38 +01:00

38 lines
1.3 KiB
Diff

From 9a13c7f6dd2963fa19195eac56ccccf327b6770d Mon Sep 17 00:00:00 2001
From: Teguh Sobirin <teguh@sobir.in>
Date: Wed, 29 Jun 2022 05:07:06 +0700
Subject: [PATCH 1/5] iio: adc: qcom-spmi-adc5: add more channels needed by
odin-gamepad driver
ADC5_GPIO1, ADC5_GPIO2 ADC5_GPIO3, ADC5_GPIO4, ADC5_GPIO5, ADC5_GPIO6_DIV3
---
drivers/iio/adc/qcom-spmi-adc5.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c
index 87438d1e5c0b..6455af20d359 100644
--- a/drivers/iio/adc/qcom-spmi-adc5.c
+++ b/drivers/iio/adc/qcom-spmi-adc5.c
@@ -609,6 +609,18 @@ static const struct adc5_channels adc5_chans_rev2[ADC5_MAX_CHANNEL] = {
SCALE_HW_CALIB_THERM_100K_PULLUP)
[ADC5_XO_THERM_100K_PU] = ADC5_CHAN_TEMP("xo_therm_100k_pu", 0,
SCALE_HW_CALIB_THERM_100K_PULLUP)
+ [ADC5_GPIO1] = ADC5_CHAN_VOLT("gpio1", 0,
+ SCALE_HW_CALIB_DEFAULT)
+ [ADC5_GPIO2] = ADC5_CHAN_VOLT("gpio2", 0,
+ SCALE_HW_CALIB_DEFAULT)
+ [ADC5_GPIO3] = ADC5_CHAN_VOLT("gpio3", 0,
+ SCALE_HW_CALIB_DEFAULT)
+ [ADC5_GPIO4] = ADC5_CHAN_VOLT("gpio4", 0,
+ SCALE_HW_CALIB_DEFAULT)
+ [ADC5_GPIO5] = ADC5_CHAN_VOLT("gpio5", 0,
+ SCALE_HW_CALIB_DEFAULT)
+ [ADC5_GPIO6_DIV3] = ADC5_CHAN_VOLT("gpio6", 0,
+ SCALE_HW_CALIB_DEFAULT)
};
static int adc5_get_dt_channel_data(struct adc5_chip *adc,
--
2.34.1