Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1732338 > unrolled thread
| Started by | Icenowy Zheng <icenowy@aosc.io> |
|---|---|
| First post | 2017-09-14 17:00 +0200 |
| Last post | 2017-09-18 10:30 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH v4 0/6] IIO-based thermal sensor driver for Allwinner H3 SoC Icenowy Zheng <icenowy@aosc.io> - 2017-09-14 17:00 +0200
[PATCH v4 2/6] iio: adc: sun4i-gpadc-iio: rename A33-specified registers to contain A33 Icenowy Zheng <icenowy@aosc.io> - 2017-09-14 17:00 +0200
Re: [PATCH v4 2/6] iio: adc: sun4i-gpadc-iio: rename A33-specified registers to contain A33 Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-09-18 09:40 +0200
Re: [PATCH v4 2/6] iio: adc: sun4i-gpadc-iio: rename A33-specified registers to contain A33 Lee Jones <lee.jones@linaro.org> - 2017-09-18 10:30 +0200
| From | Icenowy Zheng <icenowy@aosc.io> |
|---|---|
| Date | 2017-09-14 17:00 +0200 |
| Subject | [PATCH v4 0/6] IIO-based thermal sensor driver for Allwinner H3 SoC |
| Message-ID | <upDMt-6ln-3@gated-at.bofh.it> |
Allwiner H3 SoC has a thermal sensor, which is a large refactored version of
the old Allwinner "GPADC" (although it have already only thermal part left
in A33).
This patch tried to add support for the sensor in H3 based on the A33 thermal
sensor driver by Quentin Schulz, which is already merged.
Icenowy Zheng (6):
dt-bindings: update the Allwinner GPADC device tree binding for H3
iio: adc: sun4i-gpadc-iio: rename A33-specified registers to contain
A33
iio: adc: sun4i-gpadc-iio: rework code for supporting newer THS
variants
iio: adc: sun4i-gpadc-iio: add support for H3 thermal sensor
ARM: sun8i: h3: add support for the thermal sensor in H3
ARM: sun8i: h3: add partial CPU thermal zone
.../devicetree/bindings/mfd/sun4i-gpadc.txt | 30 +++-
arch/arm/boot/dts/sun8i-h3.dtsi | 26 ++++
drivers/iio/adc/sun4i-gpadc-iio.c | 173 ++++++++++++++++++++-
include/linux/mfd/sun4i-gpadc.h | 33 +++-
4 files changed, 249 insertions(+), 13 deletions(-)
--
2.13.5
[toc] | [next] | [standalone]
| From | Icenowy Zheng <icenowy@aosc.io> |
|---|---|
| Date | 2017-09-14 17:00 +0200 |
| Subject | [PATCH v4 2/6] iio: adc: sun4i-gpadc-iio: rename A33-specified registers to contain A33 |
| Message-ID | <upDMv-6ln-43@gated-at.bofh.it> |
| In reply to | #1732338 |
As the H3 SoC, which is also in sun8i line, has totally different
register map for the thermal sensor (a cut down version of GPADC), we
should rename A23/A33-specified registers to contain A33, in order to
prevent obfuscation with H3 registers. Currently these registers are
only prefixed "SUN8I", not "SUN8I_A33".
Add "_A33" after "SUN8I" on the register names.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
---
Changes in v4:
- Change A23 to A33, as the driver never supports A23.
drivers/iio/adc/sun4i-gpadc-iio.c | 2 +-
include/linux/mfd/sun4i-gpadc.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
index 137f577d9432..68926b986cd0 100644
--- a/drivers/iio/adc/sun4i-gpadc-iio.c
+++ b/drivers/iio/adc/sun4i-gpadc-iio.c
@@ -88,7 +88,7 @@ static const struct gpadc_data sun6i_gpadc_data = {
static const struct gpadc_data sun8i_a33_gpadc_data = {
.temp_offset = -1662,
.temp_scale = 162,
- .tp_mode_en = SUN8I_GPADC_CTRL1_CHOP_TEMP_EN,
+ .tp_mode_en = SUN8I_A33_GPADC_CTRL1_CHOP_TEMP_EN,
};
struct sun4i_gpadc_iio {
diff --git a/include/linux/mfd/sun4i-gpadc.h b/include/linux/mfd/sun4i-gpadc.h
index 139872c2e0fe..78d31984a222 100644
--- a/include/linux/mfd/sun4i-gpadc.h
+++ b/include/linux/mfd/sun4i-gpadc.h
@@ -38,9 +38,9 @@
#define SUN6I_GPADC_CTRL1_ADC_CHAN_SELECT(x) (GENMASK(3, 0) & BIT(x))
#define SUN6I_GPADC_CTRL1_ADC_CHAN_MASK GENMASK(3, 0)
-/* TP_CTRL1 bits for sun8i SoCs */
-#define SUN8I_GPADC_CTRL1_CHOP_TEMP_EN BIT(8)
-#define SUN8I_GPADC_CTRL1_GPADC_CALI_EN BIT(7)
+/* TP_CTRL1 bits for A33 */
+#define SUN8I_A33_GPADC_CTRL1_CHOP_TEMP_EN BIT(8)
+#define SUN8I_A33_GPADC_CTRL1_GPADC_CALI_EN BIT(7)
#define SUN4I_GPADC_CTRL2 0x08
--
2.13.5
[toc] | [prev] | [next] | [standalone]
| From | Maxime Ripard <maxime.ripard@free-electrons.com> |
|---|---|
| Date | 2017-09-18 09:40 +0200 |
| Subject | Re: [PATCH v4 2/6] iio: adc: sun4i-gpadc-iio: rename A33-specified registers to contain A33 |
| Message-ID | <uqYOS-36l-13@gated-at.bofh.it> |
| In reply to | #1732342 |
[Multipart message — attachments visible in raw view] — view raw
On Thu, Sep 14, 2017 at 10:52:47PM +0800, Icenowy Zheng wrote: > As the H3 SoC, which is also in sun8i line, has totally different > register map for the thermal sensor (a cut down version of GPADC), we > should rename A23/A33-specified registers to contain A33, in order to > prevent obfuscation with H3 registers. Currently these registers are > only prefixed "SUN8I", not "SUN8I_A33". > > Add "_A33" after "SUN8I" on the register names. > > Signed-off-by: Icenowy Zheng <icenowy@aosc.io> > Reviewed-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
[toc] | [prev] | [next] | [standalone]
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2017-09-18 10:30 +0200 |
| Subject | Re: [PATCH v4 2/6] iio: adc: sun4i-gpadc-iio: rename A33-specified registers to contain A33 |
| Message-ID | <uqZBf-3G0-13@gated-at.bofh.it> |
| In reply to | #1732342 |
On Thu, 14 Sep 2017, Icenowy Zheng wrote: > As the H3 SoC, which is also in sun8i line, has totally different > register map for the thermal sensor (a cut down version of GPADC), we > should rename A23/A33-specified registers to contain A33, in order to > prevent obfuscation with H3 registers. Currently these registers are > only prefixed "SUN8I", not "SUN8I_A33". > > Add "_A33" after "SUN8I" on the register names. > > Signed-off-by: Icenowy Zheng <icenowy@aosc.io> > Reviewed-by: Chen-Yu Tsai <wens@csie.org> > --- > Changes in v4: > - Change A23 to A33, as the driver never supports A23. > > drivers/iio/adc/sun4i-gpadc-iio.c | 2 +- > include/linux/mfd/sun4i-gpadc.h | 6 +++--- Acked-by: Lee Jones <lee.jones@linaro.org> -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web