- 01 11月, 2017 1 次提交
-
-
由 Chen-Yu Tsai 提交于
Now that axp20x-regulator supports AXP813, we can add a cell for it to enable it. Signed-off-by: NChen-Yu Tsai <wens@csie.org> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Tested-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 05 9月, 2017 2 次提交
-
-
由 Quentin Schulz 提交于
According to their datasheets, the AXP221, AXP223, AXP288, AXP803, AXP809 and AXP813 PEK have different values for startup time bits from the AXP20X, let's use the platform device id with the correct values. Signed-off-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Signed-off-by: NChen-Yu Tsai <wens@csie.org> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Chen-Yu Tsai 提交于
The X-Powers AXP813 PMIC is normally used with Allwinner's A83T SoC. It has the same range of functions as other X-Powers PMICs, such as DC-DC buck converter and linear regulator outputs, AC-IN and VBUS power supplies, power button trigger, GPIOs, ADCs, and a battery charger. Note that the IRQ table given in the datasheet is incorrect: in IRQ enable/status registers 1, there are separate IRQs for ACIN and VBUS, instead of bits [7:5] being the same as bits [4:2]. So it shares the same IRQs as the AXP803, rather than the AXP288. This patch adds basic mfd support for it, with only the power button enabled. Signed-off-by: NChen-Yu Tsai <wens@csie.org> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 06 7月, 2017 1 次提交
-
-
由 Icenowy Zheng 提交于
As axp20x-regulator now supports AXP803, add a cell for it. Signed-off-by: NIcenowy Zheng <icenowy@aosc.io> Acked-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 27 4月, 2017 7 次提交
-
-
由 Icenowy Zheng 提交于
AXP803 is a new PMIC chip produced by X-Powers, usually paired with A64 via RSB bus. The PMIC itself is like AXP288, but with RSB support and dedicated VBUS and ACIN. Add support for it in the axp20x mfd driver. Currently only power key function is supported. Signed-off-by: NIcenowy Zheng <icenowy@aosc.io> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Quentin Schulz 提交于
The X-Powers AXP20X and AXP22X PMICs can have a battery as power supply. This patch adds the AXP20X/AXP22X battery driver to the MFD cells of the AXP209, AXP221 and AXP223 MFD. Signed-off-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Acked-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Quentin Schulz 提交于
The CHRG_CTRL1 and CHRG_CTRL2 registers are made for controlling different battery charging settings such as the constant current charge value. The AXP22X also have a third register CHRG_CTRL3 which has settings for battery charging too. This adds the CHRG_CTRL1, CHRG_CTRL2 and CHRG_CTRL3 registers to the list of writeable registers for AXP20X and AXP22X PMICs. Signed-off-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Acked-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Quentin Schulz 提交于
The X-Powers AXP20X and AXP22X PMICs expose the status of AC power supply. This adds the AC power supply driver to the MFD cells of the AXP22X PMICs. Signed-off-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Acked-By: NSebastian Reichel <sre@kernel.org> Acked-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Quentin Schulz 提交于
This adds the AXP20X/AXP22x ADCs driver to the mfd cells of the AXP209, AXP221 and AXP223 MFD. Signed-off-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Acked-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Quentin Schulz 提交于
The registers 0x56 and 0x57 of AXP22X PMIC store the value of the internal temperature of the PMIC. This patch modifies the name of these registers from AXP22X_PMIC_ADC_H/L to AXP22X_PMIC_TEMP_H/L so their purpose is clearer. Signed-off-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Acked-by: NChen-Yu Tsai <wens@csie.org> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Rask Ingemann Lambertsen 提交于
commit b101829a029a ("mfd: axp20x: Fix AXP806 access errors on cold boot") was intended to fix the case where a board uses an AXP806 in slave mode, but the boot loader leaves it in master mode for lack of AXP806 support. But now the driver breaks on boards where the PMIC is operating in master mode. This patch lets the driver use the new device tree property "xpowers,master-mode" to set the correct operating mode for the board. Fixes: 8824ee85 ("mfd: axp20x: Add support for AXP806 PMIC") Signed-off-by: NRask Ingemann Lambertsen <rask@formelder.dk> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 13 2月, 2017 6 次提交
-
-
由 Chen-Yu Tsai 提交于
The AXP806 supports either master/standalone or slave mode. Slave mode allows sharing the serial bus, even with multiple AXP806 which all have the same hardware address. This is done with extra "serial interface address extension", or AXP806_BUS_ADDR_EXT, and "register address extension", or AXP806_REG_ADDR_EXT, registers. The former is read-only, with 1 bit customizable at the factory, and 1 bit depending on the state of an external pin. The latter is writable. Only when the these device addressing bits (in the upper 4 bits of the registers) match, will the device respond to operations on its other registers. The AXP806_REG_ADDR_EXT was previously configured by Allwinner's bootloader. Work on U-boot SPL support now allows us to switch to mainline U-boot, which doesn't do this for us. There might be other bare minimum bootloaders out there which don't to this either. It's best to handle this in the kernel. This patch sets AXP806_REG_ADDR_EXT to 0x10, which is what we know to be the proper value for a standard AXP806 in slave mode. Afterwards it will reinitialize the regmap cache, to purge any invalid stale values. Signed-off-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Quentin Schulz 提交于
The AXP223 shares most of its logic with the AXP221 but has some differences for the VBUS power supply driver. Thus, to probe the driver with the correct compatible, the AXP221 and the AXP223 now have separate MFD cells. AXP221 MFD cells are renamed from axp22x_cells to axp221_cells to avoid confusion. Signed-off-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Acked-by: NChen-Yu Tsai <wens@csie.org> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Hans de Goede 提交于
The axp288 pmic has a lot more volatile registers then we were listing in axp288_volatile_ranges, fix this. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Hans de Goede 提交于
The R in PEK_DBR stands for rising, so it should be mapped to AXP288_IRQ_POKP where the last P stands for positive edge. Likewise PEK_DBF should be mapped to the falling edge, aka the _N_egative edge, so it should be mapped to AXP288_IRQ_POKN. This fixes the inverted powerbutton status reporting by the axp20x-pek driver. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Hans de Goede 提交于
The axp288 has the following irqs 2 times: VBUS_FALL, VBUS_RISE, VBUS_OV. On boot / reset the enable flags for both the normal and alt version of these irqs is set. Since we were only listing the normal version in the axp288 regmap_irq struct, we were never disabling the alt versions of these irqs. Add the alt versions to the axp288 regmap_irq struct, so that these get properly disabled. Together with the other axp288 fixes in this series, this fixes the axp288 irq contineously triggering. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Hans de Goede 提交于
The interrupt line of the entire family of axp2xx pmics is active-low, for devicetree enumerated irqs, this is dealt with in the devicetree. ACPI irq resources have a flag field for this too, I tried using this on my CUBE iwork8 Air tablet, but it does not contain the right data. The dstd shows the irq listed as either ActiveLow or ActiveHigh, depending on the OSID variable, which seems to be set by the "OS IMAGE ID" in the BIOS/EFI setup screen. Since the acpi-resource info is no good, simply pass in IRQF_TRIGGER_LOW on the axp288. Together with the other axp288 fixes in this series, this fixes the axp288 irq contineously triggering. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 29 11月, 2016 1 次提交
-
-
由 Chen-Yu Tsai 提交于
The AXP806 supports either master/standalone or slave mode. Slave mode allows sharing the serial bus, even with multiple AXP806 which all have the same hardware address. This is done with extra "serial interface address extension", or AXP806_BUS_ADDR_EXT, and "register address extension", or AXP806_REG_ADDR_EXT, registers. The former is read-only, with 1 bit customizable at the factory, and 1 bit depending on the state of an external pin. The latter is writable. Only when the these device addressing bits (in the upper 4 bits of the registers) match, will the device respond to operations on its other registers. Add these 2 registers to the regmap so we can access them. Signed-off-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 21 11月, 2016 1 次提交
-
-
由 Icenowy Zheng 提交于
AXP22x has also some different register map than axp20x, they're also added here. Signed-off-by: NIcenowy Zheng <icenowy@aosc.xyz> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 04 10月, 2016 1 次提交
-
-
由 Maxime Ripard 提交于
Now that we have a GPIO driver for the AXP209, we can add it to our MFD. Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 13 9月, 2016 1 次提交
-
-
由 Chen-Yu Tsai 提交于
The X-Powers AXP806 is a new PMIC that is paired with Allwinner's A80 SoC, along with a master AXP809 PMIC. This PMIC has a new register layout, and supports some functions not seen in other X-Powers PMICs, such as master-slave mode, or having multiple AXP806 PMICs on the same bus with address space extension, or supporting both I2C and RSB mode. I2C has not been tested. This patch adds support for the interrupts of the PMIC. A regulator sub-device is enabled, but actual regulator support will come in a later patch. Signed-off-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 29 6月, 2016 3 次提交
-
-
由 Hans de Goede 提交于
Add axp20x-usb-power-supply for axp22x pmics. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Hans de Goede 提交于
The kernel expects the power_off function to not return, and if it does it panics. Add a slight delay after the i2c write which turns off power through the PMIC, to give capacitors etc. some time to drain. Without this the kernel lives on long enough after the poweroff to print the following on the serial console on my Mele A1000G quad: [ 248.583588] reboot: Power down [ 248.600490] Kernel pa With the delay the start of printing "Kernel panic" is gone. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Hans de Goede 提交于
The axp22x pmic has a bunch of volatile registers besides the interrupt ones, extend axp22x_volatile_ranges with these. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 09 5月, 2016 1 次提交
-
-
由 Michael Haas 提交于
As a counterpart to the usb power_supply cell, this commit adds an AC power_supply cell to the axp20x driver. Still missing are the RTC backup battery and the main battery charger cells. Signed-off-by: NMichael Haas <haas@computerlinguist.org> Acked-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 19 4月, 2016 1 次提交
-
-
由 Chen-Yu Tsai 提交于
The X-Powers AXP809 is a new PMIC that is paired with Allwinner's A80 SoC, along with a slave AXP806 PMIC. This PMIC is quite similar to the earlier AXP223, though the interrupts and regulator have changed a bit. This patch adds support for the interrupts and power button of the PMIC. Signed-off-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 12 2月, 2016 6 次提交
-
-
由 Chen-Yu Tsai 提交于
The AXP223 is a new PMIC commonly paired with Allwinner A23/A33 SoCs. It is functionally identical to AXP221; only the regulator default voltage/status and the external host interface are different. Signed-off-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Chen-Yu Tsai 提交于
This fixes some leftover code style issues in the axp20x core. Signed-off-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Chen-Yu Tsai 提交于
The axp20x driver assumes the device is i2c based. This is not the case with later chips, which use a proprietary 2 wire serial bus by Allwinner called "Reduced Serial Bus". This patch follows the example of mfd/wm831x and splits it into an interface independent core, and an i2c specific glue layer. MFD_AXP20X and the new MFD_AXP20X_I2C are changed to tristate symbols, allowing the driver to be built as modules. Whitespace and other style errors in the moved i2c specific code have been fixed. Included but unused header files are removed as well. Signed-off-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Chen-Yu Tsai 提交于
Supply a backdated copyright notice. Signed-off-by: NChen-Yu Tsai <wens@csie.org> Acked-by: NCarlo Caione <carlo@caione.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Chen-Yu Tsai 提交于
In axp20x_match_device(), match the of_device_id table bound to the device driver instead of pointing to axp20x_of_match directly. This will allow us to keep axp20x_match_device() unmodified when we expand the axp20x driver into multiple ones covering different interface types. of_device_get_match_data() cannot be used here as we need to know if it failed to get a match, or if the match data value just happened to be 0, as it is for the AXP152. Signed-off-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Chen-Yu Tsai 提交于
The first argument passed to axp20x_match_device(), struct axp20x_dev *, already contains a pointer to the device. By rearranging some code, moving the assignment of the pointer before axp20x_match_device() is called, we can eliminate the second parameter. Suggested-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 31 10月, 2015 1 次提交
-
-
由 Borun Fu 提交于
This patch adds the mfd cell info for axp288 power key device. Signed-off-by: NBorun Fu <borun.fu@linux.intel.com> Signed-off-by: NFei Yang <fei.yang@intel.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 12 8月, 2015 2 次提交
-
-
由 Hans de Goede 提交于
Add a cell for the usb power_supply part of the axp20x PMICs. Note that this cell is only for the usb power_supply part and not the ac-power / battery-charger / rtc-backup-bat-charger bits. Depending on the board each of those must be enabled / disabled separately in devicetree as most boards do not use all 4. So in dt each one needs its own child-node of the axp20x node. Another reason for using separate child nodes for each is so that other devicetree nodes can have a power-supply property with a phandle referencing a node representing a single power-supply. The decision to use a separate devicetree node for each is reflected on the kernel side by each getting its own mfd-cell / platform_device and platform-driver. Note this commit also makes some whitespace changes to the intialization of existing cells in axp20x_cells, these are pure whitespace changes, functionally nothing changes. Signed-off-by: NBruno Prémont <bonbons@linux-vserver.org> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Bruno Prémont 提交于
Add an extra set of registers which is necessary tu support the PMICs battery charger function, and mark registers which contain status bits, gpio status, and adc readings as volatile. Signed-off-by: NBruno Prémont <bonbons@linux-vserver.org> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 11 8月, 2015 2 次提交
-
-
由 Michal Suchanek 提交于
The axp152 is a stripped down version of the axp202 pmic with the battery charging function removed as it is intended for top-set boxes. Signed-off-by: NMichal Suchanek <hramrach@gmail.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Krzysztof Kozlowski 提交于
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 13 5月, 2015 2 次提交
-
-
由 Chen-Yu Tsai 提交于
Now that the axp20x-regulators driver supports different variants of the AXP family, we can enable regulator support for AXP22X without the risk of incorrectly configuring regulators. Signed-off-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Boris BREZILLON 提交于
Add support for the AXP22x PMIC devices to the existing AXP20x driver. This includes the AXP221 and AXP223, which are identical except for the external data bus. Only AXP221 is added for now. AXP223 will be added after it's Reduced Serial Bus (RSB) interface is supported. AXP22x defines a new set of registers, power supplies and regulators, but most of the API is similar to the AXP20x ones. A new irq chip definition is used, even though the available interrupts on AXP22x is a subset of those on AXP20x. This is done so the interrupt numbers match those on the datasheet. This patch only enables the interrupts, system power-off function, and PEK sub-device. The regulator driver must first support different variants before we enable it from the mfd driver. Signed-off-by: NBoris BREZILLON <boris.brezillon@free-electrons.com> [wens@csie.org: fix interrupts and move regulators to separate patch] Signed-off-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 09 4月, 2015 1 次提交
-
-
由 Ramakrishna Pallala 提交于
This patch adds the mfd cell info for axp288 extcon device. Signed-off-by: NRamakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-