summaryrefslogtreecommitdiff
path: root/drivers/power/reset
AgeCommit message (Collapse)Author
2021-11-16power: reset: ltc2952: Fix use of floating point literalsNathan Chancellor
A new commit in LLVM causes an error on the use of 'long double' when '-mno-x87' is used, which the kernel does through an alias, '-mno-80387' (see the LLVM commit below for more details around why it does this). drivers/power/reset/ltc2952-poweroff.c:162:28: error: expression requires 'long double' type support, but target 'x86_64-unknown-linux-gnu' does not support it data->wde_interval = 300L * 1E6L; ^ drivers/power/reset/ltc2952-poweroff.c:162:21: error: expression requires 'long double' type support, but target 'x86_64-unknown-linux-gnu' does not support it data->wde_interval = 300L * 1E6L; ^ drivers/power/reset/ltc2952-poweroff.c:163:41: error: expression requires 'long double' type support, but target 'x86_64-unknown-linux-gnu' does not support it data->trigger_delay = ktime_set(2, 500L*1E6L); ^ 3 errors generated. This happens due to the use of a 'long double' literal. The 'E6' part of '1E6L' causes the literal to be a 'double' then the 'L' suffix promotes it to 'long double'. There is no visible reason for floating point values in this driver, as the values are only assigned to integer types. Use NSEC_PER_MSEC, which is the same integer value as '1E6L', to avoid changing functionality but fix the error. Fixes: 6647156c00cc ("power: reset: add LTC2952 poweroff driver") Link: https://github.com/ClangBuiltLinux/linux/issues/1497 Link: https://github.com/llvm/llvm-project/commit/a8083d42b1c346e21623a1d36d1f0cadd7801d83 Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-10-02power: reset: at91-reset: check properly the return value of devm_of_iomapClaudiu Beznea
devm_of_iomap() returns error code or valid pointer. Check its return value with IS_ERR(). Fixes: bd3127733f2c ("power: reset: at91-reset: use devm_of_iomap") Reported-by: Cristian Birsan <cristian.birsan@microchip.com> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-09-24power: reset: ltc2952: Use hrtimer_forward_now()Thomas Gleixner
hrtimer_forward_now() provides the same functionality as the open coded hrtimer_forward() invocation. Prepares for removal of hrtimer_forward() from the public interfaces. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: linux-pm@vger.kernel.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-08-16power: reset: Add TPS65086 restart driverEmil Renner Berthing
The only way to reset the BeagleV Starlight v0.9 board[1] properly is to tell the PMIC to reset itself which will then assert the external reset lines of the SoC, USB hub and ethernet phy. This adds a driver to register a reset handler to do just that. [1] https://github.com/beagleboard/beaglev-starlight Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-08-13power: reset: linkstation-poweroff: add new devicePawel Dembicki
This commit introduces support for NETGEAR ReadyNAS Duo v2. This device use bit 4 of LED[2:0] Polarity Control Register to indicate AC Power loss. For more details about AC loss detection in NETGEAR ReadyNAS Duo v2, please look at the file: RND_5.3.13_WW.src/u-boot/board/mv_feroceon/mv_hal/usibootup/usibootup.c from Netgear GPL sources. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-08-13power: reset: linkstation-poweroff: prepare for new devicesPawel Dembicki
This commit prepare driver for another device support. New power_off_cfg structure describes two most important things: name of mdio bus and pointer to register setting function. It allow to add new device with different mdio bus node and other phy register config. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-07-07Merge tag 'for-v5.14' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "Battery/charger driver changes: - convert charger-manager binding to YAML - drop bd70528-charger driver - drop pm2301-charger driver - introduce rt5033-battery driver - misc improvements and fixes" * tag 'for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (42 commits) power: supply: ab8500: Fix an old bug power: supply: axp288_fuel_gauge: remove redundant continue statement power: supply: axp288_fuel_gauge: Make "T3 MRD" no_battery_list DMI entry more generic power: supply: axp288_fuel_gauge: Rename fuel_gauge_blacklist to no_battery_list power: supply: bq24190_charger: drop of_match_ptr() from device ID table drivers: power: add missing MODULE_DEVICE_TABLE in keystone-reset.c power: supply: ab8500: add missing MODULE_DEVICE_TABLE power: supply: charger-manager: add missing MODULE_DEVICE_TABLE power: reset: regulator-poweroff: add missing MODULE_DEVICE_TABLE power: supply: cpcap-charger: get the battery inserted infomation from cpcap-battery power: supply: cpcap-battery: invalidate config when incompatible measurements are read power: supply: axp20x_battery: allow disabling battery charging power: supply: max17040: drop unused platform data support power: supply: max17040: simplify POWER_SUPPLY_PROP_ONLINE power: supply: max17040: remove non-working POWER_SUPPLY_PROP_STATUS power: reset: at91-sama5d2_shdwc: Remove redundant error printing in at91_shdwc_probe() power: reset: gpio-poweroff: add missing MODULE_DEVICE_TABLE power: supply: rt5033_battery: Fix device tree enumeration dt-bindings: power: supply: Add DT schema for richtek,rt5033-battery power: supply: Drop BD70528 support ...
2021-07-01kernel.h: split out panic and oops helpersAndy Shevchenko
kernel.h is being used as a dump for all kinds of stuff for a long time. Here is the attempt to start cleaning it up by splitting out panic and oops helpers. There are several purposes of doing this: - dropping dependency in bug.h - dropping a loop by moving out panic_notifier.h - unload kernel.h from something which has its own domain At the same time convert users tree-wide to use new headers, although for the time being include new header back to kernel.h to avoid twisted indirected includes for existing users. [akpm@linux-foundation.org: thread_info.h needs limits.h] [andriy.shevchenko@linux.intel.com: ia64 fix] Link: https://lkml.kernel.org/r/20210520130557.55277-1-andriy.shevchenko@linux.intel.com Link: https://lkml.kernel.org/r/20210511074137.33666-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Co-developed-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Mike Rapoport <rppt@linux.ibm.com> Acked-by: Corey Minyard <cminyard@mvista.com> Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Kees Cook <keescook@chromium.org> Acked-by: Wei Liu <wei.liu@kernel.org> Acked-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Sebastian Reichel <sre@kernel.org> Acked-by: Luis Chamberlain <mcgrof@kernel.org> Acked-by: Stephen Boyd <sboyd@kernel.org> Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Acked-by: Helge Deller <deller@gmx.de> # parisc Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-06-30drivers: power: add missing MODULE_DEVICE_TABLE in keystone-reset.cYu Jiahua
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Signed-off-by: Yu Jiahua <yujiahua1@huawei.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-06-29power: reset: regulator-poweroff: add missing MODULE_DEVICE_TABLEZou Wei
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zou Wei <zou_wei@huawei.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-06-04power: reset: at91-sama5d2_shdwc: Remove redundant error printing in ↵Zhen Lei
at91_shdwc_probe() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-06-04power: reset: gpio-poweroff: add missing MODULE_DEVICE_TABLEBixuan Cui
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Bixuan Cui <cuibixuan@huawei.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-04-12power: reset: restart-poweroff: Add missing MODULE_DEVICE_TABLEBixuan Cui
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Bixuan Cui <cuibixuan@huawei.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-04-09power: reset: hisi-reboot: add missing MODULE_DEVICE_TABLEChen Lifu
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Chen Lifu <chenlifu@huawei.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-04-05power: reset: ltc2952: make trigger delay configurableMarek Czerski
Make trigger delay configurable through device tree with trigger-delay-ms property. Trigger delay is the time to wait before starting shutdown sequence after trigger line assertion. Trigger delay must take into account the OFFT time configured with the capacitor connected to OFFT pin of the LTC2952 chip. Basically, the higher the capacitance connected to OFFT pin, the larger trigger delay must be. Signed-off-by: Marek Czerski <ma.czerski@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-04-02power: reset: hisi-reboot: use the correct HiSilicon copyrightHao Fang
s/Hisilicon/HiSilicon/g. It should use capital S, according to https://www.hisilicon.com/en/terms-of-use. Signed-off-by: Hao Fang <fanghao11@huawei.com> Acked-by: Haojian Zhuang <haojian.zhuang@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-04-02power: reset: at91-reset: use devm_of_iomapClaudiu Beznea
Use devm_of_iomap() to map resources. This will avoid the necessity to track the mapped resources and free them on failure path or on remove. Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Suggested-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-03-23power: reset: replace curly brackets in MakefileDaniel Golle
Normal parentheses should be used when referring to config variables in Makefile. Replace the accidentally introduced curly brackets by regular parentheses. Fixes: a7f79f99541ef ("power: reset: add driver for LinkStation power off") Acked-by: Daniel González Cabanelas <dgcbueu@gmail.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-03-22power: reset: remove unneeded semicolondongjian
Fixes coccicheck warning: drivers/power/reset/vexpress-poweroff.c:136:2-3: Unneeded semicolon Signed-off-by: dongjian <dongjian@yulong.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-01-25power/reset: remove zte zx driverArnd Bergmann
The zte zx platform is getting removed, so this driver is no longer needed. Cc: Jun Nie <jun.nie@linaro.org> Cc: Shawn Guo <shawnguo@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-01-16power: reset: at91-sama5d2_shdwc: add support for sama7g5Claudiu Beznea
Add support for SAMA7G5 by adding proper struct reg_config structure and since SAMA7G5 is not currently on LPDDR setups the commit also avoid the mapping of DDR controller. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-01-16power: reset: at91-sama5d2_shdwc: fix wkupdbc maskClaudiu Beznea
According to datasheet WKUPDBC mask is b/w bits 26..24. Fixes: f80cb48843987 ("power: reset: at91-shdwc: add new shutdown controller driver") Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-01-13power: reset: Add poweroff driver for ATC260x PMICsCristian Ciocaltea
This driver provides poweroff and reboot support for a system through the ATC2603C and ATC2609A chip variants of the Actions Semi ATC260x family of PMICs. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-12-29power: reset: linkstation-poweroff: add missing put_device()Daniel González Cabanelas
The of_mdio_find_bus() takes a reference to the underlying device structure, we should release that reference using a put_device() call. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2020-12-13power: reset: new driver regulator-poweroffMichael Klein
This driver registers a pm_power_off function to turn off the board by force-disabling a devicetree-defined regulator. Signed-off-by: Michael Klein <michael@fossekall.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-11-30power: reset: Use printk format symbol resolverHelge Deller
Instead of looking up a symbol name by hand, use the %ps printk format specifier. Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-11-29power: reset: ocelot: Add support 2 other MIPS based SoCsGregory CLEMENT
This adds reset support for Luton and Jaguar2 in the ocelot-reset driver. They are both MIPS based belonging to the Vcore III family. Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-10-15power: reset: POWER_RESET_OCELOT_RESET should depend on Ocelot or Sparx5Geert Uytterhoeven
To add support for Sparx5, the dependency on MSCC_OCELOT was removed. However, this increases exposure of the driver question not only to Sparx5 platforms, but to everyone. Hence re-add the dependency on MSCC_OCELOT, and extend it with ARCH_SPARX5, to prevent asking the user about this driver when configuring a kernel without Ocelot and Sparx5 support. Fixes: ec871696b7776767 ("power: reset: ocelot: Add support for Sparx5") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-10-08power: reset: ocelot: Add support for Sparx5Lars Povlsen
This adds reset support for Sparx5 in the ocelot-reset driver. Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-07-28power: reset: add driver for LinkStation power offDaniel González Cabanelas
Some Buffalo LinkStations perform the power off operation, at restart time, depending on the state of an output pin (LED2/INTn) at the ethernet PHY. This pin is also used to wake the machine when a WoL packet is received by the PHY. The driver is required by the Buffalo LinkStation LS421DE (ARM MVEBU), and other models. Without it, the board remains forever halted if a power off command is executed, unless the PSU is disconnected and connected again. Add the driver to provide the power off function and also make the WoL feature to be available. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-07-26power: reset: keystone-reset: Replace HTTP links with HTTPS onesAlexander A. Klimov
Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-06-10Merge tag 'for-v5.8' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "This time there are lots of changes. Quite a few changes to the core, lots of driver changes and one change to kobject core (with Ack from Greg). Summary: kobject: - Increase number of allowed uevent variables power-supply core: - Add power-supply type in uevent - Cleanup property handling in core - Make property and usb_type pointers const - Convert core power-supply DT binding to YAML - Cleanup HWMON code - Add new health status "calibration required" - Add new properties for manufacture date and capacity error margin battery drivers: - new cw2015 battery driver used by pine64 Pinebook Pro laptop - axp22: blacklist on Meegopad T02 - sc27xx: support current/voltage reading - max17042: support time-to-empty reading - simple-battery: add more battery parameters - bq27xxx: convert DT binding document to YAML - sbs-battery: add TI BQ20Z65 support, fix technology property, convert DT binding to YAML, add option to disable charger broadcasts, add new properties: manufacture date, capacity error margin, average current, charge current and voltage and support calibration required health status - misc fixes charger drivers: - bq25890: cleanup, implement charge type, precharge current and input current limiting properties - bd70528: use new linear range helper library - bd99954: new charger driver - mp2629: new charger driver - misc fixes reboot drivers: - oxnas-restart: introduce new driver - syscon-reboot: convert DT binding to YAML, add parent syscon device support - misc fixes" * tag 'for-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (85 commits) power: supply: cw2015: Attach OF ID table to the driver power: reset: gpio-poweroff: add missing '\n' in dev_err() Revert "power: supply: sbs-battery: simplify read_read_string_data" Revert "power: supply: sbs-battery: add PEC support" dt-bindings: power: sbs-battery: Convert to yaml power: supply: sbs-battery: constify power-supply property array power: supply: sbs-battery: switch to i2c's probe_new power: supply: sbs-battery: switch from of_property_* to device_property_* power: supply: sbs-battery: add ability to disable charger broadcasts power: supply: sbs-battery: fix idle battery status power: supply: sbs-battery: add POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED support power: supply: sbs-battery: add MANUFACTURE_DATE support power: supply: sbs-battery: add POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT/VOLTAGE_MAX support power: supply: sbs-battery: Improve POWER_SUPPLY_PROP_TECHNOLOGY support power: supply: sbs-battery: add POWER_SUPPLY_PROP_CURRENT_AVG support power: supply: sbs-battery: add PEC support power: supply: sbs-battery: simplify read_read_string_data power: supply: sbs-battery: add POWER_SUPPLY_PROP_CAPACITY_ERROR_MARGIN support power: supply: sbs-battery: Add TI BQ20Z65 support power: supply: core: add POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED ...
2020-06-06power: reset: gpio-poweroff: add missing '\n' in dev_err()Luca Ceresoli
dev_err() needs a terminating newline. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-06-04Merge tag 'arm-soc-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/socLinus Torvalds
Pull ARM SoC updates from Arnd Bergmann: "One new platform gets added, the Realtek RTD1195, which is an older Cortex-a7 based relative of the RTD12xx chips that are already supported in arch/arm64. The platform may also be extended to support running 32-bit kernels on those 64-bit chips for memory-constrained machines. In the Renesas shmobile platform, we gain support for "RZ/G1H" or R8A7742, an eight-core chip based on Cortex-A15 and Cortex-A7 cores, originally released in 2016 as one of the last high-end 32-bit designs. There is ongoing cleanup for the integrator, tegra, imx, and omap2 platforms, with integrator getting very close to the goal of having zero code in arch/arm/, and omap2 moving more of the chip specifics from old board code into device tree files. The Versatile Express platform is made more modular, with built-in drivers now becoming loadable modules. This is part of a greater effort for the Android OS to have a common kernel binary for all platforms and any platform specific code in loadable modules. The PXA platform drops support for Compulab's pxa2xx boards that had rather unusual flash and PCI drivers but no known users remaining. All device drivers specific to those boards can now get removed as well. Across platforms, there is ongoing cleanup, with Geert and Rob revisiting some a lot of Kconfig options" * tag 'arm-soc-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (94 commits) ARM: omap2: fix omap5_realtime_timer_init definition ARM: zynq: Don't select CONFIG_ICST ARM: OMAP2+: Fix regression for using local timer on non-SMP SoCs clk: versatile: Fix kconfig dependency on COMMON_CLK_VERSATILE ARM: davinci: fix build failure without I2C power: reset: vexpress: fix build issue power: vexpress: cleanup: use builtin_platform_driver power: vexpress: add suppress_bind_attrs to true Revert "ARM: vexpress: Don't select VEXPRESS_CONFIG" MAINTAINERS: pxa: remove Compulab arm/pxa support ARM: pxa: remove Compulab pxa2xx boards bus: arm-integrator-lm: Fix return value check in integrator_ap_lm_probe() soc: imx: move cpu code to drivers/soc/imx ARM: imx: move cpu definitions into a header ARM: imx: use device_initcall for imx_soc_device_init ARM: imx: pcm037: make pcm970_sja1000_platform_data static bus: ti-sysc: Timers no longer need legacy quirk handling ARM: OMAP2+: Drop old timer code for dmtimer and 32k counter ARM: dts: Configure system timers for omap2 ARM: dts: Configure system timers for ti81xx ...
2020-05-28power: reset: vexpress: fix build issueAnders Roxell
An allmodconfig kernel makes CONFIG_VEXPRESS_CONFIG a module and CONFIG_POWER_RESET_VEXPRESS builtin. That makes us see this build error: aarch64-linux-gnu-ld: drivers/power/reset/vexpress-poweroff.o: in function `vexpress_reset_probe': ../drivers/power/reset/vexpress-poweroff.c:119: undefined reference to `devm_regmap_init_vexpress_config' ../drivers/power/reset/vexpress-poweroff.c:119:(.text+0x48c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `devm_regmap_init_vexpress_config' make[1]: *** [/srv/src/kernel/next/Makefile:1126: vmlinux] Error 1 Rework so that POWER_RESET_VEXPRESS depends on 'VEXPRESS_CONFIG=y'. Link: https://lore.kernel.org/r/20200527112608.3886105-5-anders.roxell@linaro.org Fixes: d06cfe3f123c ("bus: vexpress-config: Merge vexpress-syscfg into vexpress-config") Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-28power: vexpress: cleanup: use builtin_platform_driverAnders Roxell
Use the helper macro for builtin drivers taht don't do anything special in driver init. This removes some boilerplate code. Link: https://lore.kernel.org/r/20200527112608.3886105-3-anders.roxell@linaro.org Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-28power: vexpress: add suppress_bind_attrs to trueAnders Roxell
Make sure that the POWER_RESET_VEXPRESS driver won't have bind/unbind attributes available via the sysfs, so lets be explicit here and use ".suppress_bind_attrs = true" to prevent userspace from doing something silly. Link: https://lore.kernel.org/r/20200527112608.3886105-2-anders.roxell@linaro.org Cc: stable@vger.kernel.org Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-28power: reset: syscon-reboot: Add parental syscon supportSerge Semin
Since normally syscon-reboot block is supposed to be a part of a system controller, lets look for the syscon regmap in a parental DT node if regmap property isn't specified. DT binding from now considers the regmap property as deprecated. Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-05-21rtc: mt6397: Add support for the MediaTek MT6358 RTCRan Bi
This add support for the MediaTek MT6358 RTC. Driver using compatible data to store different RTC_WRTGR address offset. This replace RTC_WRTGR to RTC_WRTGR_MT6323 in mt6323-poweroff driver which only needed by armv7 CPU without ATF. Signed-off-by: Ran Bi <ran.bi@mediatek.com> Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Sebastian Reichel <sre@kernel.org> Reviewed-by: Yingjoe Chen <yingjoe.chen@mediatek.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2020-05-10power: reset: ltc2952: remove unused variableHongbo Yao
Fix gcc '-Wunused-but-set-variable' warning: drivers/power/reset/ltc2952-poweroff.c:97:16: warning: variable ‘overruns’ set but not used [-Wunused-but-set-variable] unsigned long overruns; Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Hongbo Yao <yaohongbo@huawei.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-04-30power: reset: introduce oxnas-restartDaniel Golle
Add reboot handler for Oxford OX820 chips as reboot currenly hangs on those boards. Code is based on ox820_assert_system_reset() found in https://github.com/kref/linux-oxnas.git in arch/arm/mach-oxnas/mach-ox820.c line 181. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-04-28power: reset: qcom-pon: reg write mask depends on pon generationKejia Hu
Instead of hardcode the mask, it should be depends on which generation of pon it was. Signed-off-by: Kejia Hu <kejia.hu@codethink.co.uk> Fixes: fce5430f6a86 ("reset: qcom-pon: Add support for gen2 pon") Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-04-05Merge tag 'for-v5.7' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset changes from Sebastian Reichel: "Core: - Nothing Drivers: - at91-reset: cleanups, proper handling for sam9x60 - sc27xx, charger-manager: allow building as module - sc27xx: add support to read current charge capacity - axp288: more quirks for weird hardware - misc fixes" * tag 'for-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (26 commits) power: reset: sc27xx: Allow the SC27XX poweroff driver building into a module power: reset: sc27xx: Change to use cpu_down() power: reset: sc27xx: Power off the external subsystems' connection power: twl4030: Use scnprintf() for avoiding potential buffer overflow power: supply: bq27xxx_battery: Silence deferred-probe error power: reset: at91-reset: handle nrst async for sam9x60 power: reset: at91-reset: get rid of at91_reset_data power: reset: at91-reset: keep only one reset function power: reset: at91-reset: make at91sam9g45_restart() generic power: reset: at91-reset: introduce ramc_lpr to struct at91_reset power: reset: at91-reset: use r4 as tmp argument power: reset: at91-reset: introduce args member in at91_reset_data power: reset: at91-reset: introduce struct at91_reset_data power: reset: at91-reset: devm_kzalloc() for at91_reset data structure power: reset: at91-reset: pass rstc base address to at91_reset_status() power: reset: at91-reset: convert reset in pointer to struct at91_reset power: reset: at91-reset: add notifier block to struct at91_reset power: reset: at91-reset: add sclk to struct at91_reset power: reset: at91-reset: add ramc_base[] to struct at91_reset power: reset: at91-reset: introduce struct at91_reset ...
2020-03-11power: reset: sc27xx: Allow the SC27XX poweroff driver building into a moduleBaolin Wang
Change the config to 'tristate' and use module_platform_driver() to allow the SC27XX poweroff driver building into a module, as well as adding some mudule information. Signed-off-by: Baolin Wang <baolin.wang7@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-03-11power: reset: sc27xx: Change to use cpu_down()Baolin Wang
To allow the SC27XX driver can be built as a module, and the freeze_secondary_cpus() symbol is not exported, thus we can change to use the exported cpu_down() API to shut down other cpus to avoid racing, which is same as the freeze_secondary_cpus(). Signed-off-by: Baolin Wang <baolin.wang7@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-03-11power: reset: sc27xx: Power off the external subsystems' connectionSherry Zong
When powering off the whole system, we should power off some external subsystems' connection firstly, otherwise some external subsystems will hold some power and result in powering down abnormally. Signed-off-by: Sherry Zong <sherry.zong@unisoc.com> Signed-off-by: Baolin Wang <baolin.wang7@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-03-08power: reset: at91-reset: handle nrst async for sam9x60Claudiu.Beznea@microchip.com
Handle NRST asynchronously for SAM9X60 to avoid problem with fast drop of VDDCORE on shutdown operations in the first 100 us after CPU is shutdown. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-03-08power: reset: at91-reset: get rid of at91_reset_dataClaudiu.Beznea@microchip.com
After refactoring struct at91_reset_data and struct at91_reset_data at91sam9260_reset_data are not needed anymore. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-03-08power: reset: at91-reset: keep only one reset functionClaudiu.Beznea@microchip.com
Keep only one reset function. With this, notifier_call member of struct at91_reset_data could be removed. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-03-08power: reset: at91-reset: make at91sam9g45_restart() genericClaudiu.Beznea@microchip.com
Make at91sam9g45_restart() generic. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>