Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1451199 > unrolled thread
| Started by | Zhiyong Tao <zhiyong.tao@mediatek.com> |
|---|---|
| First post | 2016-07-27 12:10 +0200 |
| Last post | 2016-07-31 04:10 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v6 0/3] AUXADC: Mediatek auxadc driver Zhiyong Tao <zhiyong.tao@mediatek.com> - 2016-07-27 12:10 +0200
[PATCH v6 1/3] dt-bindings: auxadc: Add binding document for Mediatek auxadc. Zhiyong Tao <zhiyong.tao@mediatek.com> - 2016-07-27 12:10 +0200
[PATCH v6 3/3] arm: dts: mt2701: Add auxadc node. Zhiyong Tao <zhiyong.tao@mediatek.com> - 2016-07-27 12:10 +0200
Re: [PATCH v6 3/3] arm: dts: mt2701: Add auxadc node. kbuild test robot <lkp@intel.com> - 2016-07-31 04:10 +0200
| From | Zhiyong Tao <zhiyong.tao@mediatek.com> |
|---|---|
| Date | 2016-07-27 12:10 +0200 |
| Subject | [PATCH v6 0/3] AUXADC: Mediatek auxadc driver |
| Message-ID | <rZtWN-6qK-21@gated-at.bofh.it> |
This series includes three patches:
1.Change the device tree binding documentation.
2.Add auxadc driver based on linux iio.
3.Add auxadc nodes in the mediatek MT2701 dtsi file.
Changes in patch v6:
1).Add commit message in auxadc node patch which dependents on "Add clock support for Mediatek MT2701"[1].
2).Use val variable instead of rawdata variable and Change 'mutex_unlock' to 'goto err_timeout' in 'mt6577_auxadc_read'.
3).Remove '.' in the log when failed to get auxadc base address.
4).Change 'return -EINVAL' to 'return ret' and add 'ret = -EINVAL' when get null clock rate.
5).Add inline function 'mt6577_auxadc_mod_reg' to replace read/modify/write code sequence.
Changes in patch v5:
1).Add 'Acked-by' information in commit message.
1).Change auxadc compatible in binding document.
2).Remove power on failed check.
3).Moved power off error unwind block to 'err_power_off'.
Changes in patch v4:
1).Change the file name 'mt65xx_auxdc.txt' to 'mt6577_auxdc.txt'.
2).Remove 'break' after 'return' in 'mt6577_auxadc_read_raw'.
3).Use 'mt2701' instead of 'auxadc' in dts commit message.
4).Change 'auxadc@' to 'adc@' in mt2701.dtsi.
Changes in patch v3:
1).Add '#' before 'io-channel-cells' and change 'auxadc@' to 'adc@' in auxadc binding document.
2).Fix CONFIG_MEDIATEK_MT65XX_AUXADC sequence as alphabetical order.
3).Change the prefix 'MT65XX' to 'MT6577' to match auxadc driver name.
4).Remove the delays stored in 'mt6577_auxadc_device' and use the defined delay directly.
5).Use '-ETIMEDOUT' instead of '-EINVAL'.
6).Return value directly in 'mt6577_auxadc_read_raw'.
7).Add power off and unprepare clock if 'iio_device_register' failed.
8).Change 'Registers' to 'Register'.
Changes in patch v2:
1).Change the file name mt65xx_auxadc.c to mt6577_auxadc.c.
2).Add 'depends on ARCH_MEDIATEK || COMPILE_TEST and HAS_IOMEM' for MEDIATEK_MT65XX_AUXADC config.
3).Add check case for return value of 'readl_poll_timeout'.
4).Remove returning 1 and 0 for SCALE and OFFSET. use channel type 'IIO_CHAN_INFO_PROCESSED' instead of 'IIO_CHAN_INFO_RAW'.
5).Remove 'IIO_CHAN_INFO_OFFSET' and 'IIO_CHAN_INFO_SCALE' in 'MT65XX_AUXADC_CHANNEL' channel type.
6).Add check case when auxadc power on failure. if auxadc power on failure, clk_disable_unprepare should be executed.
7).Put 'platform_set_drvdata' before 'iio_device_register'.
8).Fix coding style and spelling error.
Zhiyong Tao (3):
dt-bindings: auxadc: Add binding document for Mediatek auxadc.
iio: adc: mt2701: Add Mediatek auxadc driver for mt2701.
arm: dts: mt2701: Add auxadc node.
.../auxadc.txt => iio/adc/mt6577_auxadc.txt} | 18 +-
arch/arm/boot/dts/mt2701.dtsi | 9 +
drivers/iio/adc/Kconfig | 13 +
drivers/iio/adc/Makefile | 1 +
drivers/iio/adc/mt6577_auxadc.c | 291 ++++++++++++++++++++
5 files changed, 327 insertions(+), 5 deletions(-)
rename Documentation/devicetree/bindings/{soc/mediatek/auxadc.txt => iio/adc/mt6577_auxadc.txt} (46%)
create mode 100644 drivers/iio/adc/mt6577_auxadc.c
[toc] | [next] | [standalone]
| From | Zhiyong Tao <zhiyong.tao@mediatek.com> |
|---|---|
| Date | 2016-07-27 12:10 +0200 |
| Subject | [PATCH v6 1/3] dt-bindings: auxadc: Add binding document for Mediatek auxadc. |
| Message-ID | <rZtWO-6qK-65@gated-at.bofh.it> |
| In reply to | #1451199 |
The commit adds the device tree binding documentation for the mediatek
auxadc found on Mediatek MT2701.
Thermal gets auxadc sample data by iio device.
So the commit changes auxadc device tree binding documentation from
/soc/mediatek/auxadc.txt to /iio/adc/mt6577_auxadc.txt.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com>
---
.../auxadc.txt => iio/adc/mt6577_auxadc.txt} | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
rename Documentation/devicetree/bindings/{soc/mediatek/auxadc.txt => iio/adc/mt6577_auxadc.txt} (46%)
diff --git a/Documentation/devicetree/bindings/soc/mediatek/auxadc.txt b/Documentation/devicetree/bindings/iio/adc/mt6577_auxadc.txt
similarity index 46%
rename from Documentation/devicetree/bindings/soc/mediatek/auxadc.txt
rename to Documentation/devicetree/bindings/iio/adc/mt6577_auxadc.txt
index bdb7829..68c45cb 100644
--- a/Documentation/devicetree/bindings/soc/mediatek/auxadc.txt
+++ b/Documentation/devicetree/bindings/iio/adc/mt6577_auxadc.txt
@@ -1,4 +1,4 @@
-MediaTek AUXADC
+* Mediatek AUXADC - Analog to Digital Converter on Mediatek mobile soc (mt65xx/mt81xx/mt27xx)
===============
The Auxiliary Analog/Digital Converter (AUXADC) is an ADC found
@@ -10,12 +10,20 @@ Documentation/devicetree/bindings/thermal/mediatek-thermal.txt
for the Thermal Controller which holds a phandle to the AUXADC.
Required properties:
-- compatible: Must be "mediatek,mt8173-auxadc"
-- reg: Address range of the AUXADC unit
+ - compatible: Should be one of:
+ - "mediatek,mt2701-auxadc": For MT2701 family of SoCs
+ - "mediatek,mt8173-auxadc": For MT8173 family of SoCs
+ - reg: Address range of the AUXADC unit.
+ - clocks: Should contain a clock specifier for each entry in clock-names
+ - clock-names: Should contain "main".
+ - #io-channel-cells: Should be 1, see ../iio-bindings.txt
Example:
-auxadc: auxadc@11001000 {
- compatible = "mediatek,mt8173-auxadc";
+auxadc: adc@11001000 {
+ compatible = "mediatek,mt2701-auxadc";
reg = <0 0x11001000 0 0x1000>;
+ clocks = <&pericfg CLK_PERI_AUXADC>;
+ clock-names = "main";
+ #io-channel-cells = <1>;
};
--
1.7.9.5
[toc] | [prev] | [next] | [standalone]
| From | Zhiyong Tao <zhiyong.tao@mediatek.com> |
|---|---|
| Date | 2016-07-27 12:10 +0200 |
| Subject | [PATCH v6 3/3] arm: dts: mt2701: Add auxadc node. |
| Message-ID | <rZtWO-6qK-37@gated-at.bofh.it> |
| In reply to | #1451199 |
The commit adds auxadc nodes to the Mediatek MT2701 dtsi file.
Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com>
---
This patch dependents on "Add clock support for Mediatek MT2701"[1].
Please accept this patch together with [1].
[1]http://lists.infradead.org/pipermail/linux-mediatek/2016-June/005969.html
---
arch/arm/boot/dts/mt2701.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/mt2701.dtsi b/arch/arm/boot/dts/mt2701.dtsi
index 42d5a37..c0a2644 100644
--- a/arch/arm/boot/dts/mt2701.dtsi
+++ b/arch/arm/boot/dts/mt2701.dtsi
@@ -187,6 +187,15 @@
<0 0x10216000 0 0x2000>;
};
+ auxadc: adc@11001000 {
+ compatible = "mediatek,mt2701-auxadc";
+ reg = <0 0x11001000 0 0x1000>;
+ clocks = <&pericfg CLK_PERI_AUXADC>;
+ clock-names = "main";
+ #io-channel-cells = <1>;
+ status = "disabled";
+ };
+
uart0: serial@11002000 {
compatible = "mediatek,mt2701-uart",
"mediatek,mt6577-uart";
--
1.7.9.5
[toc] | [prev] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-07-31 04:10 +0200 |
| Subject | Re: [PATCH v6 3/3] arm: dts: mt2701: Add auxadc node. |
| Message-ID | <s0Omt-2f5-1@gated-at.bofh.it> |
| In reply to | #1451206 |
[Multipart message — attachments visible in raw view] — view raw
Hi,
[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.7 next-20160729]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Zhiyong-Tao/AUXADC-Mediatek-auxadc-driver/20160727-180722
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-at91_dt_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm
All errors (new ones prefixed by >>):
>> Error: arch/arm/boot/dts/mt2701.dtsi:145.22-23 syntax error
FATAL ERROR: Unable to parse input tree
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web