mfd: AXP20x: Add support for AXP202 and AXP209
Subsystems (7)
v8 cover mfd: AXP20x: Add support for AXP202 and AXP209
Hi everyone,
This is v8 of the AXP20x PMIC patches. These are the remaining patches of the original series: PEK (power button) input driver, binding docs, and defconfig updates.
Mark raised some questions during v7 about the first patch, specifically about the "x-powers,dcdc-workmode" property. I've expanded the regulator parts of the DT bindings doc. Mark, if you could take a look and give us your blessing?
Dmitry, you were OK with the input bits going through the MFD tree, is that still the case?
If there are no more problems, maybe Lee could take patches 1~4, and Maxime can take the defconfig patches through his tree.
Thanks
ChenYu
Changes since v7:
- DT bindings
* Clarified the AXP's interrupt source
* Added explaination for "x-powers,dcdc-workmode" property
* Made regulator supply properties optional. They can be omitted when the input is unregulated, as is the case when they are connected to the IPSOUT output on the PMIC.
* Used real world example (Cubieboard2) for regulator nodes
- Fixed paths for PEK sysfs entries.
- PEK driver
* Made axp20x_pek_remove() in PEK driver static.
* Removed driver owner field.
* Wrapped some lines over 80 characters.
Original cover letter from v7:
During the merging of v6 several patches were left out. This v7 comprises all the patches that are still pending.
//--
AXP209 and AXP202 are the PMUs (Power Management Unit) used by A10, A13 and A20 SoCs and developed by X-Powers, a sister company of Allwinner. AXP20x comprises an adaptive USB-Compatible PWM charger, 2 BUCK DC-DC converters, 5 LDOs, multiple 12-bit ADCs of voltage, current and temperature as well as 4 configurable GPIOs.
This set of patches introduces the core driver and support for two different subsystems:
- Regulators
- PEK (Power Enable Key)
Changes since v1:
- Added a new standalone patch for defconfig
- MFD core:
* Removed axp,system-power-controller property
- Bindings documentation:
* Corrected description for dcdc-workmode property
* Removed unused axp20x-pek compatible
- Input misc PEK driver:
* Fixed seconds in lower case
- Regulators subsystem:
* Fixed axp20x_set_suspend_voltage()
* Switched to using multi-bit control for regulators
* When "regulators" node is not found driver doesn't quit
* Driver is now using devm_regulator_register()
* Added module_platform_driver() instead of subsys_initcall()
- DT:
* Added new DTSI for AXP209
* Added support for cubietruck and olinuxino-micro
Changes since v2:
- Added a new patch for multi_v7_defconfig to enable MFD core and subsystems
- DT:
* Dropped axp,system-power-controller property from DTS
* Moved compatible and interrupt-related properties from the DTSI file to the DTS board files
- Regulators subsystem:
* Deleted useless struct axp20x_regulators
* Added a warning when out of specs values are used for the dcdc frequency
- MFD core:
* Fixed coding style
* Removed IDs from device table for i2c
- Bindings documentation:
* Several corrections and fixes
Changes since v3:
- Removed x-powers-axp209.dtsi file
- Rewritten bindings document
- MFD core:
* Fixed casting
* Better comments / documentation
- Input misc PEK driver:
* Timings are now expressed in ms and the sysfs appies the closest possible value
* No more useless pretty-printing
* Removed devm_request_threaded_irq in favour of devm_request_any_context_irq
* Moved from input attributes to platform device attributes
- Regulators subsystem:
* Removed suspend mode (axp20x_set_suspend_voltage)
* Added regulators input supply
- DT:
* DTs doesn't include anymore the dtsi
* Added input supplies for regulators
Changes since v4:
- Removed regulator patches already applied / acked by Mark Brown
- Input misc PEK driver:
* Don't print anymore the "us" unit
* Added cleanup for attributes when unbindind the device
* Fixed error code returned when device_create_file() fails
- DT:
* Enable all the regulators on at boot-time
* Removed min and max microvolts for all the regulators but DCDC2
* Moved the axp_ipsout regulator outside the MFD node
- MFD core:
* The supply regulators are now specified in the MFD driver using regulator_bulk_register_supply_alias() and the .parent_supplies in the MFD cell
Changes since v5:
- Added ACKs
- Fixed compilation warning (reported by Hans De Goede)
- Vendor-prefixes are now sorted
- Removed DT patch
Carlo Caione (6):
mfd: AXP20x: Add bindings documentation
dt-bindings: add vendor-prefix for X-Powers
input: misc: Add driver for AXP20x Power Enable Key
input: misc: Add ABI docs for AXP20x PEK
ARM: sunxi: Add AXP20x support in defconfig
ARM: sunxi: Add AXP20x support multi_v7_defconfig
.../ABI/testing/sysfs-driver-input-axp-pek | 11 + Documentation/devicetree/bindings/mfd/axp20x.txt | 97 +++++++ .../devicetree/bindings/vendor-prefixes.txt | 1 + arch/arm/configs/multi_v7_defconfig | 3 + arch/arm/configs/sunxi_defconfig | 3 + drivers/input/misc/Kconfig | 11 + drivers/input/misc/Makefile | 1 + drivers/input/misc/axp20x-pek.c | 282 +++++++++++++++++++++ 8 files changed, 409 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-input-axp-pek create mode 100644 Documentation/devicetree/bindings/mfd/axp20x.txt create mode 100644 drivers/input/misc/axp20x-pek.c
Signature · 1 line
2.1.4
PATCH v8 1/6 mfd: AXP20x: Add bindings documentation
From: Carlo Caione <[email protected]>
Bindings documentation for the AXP20x driver. In this file also sub-nodes are documented.
--- Documentation/devicetree/bindings/mfd/axp20x.txt | 97 ++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/axp20x.txt
Documentation/devicetree/bindings/mfd/axp20x.txt new file +97 -0
@@ -0,0 +1,97 @@ +AXP202/AXP209 device tree bindings + +The axp20x family current members : +axp202 (X-Powers) +axp209 (X-Powers) + +Required properties: +- compatible: "x-powers,axp202" or "x-powers,axp209" +- reg: The I2C slave address for the AXP chip +- interrupt-parent: The parent interrupt controller +- interrupts: SoC NMI / GPIO interrupt connected to the PMIC's IRQ pin +- interrupt-controller: axp20x has its own internal IRQs +- #interrupt-cells: Should be set to 1 +- regulators: A node that houses a sub-node for each regulator. The regulators + are bound using their name as listed here: dcdc2, dcdc3, ldo1, + ldo2, ldo3, ldo4, ldo5. The bindings details of individual + regulator device can be found in: + Documentation/devicetree/bindings/regulator/regulator.txt with + the exception of x-powers,dcdc-freq. Regulators not used should + still be listed for completeness and that the regulator subsystem + properly registers them. + +- x-powers,dcdc-freq: defines the work frequency of DC-DC in KHz + (range: 750-1875). Default: 1.5MHz + +Optional properties: +- regulator supplies - may be omitted if inputs are unregulated, such as using + the IPSOUT output from the PMIC + - acin-supply: The input supply for LDO1 + - vin2-supply: The input supply for DCDC2 + - vin3-supply: The input supply for DCDC3 + - ldo24in-supply: The input supply for LDO2, LDO4 + - ldo3in-supply: The input supply for LDO3 + - ldo5in-supply: The input supply for LDO5 + +Optional properties for DCDC regulators: +- x-powers,dcdc-workmode: 1 for PWM mode, 0 for AUTO (PWM/PFM) mode + Default: AUTO mode + The DCDC regulators work in a mixed PWM/PFM mode, + using PFM under light loads and switching to PWM + for heavier loads. Forcing PWM mode trades efficiency + under light loads for lower output noise. This + probably makes sense for HiFi audio related + applications that aren't battery constrained. + +Example: + +axp209: pmic at 34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + interrupt-controller; + #interrupt-cells = <1>; + + regulators { + x-powers,dcdc-freq = <1500>; + + vdd_cpu: dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1450000>; + regulator-name = "vdd-cpu"; + }; + + vdd_int_dll: dcdc3 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-int-dll"; + }; + + vdd_rtc: ldo1 { + regulator-always-on; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-rtc"; + }; + + avcc: ldo2 { + regulator-always-on; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3300000>; + regulator-name = "avcc"; + }; + + ldo3 { + /* unused */ + }; + + csi1_io_2v8: ldo4 { + /* output on extension headers */ + regulator-name = "csi1-io-2v8"; + }; + }; +}; +
Signature · 1 line
2.1.4
PATCH v8 1/6 mfd: AXP20x: Add bindings documentation
Quoted 57 lines · Chen-Yu Tsai
From: Carlo Caione <[email protected]>
Bindings documentation for the AXP20x driver. In this file also sub-nodes are documented.
Signed-off-by Carlo Caione <[email protected]>Acked-by Maxime Ripard <[email protected]>[wens at csie.org: clarify interrupt source for the axp PMIC][wens at csie.org: explain dcdc-workmode in detail and trim lines to 80 chars][wens at csie.org: make regulator supplies optional if using unregulated input][wens at csie.org: use cubieboard2 regulator nodes as example]Signed-off-by Chen-Yu Tsai <[email protected]>--- Documentation/devicetree/bindings/mfd/axp20x.txt | 97 ++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/axp20x.txtDocumentation/devicetree/bindings/mfd/axp20x.txt new file +34
-0@@ -0,0 +1,97 @@ +AXP202/AXP209 device tree bindings + +The axp20x family current members : +axp202 (X-Powers) +axp209 (X-Powers) + +Required properties: +- compatible: "x-powers,axp202" or "x-powers,axp209" +- reg: The I2C slave address for the AXP chip +- interrupt-parent: The parent interrupt controller +- interrupts: SoC NMI / GPIO interrupt connected to the PMIC's IRQ pin +- interrupt-controller: axp20x has its own internal IRQs +- #interrupt-cells: Should be set to 1 +- regulators: A node that houses a sub-node for each regulator. The regulators + are bound using their name as listed here: dcdc2, dcdc3, ldo1, + ldo2, ldo3, ldo4, ldo5. The bindings details of individual + regulator device can be found in: + Documentation/devicetree/bindings/regulator/regulator.txt with + the exception of x-powers,dcdc-freq. Regulators not used should + still be listed for completeness and that the regulator subsystem + properly registers them. + +- x-powers,dcdc-freq: defines the work frequency of DC-DC in KHz + (range: 750-1875). Default: 1.5MHz + +Optional properties: +- regulator supplies - may be omitted if inputs are unregulated, such as using + the IPSOUT output from the PMIC + - acin-supply: The input supply for LDO1 + - vin2-supply: The input supply for DCDC2 + - vin3-supply: The input supply for DCDC3 + - ldo24in-supply: The input supply for LDO2, LDO4 + - ldo3in-supply: The input supply for LDO3 + - ldo5in-supply: The input supply for LDO5
Documentation/devicetree/bindings/mfd/axp20x.txt line 44
Quoted 10 lines
Documentation/devicetree/bindings/mfd/axp20x.txt new file +10
-0+ +Optional properties for DCDC regulators: +- x-powers,dcdc-workmode: 1 for PWM mode, 0 for AUTO (PWM/PFM) mode + Default: AUTO mode + The DCDC regulators work in a mixed PWM/PFM mode, + using PFM under light loads and switching to PWM + for heavier loads. Forcing PWM mode trades efficiency + under light loads for lower output noise. This + probably makes sense for HiFi audio related + applications that aren't battery constrained.
Hi Mark,
You raised some questions during v7 about the regulator bits, specifically about the "x-powers,dcdc-workmode" property. I've expanded the regulator parts of the DT bindings doc.
Is the current version clear enough for you? I'd like to get this merged.
Thank You
ChenYu
Quoted 56 lines
Documentation/devicetree/bindings/mfd/axp20x.txt new file +53
-1+ +Example: + +axp209: pmic at 34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + interrupt-controller; + #interrupt-cells = <1>; + + regulators { + x-powers,dcdc-freq = <1500>; + + vdd_cpu: dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1450000>; + regulator-name = "vdd-cpu"; + }; + + vdd_int_dll: dcdc3 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-int-dll"; + }; + + vdd_rtc: ldo1 { + regulator-always-on; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-rtc"; + }; + + avcc: ldo2 { + regulator-always-on; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3300000>; + regulator-name = "avcc"; + }; + + ldo3 { + /* unused */ + }; + + csi1_io_2v8: ldo4 { + /* output on extension headers */ + regulator-name = "csi1-io-2v8"; + }; + }; +}; + --2.1.4
PATCH v8 1/6 mfd: AXP20x: Add bindings documentation
In reply to Chen-Yu TsaiQuoted 37 lines · Chen-Yu Tsai
From: Carlo Caione <[email protected]>
Bindings documentation for the AXP20x driver. In this file also sub-nodes are documented.
Signed-off-by Carlo Caione <[email protected]>Acked-by Maxime Ripard <[email protected]>[wens at csie.org: clarify interrupt source for the axp PMIC][wens at csie.org: explain dcdc-workmode in detail and trim lines to 80 chars][wens at csie.org: make regulator supplies optional if using unregulated input][wens at csie.org: use cubieboard2 regulator nodes as example]Signed-off-by Chen-Yu Tsai <[email protected]>--- Documentation/devicetree/bindings/mfd/axp20x.txt | 97 ++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/axp20x.txtDocumentation/devicetree/bindings/mfd/axp20x.txt new file +14
-0@@ -0,0 +1,97 @@ +AXP202/AXP209 device tree bindings + +The axp20x family current members : +axp202 (X-Powers) +axp209 (X-Powers) + +Required properties: +- compatible: "x-powers,axp202" or "x-powers,axp209" +- reg: The I2C slave address for the AXP chip +- interrupt-parent: The parent interrupt controller +- interrupts: SoC NMI / GPIO interrupt connected to the PMIC's IRQ pin +- interrupt-controller: axp20x has its own internal IRQs +- #interrupt-cells: Should be set to 1 +- regulators: A node that houses a sub-node for each regulator. The regulators
Documentation/devicetree/bindings/mfd/axp20x.txt line 24
Quoted 10 lines
Documentation/devicetree/bindings/mfd/axp20x.txt new file +10
-0+ are bound using their name as listed here: dcdc2, dcdc3, ldo1, + ldo2, ldo3, ldo4, ldo5. The bindings details of individual + regulator device can be found in: + Documentation/devicetree/bindings/regulator/regulator.txt with + the exception of x-powers,dcdc-freq. Regulators not used should + still be listed for completeness and that the regulator subsystem + properly registers them. + +- x-powers,dcdc-freq: defines the work frequency of DC-DC in KHz + (range: 750-1875). Default: 1.5MHz
I'm not keen on defining new properties when existing properties would suffice. How about using clock-frequency here instead? Also it's not common to issue this stuff using metric prefixes (KHz, MHz, etc). Please use HZ.
Documentation/devicetree/bindings/mfd/axp20x.txt line 37
Quoted 12 lines
Documentation/devicetree/bindings/mfd/axp20x.txt new file +12
-0+Optional properties: +- regulator supplies - may be omitted if inputs are unregulated, such as using + the IPSOUT output from the PMIC + - acin-supply: The input supply for LDO1 + - vin2-supply: The input supply for DCDC2 + - vin3-supply: The input supply for DCDC3 + - ldo24in-supply: The input supply for LDO2, LDO4 + - ldo3in-supply: The input supply for LDO3 + - ldo5in-supply: The input supply for LDO5 + +Optional properties for DCDC regulators: +- x-powers,dcdc-workmode: 1 for PWM mode, 0 for AUTO (PWM/PFM) mode
If there only two options, please use bool.
'x-powers,dcdc-workmode-pwm' and default to auto if it's not present.
Quoted 42 lines
Documentation/devicetree/bindings/mfd/axp20x.txt new file +42
-0+ Default: AUTO mode + The DCDC regulators work in a mixed PWM/PFM mode, + using PFM under light loads and switching to PWM + for heavier loads. Forcing PWM mode trades efficiency + under light loads for lower output noise. This + probably makes sense for HiFi audio related + applications that aren't battery constrained. + +Example: + +axp209: pmic at 34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + interrupt-controller; + #interrupt-cells = <1>; + + regulators { + x-powers,dcdc-freq = <1500>; + + vdd_cpu: dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1450000>; + regulator-name = "vdd-cpu"; + }; + + vdd_int_dll: dcdc3 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-int-dll"; + }; + + vdd_rtc: ldo1 { + regulator-always-on; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-rtc"; + }; +
Documentation/devicetree/bindings/mfd/axp20x.txt line 89
Quoted 10 lines
Documentation/devicetree/bindings/mfd/axp20x.txt new file +10
-0+ avcc: ldo2 { + regulator-always-on; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3300000>; + regulator-name = "avcc"; + }; + + ldo3 { + /* unused */ + };
Does this need to be in the example?
Quoted 7 lines
Documentation/devicetree/bindings/mfd/axp20x.txt new file +7
-0+ csi1_io_2v8: ldo4 { + /* output on extension headers */ + regulator-name = "csi1-io-2v8"; + }; + }; +}; +
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
[linux-sunxi] Re: [PATCH v8 1/6] mfd: AXP20x: Add bindings documentation
Quoted 46 lines · Lee Jones
Quoted 44 lines · Chen-Yu Tsai
From: Carlo Caione <[email protected]>
Bindings documentation for the AXP20x driver. In this file also sub-nodes are documented.
Signed-off-by Carlo Caione <[email protected]>Acked-by Maxime Ripard <[email protected]>[wens at csie.org: clarify interrupt source for the axp PMIC][wens at csie.org: explain dcdc-workmode in detail and trim lines to 80 chars][wens at csie.org: make regulator supplies optional if using unregulated input][wens at csie.org: use cubieboard2 regulator nodes as example]Signed-off-by Chen-Yu Tsai <[email protected]>--- Documentation/devicetree/bindings/mfd/axp20x.txt | 97 ++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/axp20x.txtDocumentation/devicetree/bindings/mfd/axp20x.txt new file +21
-0@@ -0,0 +1,97 @@ +AXP202/AXP209 device tree bindings + +The axp20x family current members : +axp202 (X-Powers) +axp209 (X-Powers) + +Required properties: +- compatible: "x-powers,axp202" or "x-powers,axp209" +- reg: The I2C slave address for the AXP chip +- interrupt-parent: The parent interrupt controller +- interrupts: SoC NMI / GPIO interrupt connected to the PMIC's IRQ pin +- interrupt-controller: axp20x has its own internal IRQs +- #interrupt-cells: Should be set to 1 +- regulators: A node that houses a sub-node for each regulator. The regulators + are bound using their name as listed here: dcdc2, dcdc3, ldo1, + ldo2, ldo3, ldo4, ldo5. The bindings details of individual + regulator device can be found in: + Documentation/devicetree/bindings/regulator/regulator.txt with + the exception of x-powers,dcdc-freq. Regulators not used should + still be listed for completeness and that the regulator subsystem + properly registers them.
Quoted 8 lines
Documentation/devicetree/bindings/mfd/axp20x.txt line 24
Quoted 3 lines
Documentation/devicetree/bindings/mfd/axp20x.txt new file +3
-0+ +- x-powers,dcdc-freq: defines the work frequency of DC-DC in KHz + (range: 750-1875). Default: 1.5MHzI'm not keen on defining new properties when existing properties would suffice. How about using clock-frequency here instead? Also it's not common to issue this stuff using metric prefixes (KHz, MHz, etc). Please use HZ.
I was a bit worried about conflicts later on with things like ADC sampling rates. But I guess that would be in a separate sub-node. So yeah, using clock-frequencies should work out. Same for the prefix. I'll add a patch to fix axp209.dtsi that was merged.
Quoted 15 lines
Documentation/devicetree/bindings/mfd/axp20x.txt line 37
Quoted 12 lines
Documentation/devicetree/bindings/mfd/axp20x.txt new file +12
-0+Optional properties: +- regulator supplies - may be omitted if inputs are unregulated, such as using + the IPSOUT output from the PMIC + - acin-supply: The input supply for LDO1 + - vin2-supply: The input supply for DCDC2 + - vin3-supply: The input supply for DCDC3 + - ldo24in-supply: The input supply for LDO2, LDO4 + - ldo3in-supply: The input supply for LDO3 + - ldo5in-supply: The input supply for LDO5 + +Optional properties for DCDC regulators: +- x-powers,dcdc-workmode: 1 for PWM mode, 0 for AUTO (PWM/PFM) modeIf there only two options, please use bool.
Quoted 1 line
'x-powers,dcdc-workmode-pwm' and default to auto if it's not present.
OK. Adding another regulator patch for this.
Quoted 46 lines
Quoted 46 lines
Documentation/devicetree/bindings/mfd/axp20x.txt new file +46
-0+ Default: AUTO mode + The DCDC regulators work in a mixed PWM/PFM mode, + using PFM under light loads and switching to PWM + for heavier loads. Forcing PWM mode trades efficiency + under light loads for lower output noise. This + probably makes sense for HiFi audio related + applications that aren't battery constrained. + +Example: + +axp209: pmic at 34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + interrupt-controller; + #interrupt-cells = <1>; + + regulators { + x-powers,dcdc-freq = <1500>; + + vdd_cpu: dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1450000>; + regulator-name = "vdd-cpu"; + }; + + vdd_int_dll: dcdc3 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-int-dll"; + }; + + vdd_rtc: ldo1 { + regulator-always-on; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-rtc"; + }; + + avcc: ldo2 { + regulator-always-on; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3300000>;
Quoted 8 lines
Documentation/devicetree/bindings/mfd/axp20x.txt line 89
Quoted 6 lines
Documentation/devicetree/bindings/mfd/axp20x.txt new file +6
-0+ regulator-name = "avcc"; + }; + + ldo3 { + /* unused */ + };Does this need to be in the example?
This follows the bit in the bindings saying that _all_ regulators should be listed, even unused ones, so the regulator subsystem can do cleanup.
Quoted 5 lines
Documentation/devicetree/bindings/mfd/axp20x.txt line 95
Quoted 5 lines
Documentation/devicetree/bindings/mfd/axp20x.txt new file +5
-0+ csi1_io_2v8: ldo4 { + /* output on extension headers */ + regulator-name = "csi1-io-2v8"; + }; + };
ldo5 is missing here.
Quoted 2 lines
Documentation/devicetree/bindings/mfd/axp20x.txt line 95
Quoted 2 lines
Documentation/devicetree/bindings/mfd/axp20x.txt new file +2
-0+}; +
Thanks for the review.
Regards,
ChenYu
PATCH v8 2/6 dt-bindings: add vendor-prefix for X-Powers
In reply to Chen-Yu TsaiFrom: Carlo Caione <[email protected]>
--- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -172,6 +172,7 @@ voipac Voipac Technologies s.r.o. winbond Winbond Electronics corp. wlf Wolfson Microelectronics wm Wondermedia Technologies, Inc. +x-powers X-Powers xes Extreme Engineering Solutions (X-ES) xillybus Xillybus Ltd. xlnx Xilinx
Signature · 1 line
2.1.4
PATCH v8 2/6 dt-bindings: add vendor-prefix for X-Powers
Quoted 7 lines · Chen-Yu Tsai
From: Carlo Caione <[email protected]>
Signed-off-by Carlo Caione <[email protected]>Signed-off-by Chen-Yu Tsai <[email protected]>--- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+)
Quoted 12 lines
Documentation/devicetree/bindings/vendor-prefixes.txt +1
-0@@ -172,6 +172,7 @@ voipac Voipac Technologies s.r.o. winbond Winbond Electronics corp. wlf Wolfson Microelectronics wm Wondermedia Technologies, Inc. +x-powers X-Powers xes Extreme Engineering Solutions (X-ES) xillybus Xillybus Ltd. xlnx Xilinx
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v8 3/6 input: misc: Add driver for AXP20x Power Enable Key
In reply to Chen-Yu TsaiFrom: Carlo Caione <[email protected]>
This patch add support for the Power Enable Key found on MFD AXP202 and AXP209. Besides the basic support for the button, the driver adds two entries in sysfs to configure the time delay for power on/off.
--- drivers/input/misc/Kconfig | 11 ++ drivers/input/misc/Makefile | 1 + drivers/input/misc/axp20x-pek.c | 282 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 294 insertions(+) create mode 100644 drivers/input/misc/axp20x-pek.c
drivers/input/misc/Kconfig +11 -0
@@ -404,6 +404,17 @@ config INPUT_RETU_PWRBUTTON To compile this driver as a module, choose M here. The module will be called retu-pwrbutton. +config INPUT_AXP20X_PEK + tristate "X-Powers AXP20X power button driver" + depends on MFD_AXP20X + help + Say Y here if you want to enable power key reporting via the + AXP20X PMIC. + + To compile this driver as a module, choose M here. The module will + be called axp20x-pek. + + config INPUT_TWL4030_PWRBUTTON tristate "TWL4030 Power button Driver" depends on TWL4030_CORE
drivers/input/misc/Makefile +1 -0
@@ -54,6 +54,7 @@ obj-$(CONFIG_INPUT_POWERMATE) += powermate.o obj-$(CONFIG_INPUT_PWM_BEEPER) += pwm-beeper.o obj-$(CONFIG_INPUT_RB532_BUTTON) += rb532_button.o obj-$(CONFIG_INPUT_RETU_PWRBUTTON) += retu-pwrbutton.o +obj-$(CONFIG_INPUT_AXP20X_PEK) += axp20x-pek.o obj-$(CONFIG_INPUT_GPIO_ROTARY_ENCODER) += rotary_encoder.o obj-$(CONFIG_INPUT_SGI_BTNS) += sgi_btns.o obj-$(CONFIG_INPUT_SIRFSOC_ONKEY) += sirfsoc-onkey.o
drivers/input/misc/axp20x-pek.c new file +282 -0
282 lines not on this page · raw message
Signature · 1 line
2.1.4
Dmitry Torokhov
maintainerPATCH v8 3/6 input: misc: Add driver for AXP20x Power Enable Key
Quoted 10 lines · Chen-Yu Tsai
From: Carlo Caione <[email protected]>
This patch add support for the Power Enable Key found on MFD AXP202 and AXP209. Besides the basic support for the button, the driver adds two entries in sysfs to configure the time delay for power on/off.
Signed-off-by Carlo Caione <[email protected]>Acked-by Dmitry Torokhov <[email protected]>[wens at csie.org: make axp20x_pek_remove() static; remove driver owner field]Signed-off-by Chen-Yu Tsai <[email protected]>
Hmm, it looks like MFD parts are in mainline, so I can actually pick this up myself. OK.
By the way, does driver works for you with the patch below?
Thanks.
Signature · 13 lines
Dmitry Input: axp20x-pek - switch over to using attribute group From: Dmitry Torokhov <[email protected]> Instead of registering device attributes individually let's use attribute groups and also devm_* infrastructure to ease cleanup. Refresh of synaptics-forcepad-pnp.patch --- drivers/input/misc/axp20x-pek.c | 64 ++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 28 deletions(-)
drivers/input/misc/axp20x-pek.c +36 -28
@@ -138,17 +138,28 @@ static ssize_t axp20x_store_ext_attr(struct device *dev, axp20x_ea->mask, idx);if (ret !=0 )return -EINVAL ; +return count; }static struct dev_ext_attribute axp20x_dev_attr_startup = { .attr =__ATTR (startup,0644 , axp20x_show_ext_attr, axp20x_store_ext_attr), - .var = &axp20x_pek_startup_ext_attr + .var = &axp20x_pek_startup_ext_attr, };static struct dev_ext_attribute axp20x_dev_attr_shutdown = { .attr =__ATTR (shutdown,0644 , axp20x_show_ext_attr, axp20x_store_ext_attr), - .var = &axp20x_pek_shutdown_ext_attr + .var = &axp20x_pek_shutdown_ext_attr, +}; + +static struct attribute *axp20x_attributes[] = { + &axp20x_dev_attr_startup.attr.attr, + &axp20x_dev_attr_shutdown.attr.attr, +NULL , +}; + +static const struct attribute_group axp20x_attribute_group = { + .attrs = axp20x_attributes, };static irqreturn_t axp20x_pek_irq (int irq,void *pwr)
@@ -166,6 +177,13 @@ static irqreturn_t axp20x_pek_irq(int irq, void *pwr)return IRQ_HANDLED ; } +static void axp20x_remove_sysfs_group (void *_data) +{ +struct device *dev = _data; + +sysfs_remove_group (&dev->kobj, &axp20x_attribute_group); +} +static int axp20x_pek_probe (struct platform_device *pdev) {struct axp20x_pek *axp20x_pek;
@@ -214,12 +232,11 @@ static int axp20x_pek_probe(struct platform_device *pdev)input_set_drvdata (idev, axp20x_pek); error =devm_request_any_context_irq (&pdev->dev, axp20x_pek->irq_dbr, - axp20x_pek_irq,0 , -"axp20x-pek-dbr" , idev); + axp20x_pek_irq,0 , +"axp20x-pek-dbr" , idev);if (error <0 ) {dev_err (axp20x->dev,"Failed to request dbr IRQ#%d: %d\n" , axp20x_pek->irq_dbr, error); -return error; }
@@ -232,45 +249,36 @@ static int axp20x_pek_probe(struct platform_device *pdev)return error; } - error =device_create_file (&pdev->dev, &axp20x_dev_attr_startup.attr); -if (error) + error =sysfs_create_group (&pdev->dev.kobj, &axp20x_attribute_group); +if (error) { +dev_err (axp20x->dev,"Failed to create sysfs attributes: %d\n" , + error);return error; + } - error =device_create_file (&pdev->dev, &axp20x_dev_attr_shutdown.attr); -if (error) - goto clear_startup_attr; + error =devm_add_action (&pdev->dev, + axp20x_remove_sysfs_group, &pdev->dev); +if (error) { +axp20x_remove_sysfs_group (&pdev->dev); +dev_err (&pdev->dev,"Failed to add sysfs cleanup action: %d\n" , + error); +return error; + } error =input_register_device (idev);if (error) {dev_err (axp20x->dev,"Can't register input device: %d\n" , error); - goto clear_attr; +return error; }platform_set_drvdata (pdev, axp20x_pek);return 0 ; - -clear_attr: -device_remove_file (&pdev->dev, &axp20x_dev_attr_shutdown.attr); - -clear_startup_attr: -device_remove_file (&pdev->dev, &axp20x_dev_attr_startup.attr); - -return error; -} - -static int axp20x_pek_remove (struct platform_device *pdev) -{ -device_remove_file (&pdev->dev, &axp20x_dev_attr_shutdown.attr); -device_remove_file (&pdev->dev, &axp20x_dev_attr_startup.attr); - -return 0 ; }static struct platform_driver axp20x_pek_driver = { .probe = axp20x_pek_probe, - .remove = axp20x_pek_remove, .driver = { .name ="axp20x-pek" , },
PATCH v8 3/6 input: misc: Add driver for AXP20x Power Enable Key
Quoted 7 lines · Dmitry Torokhov
Quoted 6 lines · Chen-Yu Tsai
From: Carlo Caione <[email protected]>
This patch add support for the Power Enable Key found on MFD AXP202 and AXP209. Besides the basic support for the button, the driver adds two entries in sysfs to configure the time delay for power on/off.
Quoted 7 lines
Quoted 4 lines
Signed-off-by Carlo Caione <[email protected]>Acked-by Dmitry Torokhov <[email protected]>[wens at csie.org: make axp20x_pek_remove() static; remove driver owner field]Signed-off-by Chen-Yu Tsai <[email protected]>Hmm, it looks like MFD parts are in mainline, so I can actually pick this up myself. OK.
Cool.
Quoted 2 lines
By the way, does driver works for you with the patch below?
It does. You could apply it or squash it when you pick up the PEK patch. I'm ok either way.
Thanks!
ChenYu
Quoted 141 lines
Thanks.
--
DmitryInput: axp20x-pek - switch over to using attribute group
From: Dmitry Torokhov <[email protected]>
Instead of registering device attributes individually let's use attribute groups and also devm_* infrastructure to ease cleanup.
Refresh of synaptics-forcepad-pnp.patch
--- drivers/input/misc/axp20x-pek.c | 64 ++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 28 deletions(-)drivers/input/misc/axp20x-pek.c +36
-28@@ -138,17 +138,28 @@ static ssize_t axp20x_store_ext_attr(struct device *dev, axp20x_ea->mask, idx);if (ret !=0 )return -EINVAL ; +return count; }static struct dev_ext_attribute axp20x_dev_attr_startup = { .attr =__ATTR (startup,0644 , axp20x_show_ext_attr, axp20x_store_ext_attr), - .var = &axp20x_pek_startup_ext_attr + .var = &axp20x_pek_startup_ext_attr, };static struct dev_ext_attribute axp20x_dev_attr_shutdown = { .attr =__ATTR (shutdown,0644 , axp20x_show_ext_attr, axp20x_store_ext_attr), - .var = &axp20x_pek_shutdown_ext_attr + .var = &axp20x_pek_shutdown_ext_attr, +}; + +static struct attribute *axp20x_attributes[] = { + &axp20x_dev_attr_startup.attr.attr, + &axp20x_dev_attr_shutdown.attr.attr, +NULL , +}; + +static const struct attribute_group axp20x_attribute_group = { + .attrs = axp20x_attributes, };static irqreturn_t axp20x_pek_irq (int irq,void *pwr)@@ -166,6 +177,13 @@ static irqreturn_t axp20x_pek_irq(int irq, void *pwr)return IRQ_HANDLED ; } +static void axp20x_remove_sysfs_group (void *_data) +{ +struct device *dev = _data; + +sysfs_remove_group (&dev->kobj, &axp20x_attribute_group); +} +static int axp20x_pek_probe (struct platform_device *pdev) {struct axp20x_pek *axp20x_pek;@@ -214,12 +232,11 @@ static int axp20x_pek_probe(struct platform_device *pdev)input_set_drvdata (idev, axp20x_pek); error =devm_request_any_context_irq (&pdev->dev, axp20x_pek->irq_dbr, - axp20x_pek_irq,0 , -"axp20x-pek-dbr" , idev); + axp20x_pek_irq,0 , +"axp20x-pek-dbr" , idev);if (error <0 ) {dev_err (axp20x->dev,"Failed to request dbr IRQ#%d: %d\n" , axp20x_pek->irq_dbr, error); -return error; }@@ -232,45 +249,36 @@ static int axp20x_pek_probe(struct platform_device *pdev)return error; } - error =device_create_file (&pdev->dev, &axp20x_dev_attr_startup.attr); -if (error) + error =sysfs_create_group (&pdev->dev.kobj, &axp20x_attribute_group); +if (error) { +dev_err (axp20x->dev,"Failed to create sysfs attributes: %d\n" , + error);return error; + } - error =device_create_file (&pdev->dev, &axp20x_dev_attr_shutdown.attr); -if (error) - goto clear_startup_attr; + error =devm_add_action (&pdev->dev, + axp20x_remove_sysfs_group, &pdev->dev); +if (error) { +axp20x_remove_sysfs_group (&pdev->dev); +dev_err (&pdev->dev,"Failed to add sysfs cleanup action: %d\n" , + error); +return error; + } error =input_register_device (idev);if (error) {dev_err (axp20x->dev,"Can't register input device: %d\n" , error); - goto clear_attr; +return error; }platform_set_drvdata (pdev, axp20x_pek);return 0 ; - -clear_attr: -device_remove_file (&pdev->dev, &axp20x_dev_attr_shutdown.attr); - -clear_startup_attr: -device_remove_file (&pdev->dev, &axp20x_dev_attr_startup.attr); - -return error; -} - -static int axp20x_pek_remove (struct platform_device *pdev) -{ -device_remove_file (&pdev->dev, &axp20x_dev_attr_shutdown.attr); -device_remove_file (&pdev->dev, &axp20x_dev_attr_startup.attr); - -return 0 ; }static struct platform_driver axp20x_pek_driver = { .probe = axp20x_pek_probe, - .remove = axp20x_pek_remove, .driver = { .name ="axp20x-pek" , },
PATCH v8 4/6 input: misc: Add ABI docs for AXP20x PEK
In reply to Chen-Yu TsaiFrom: Carlo Caione <[email protected]>
Add ABI entries for the PEK found on PMU X-Powers AXP202 and AXP209.
--- Documentation/ABI/testing/sysfs-driver-input-axp-pek | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-input-axp-pek
Documentation/ABI/testing/sysfs-driver-input-axp-pek new file +11 -0
@@ -0,0 +1,11 @@ +What: /sys/class/input/input(x)/device/startup +Date: March 2014 +Contact: Carlo Caione <[email protected]> +Description: Startup time in us. Board is powered on if the button is pressed + for more than <startup_time> + +What: /sys/class/input/input(x)/device/shutdown +Date: March 2014 +Contact: Carlo Caione <[email protected]> +Description: Shutdown time in us. Board is powered off if the button is pressed + for more than <shutdown_time>
Signature · 1 line
2.1.4
PATCH v8 4/6 input: misc: Add ABI docs for AXP20x PEK
Quoted 3 lines · Chen-Yu Tsai
From: Carlo Caione <[email protected]>
Add ABI entries for the PEK found on PMU X-Powers AXP202 and AXP209.
Hi Dmitry,
Would it be possible to take this patch through your tree?
Thanks
ChenYu
Quoted 28 lines
Signed-off-by Carlo Caione <[email protected]>[wens at csie.org: Fixed path for sysfs entries]Signed-off-by Chen-Yu Tsai <[email protected]>--- Documentation/ABI/testing/sysfs-driver-input-axp-pek | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-input-axp-pekDocumentation/ABI/testing/sysfs-driver-input-axp-pek new file +11
-1@@ -0,0 +1,11 @@ +What: /sys/class/input/input(x)/device/startup +Date: March 2014 +Contact: Carlo Caione <[email protected]> +Description: Startup time in us. Board is powered on if the button is pressed + for more than <startup_time> + +What: /sys/class/input/input(x)/device/shutdown +Date: March 2014 +Contact: Carlo Caione <[email protected]> +Description: Shutdown time in us. Board is powered off if the button is pressed + for more than <shutdown_time> --2.1.4
Dmitry Torokhov
maintainerPATCH v8 4/6 input: misc: Add ABI docs for AXP20x PEK
Hi Chen-Yu,
Quoted 8 lines · Chen-Yu Tsai
Quoted 3 lines · Chen-Yu Tsai
From: Carlo Caione <[email protected]>
Add ABI entries for the PEK found on PMU X-Powers AXP202 and AXP209.
Hi Dmitry,
Would it be possible to take this patch through your tree?
Actually I folded it into the original patch adding the code so it's already there.
Thanks.
Quoted 33 lines
Thanks
ChenYuQuoted 28 lines
Signed-off-by Carlo Caione <[email protected]>[wens at csie.org: Fixed path for sysfs entries]Signed-off-by Chen-Yu Tsai <[email protected]>--- Documentation/ABI/testing/sysfs-driver-input-axp-pek | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-input-axp-pekDocumentation/ABI/testing/sysfs-driver-input-axp-pek new file +11
-1@@ -0,0 +1,11 @@ +What: /sys/class/input/input(x)/device/startup +Date: March 2014 +Contact: Carlo Caione <[email protected]> +Description: Startup time in us. Board is powered on if the button is pressed + for more than <startup_time> + +What: /sys/class/input/input(x)/device/shutdown +Date: March 2014 +Contact: Carlo Caione <[email protected]> +Description: Shutdown time in us. Board is powered off if the button is pressed + for more than <shutdown_time> --2.1.4
Signature · 1 line
Dmitry
PATCH v8 4/6 input: misc: Add ABI docs for AXP20x PEK
Quoted 6 lines · Dmitry Torokhov
Hi Chen-Yu,
Quoted 3 lines · Chen-Yu Tsai
Quoted 2 lines · Chen-Yu Tsai
From: Carlo Caione <[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Add ABI entries for the PEK found on PMU X-Powers AXP202 and AXP209.
Hi Dmitry,
Would it be possible to take this patch through your tree?
Actually I folded it into the original patch adding the code so it's already there.
Sorry I didn't look deep enough. Just looked at the commit messages.
Thanks again.
ChenYu
Quoted 38 lines
Thanks.
Quoted 25 lines
Thanks
ChenYuQuoted 20 lines
Signed-off-by Carlo Caione <[email protected]>[wens at csie.org: Fixed path for sysfs entries]Signed-off-by Chen-Yu Tsai <[email protected]>--- Documentation/ABI/testing/sysfs-driver-input-axp-pek | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-input-axp-pekDocumentation/ABI/testing/sysfs-driver-input-axp-pek new file +6
-0@@ -0,0 +1,11 @@ +What: /sys/class/input/input(x)/device/startup +Date: March 2014 +Contact: Carlo Caione <[email protected]> +Description: Startup time in us. Board is powered on if the button is pressed + for more than <startup_time> +Quoted 8 lines
Quoted 8 lines
Documentation/ABI/testing/sysfs-driver-input-axp-pek new file +5
-1+What: /sys/class/input/input(x)/device/shutdown +Date: March 2014 +Contact: Carlo Caione <[email protected]> +Description: Shutdown time in us. Board is powered off if the button is pressed + for more than <shutdown_time> --2.1.4
--
Dmitry
PATCH v8 5/6 ARM: sunxi: Add AXP20x support in defconfig
In reply to Chen-Yu TsaiFrom: Carlo Caione <[email protected]>
--- arch/arm/configs/sunxi_defconfig | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/configs/sunxi_defconfig +3 -0
@@ -54,6 +54,8 @@ CONFIG_STMMAC_ETH=y # CONFIG_INPUT_MOUSEDEV is not set # CONFIG_INPUT_KEYBOARD is not set # CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_MISC=y +CONFIG_INPUT_AXP20X_PEK=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_NR_UARTS=8
@@ -77,6 +79,7 @@ CONFIG_SUNXI_WATCHDOG=y CONFIG_MFD_AXP20X=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_AXP20X=y CONFIG_REGULATOR_GPIO=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y
Signature · 1 line
2.1.4
Maxime Ripard
AppliedPATCH v8 5/6 ARM: sunxi: Add AXP20x support in defconfig
Quoted 4 lines · Chen-Yu Tsai
From: Carlo Caione <[email protected]>
Signed-off-by Carlo Caione <[email protected]>Signed-off-by Chen-Yu Tsai <[email protected]>
Applied, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150106/40b1d238/attachment.sig>
PATCH v8 6/6 ARM: sunxi: Add AXP20x support multi_v7_defconfig
In reply to Chen-Yu TsaiFrom: Carlo Caione <[email protected]>
--- arch/arm/configs/multi_v7_defconfig | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/configs/multi_v7_defconfig +3 -0
@@ -191,6 +191,7 @@ CONFIG_TOUCHSCREEN_ATMEL_MXT=y CONFIG_TOUCHSCREEN_STMPE=y CONFIG_INPUT_MISC=y CONFIG_INPUT_MPU3050=y +CONFIG_INPUT_AXP20X_PEK=y CONFIG_SERIO_AMBAKMI=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y
@@ -278,6 +279,7 @@ CONFIG_SUNXI_WATCHDOG=y CONFIG_MESON_WATCHDOG=y CONFIG_MFD_AS3722=y CONFIG_MFD_BCM590XX=y +CONFIG_MFD_AXP20X=y CONFIG_MFD_CROS_EC=y CONFIG_MFD_CROS_EC_SPI=y CONFIG_MFD_MAX77686=y
@@ -290,6 +292,7 @@ CONFIG_MFD_TPS6586X=y CONFIG_MFD_TPS65910=y CONFIG_REGULATOR_AB8500=y CONFIG_REGULATOR_AS3722=y +CONFIG_REGULATOR_AXP20X=y CONFIG_REGULATOR_BCM590XX=y CONFIG_REGULATOR_GPIO=y CONFIG_MFD_SYSCON=y
Signature · 1 line
2.1.4
Maxime Ripard
AppliedPATCH v8 6/6 ARM: sunxi: Add AXP20x support multi_v7_defconfig
Quoted 4 lines · Chen-Yu Tsai
From: Carlo Caione <[email protected]>
Signed-off-by Carlo Caione <[email protected]>Signed-off-by Chen-Yu Tsai <[email protected]>
Applied, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150106/285b437e/attachment.sig>
v8 cover mfd: AXP20x: Add support for AXP202 and AXP209
In reply to Chen-Yu TsaiQuoted 1 line · Chen-Yu Tsai
Hi everyone,
Hi ChenYu,
Thank you very much for respinning this.
Signature · 1 line
Carlo Caione
v8 cover mfd: AXP20x: Add support for AXP202 and AXP209
In reply to Chen-Yu TsaiQuoted 11 lines · Chen-Yu Tsai
Hi everyone,
This is v8 of the AXP20x PMIC patches. These are the remaining patches of the original series: PEK (power button) input driver, binding docs, and defconfig updates.
Mark raised some questions during v7 about the first patch, specifically about the "x-powers,dcdc-workmode" property. I've expanded the regulator parts of the DT bindings doc. Mark, if you could take a look and give us your blessing?
Quoted 5 lines
Dmitry, you were OK with the input bits going through the MFD tree, is that still the case?
If there are no more problems, maybe Lee could take patches 1~4, and Maxime can take the defconfig patches through his tree.
Hi Lee,
Can we get the last remaining patches (1 & 2) merged?
Thanks
ChenYu
Quoted 163 lines
Thanks
ChenYuChanges since v7:
- DT bindings
* Clarified the AXP's interrupt source
* Added explaination for "x-powers,dcdc-workmode" property
* Made regulator supply properties optional. They can be omitted when the input is unregulated, as is the case when they are connected to the IPSOUT output on the PMIC.
* Used real world example (Cubieboard2) for regulator nodes- Fixed paths for PEK sysfs entries.
- PEK driver
* Madeaxp20x_pek_remove()in PEK driver static.
* Removed driver owner field.
* Wrapped some lines over 80 characters.Original cover letter from v7:
During the merging of v6 several patches were left out. This v7 comprises all the patches that are still pending.
//--
AXP209 and AXP202 are the PMUs (Power Management Unit) used by A10, A13 and A20 SoCs and developed by X-Powers, a sister company of Allwinner. AXP20x comprises an adaptive USB-Compatible PWM charger, 2 BUCK DC-DC converters, 5 LDOs, multiple 12-bit ADCs of voltage, current and temperature as well as 4 configurable GPIOs.
This set of patches introduces the core driver and support for two different subsystems:
- Regulators
- PEK (Power Enable Key)Changes since v1:
- Added a new standalone patch for defconfig
- MFD core:
* Removed axp,system-power-controller property- Bindings documentation:
* Corrected description for dcdc-workmode property
* Removed unused axp20x-pek compatible- Input misc PEK driver:
* Fixed seconds in lower case- Regulators subsystem:
* Fixedaxp20x_set_suspend_voltage()
* Switched to using multi-bit control for regulators
* When "regulators" node is not found driver doesn't quit
* Driver is now usingdevm_regulator_register()
* Addedmodule_platform_driver()instead ofsubsys_initcall()- DT:
* Added new DTSI for AXP209
* Added support for cubietruck and olinuxino-microChanges since v2:
- Added a new patch for
multi_v7_defconfigto enable MFD core and subsystems- DT:
* Dropped axp,system-power-controller property from DTS
* Moved compatible and interrupt-related properties from the DTSI file to the DTS board files- Regulators subsystem:
* Deleted useless structaxp20x_regulators
* Added a warning when out of specs values are used for the dcdc frequency- MFD core:
* Fixed coding style
* Removed IDs from device table for i2c- Bindings documentation:
* Several corrections and fixesChanges since v3:
- Removed
x-powers-axp209.dtsifile
- Rewritten bindings document- MFD core:
* Fixed casting
* Better comments / documentation- Input misc PEK driver:
* Timings are now expressed in ms and the sysfs appies the closest possible value
* No more useless pretty-printing
* Removeddevm_request_threaded_irqin favour ofdevm_request_any_context_irq
* Moved from input attributes to platform device attributes- Regulators subsystem:
* Removed suspend mode (axp20x_set_suspend_voltage)
* Added regulators input supply- DT:
* DTs doesn't include anymore the dtsi
* Added input supplies for regulatorsChanges since v4:
- Removed regulator patches already applied / acked by Mark Brown
- Input misc PEK driver:
* Don't print anymore the "us" unit
* Added cleanup for attributes when unbindind the device
* Fixed error code returned whendevice_create_file()fails- DT:
* Enable all the regulators on at boot-time
* Removed min and max microvolts for all the regulators but DCDC2
* Moved theaxp_ipsoutregulator outside the MFD node- MFD core:
* The supply regulators are now specified in the MFD driver usingregulator_bulk_register_supply_alias()and the .parent_supplies in the MFD cellChanges since v5:
- Added ACKs
- Fixed compilation warning (reported by Hans De Goede)
- Vendor-prefixes are now sorted
- Removed DT patchCarlo Caione (6):
mfd: AXP20x: Add bindings documentation
dt-bindings: add vendor-prefix for X-Powers
input: misc: Add driver for AXP20x Power Enable Key
input: misc: Add ABI docs for AXP20x PEK
ARM: sunxi: Add AXP20x support in defconfig
ARM: sunxi: Add AXP20x supportmulti_v7_defconfig.../ABI/testing/sysfs-driver-input-axp-pek | 11 + Documentation/devicetree/bindings/mfd/axp20x.txt | 97 +++++++ .../devicetree/bindings/vendor-prefixes.txt | 1 + arch/arm/configs/multi_v7_defconfig | 3 + arch/arm/configs/sunxi_defconfig | 3 + drivers/input/misc/Kconfig | 11 + drivers/input/misc/Makefile | 1 + drivers/input/misc/axp20x-pek.c | 282 +++++++++++++++++++++ 8 files changed, 409 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-input-axp-pek create mode 100644 Documentation/devicetree/bindings/mfd/axp20x.txt create mode 100644 drivers/input/misc/axp20x-pek.c--
2.1.4