History log of /openbmc/linux/drivers/power/reset/ltc2952-poweroff.c (Results 26 – 50 of 51)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 0a5c6a22 14-Jan-2015 Frans Klaver <frans.klaver@xsens.com>

power: reset: ltc2952: prefer devm_kzalloc over kzalloc

Make use of the fact that the allocated resources can be automatically
deallocated. This reduces cleanup code and chance of leaks.

Signed-off

power: reset: ltc2952: prefer devm_kzalloc over kzalloc

Make use of the fact that the allocated resources can be automatically
deallocated. This reduces cleanup code and chance of leaks.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

show more ...


Revision tags: v3.19-rc4, v3.19-rc3, v3.19-rc2, v3.19-rc1, v3.18, v3.18-rc7, v3.18-rc6, v3.18-rc5, v3.18-rc4, v3.18-rc3, v3.18-rc2
# 5938ee2b 20-Oct-2014 Wolfram Sang <wsa@the-dreams.de>

power: reset: drop owner assignment from platform_drivers

A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>


Revision tags: v3.18-rc1, v3.17, v3.17-rc7, v3.17-rc6, v3.17-rc5, v3.17-rc4, v3.17-rc3, v3.17-rc2, v3.17-rc1
# 6647156c 08-Aug-2014 René Moll <Rene.Moll@xsens.com>

power: reset: add LTC2952 poweroff driver

This adds a driver for the LTC2952, an external power control chip,
which signals the OS to shut down. Additionally this driver lets the
kernel power down t

power: reset: add LTC2952 poweroff driver

This adds a driver for the LTC2952, an external power control chip,
which signals the OS to shut down. Additionally this driver lets the
kernel power down the board.

Signed-off-by: René Moll <rene.moll@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

show more ...


Revision tags: v5.10, v5.8.17, v5.8.16, v5.8.15, v5.9, v5.8.14, v5.8.13, v5.8.12, v5.8.11, v5.8.10, v5.8.9, v5.8.8, v5.8.7, v5.8.6, v5.4.62, v5.8.5, v5.8.4, v5.4.61, v5.8.3, v5.4.60, v5.8.2, v5.4.59, v5.8.1, v5.4.58, v5.4.57, v5.4.56, v5.8, v5.7.12, v5.4.55, v5.7.11, v5.4.54, v5.7.10, v5.4.53, v5.4.52, v5.7.9, v5.7.8, v5.4.51, v5.4.50, v5.7.7, v5.4.49, v5.7.6, v5.7.5, v5.4.48, v5.7.4, v5.7.3, v5.4.47, v5.4.46, v5.7.2, v5.4.45, v5.7.1, v5.4.44, v5.7, v5.4.43, v5.4.42, v5.4.41, v5.4.40
# 1072cead 09-May-2020 Hongbo Yao <yaohongbo@huawei.com>

power: reset: ltc2952: remove unused variable

Fix gcc '-Wunused-but-set-variable' warning:
drivers/power/reset/ltc2952-poweroff.c:97:16: warning: variable
‘overruns’ set but not used

power: reset: ltc2952: remove unused variable

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>

show more ...


Revision tags: v5.4.39, v5.4.38, v5.4.37, v5.4.36, v5.4.35, v5.4.34, v5.4.33, v5.4.32, v5.4.31, v5.4.30, v5.4.29, v5.6, v5.4.28, v5.4.27, v5.4.26, v5.4.25, v5.4.24, v5.4.23, v5.4.22, v5.4.21, v5.4.20, v5.4.19, v5.4.18, v5.4.17, v5.4.16, v5.5, v5.4.15, v5.4.14, v5.4.13, v5.4.12, v5.4.11, v5.4.10, v5.4.9, v5.4.8, v5.4.7, v5.4.6, v5.4.5, v5.4.4, v5.4.3, v5.3.15, v5.4.2, v5.4.1, v5.3.14, v5.4, v5.3.13, v5.3.12, v5.3.11, v5.3.10, v5.3.9, v5.3.8, v5.3.7, v5.3.6, v5.3.5, v5.3.4, v5.3.3, v5.3.2, v5.3.1, v5.3, v5.2.14, v5.3-rc8, v5.2.13, v5.2.12, v5.2.11, v5.2.10, v5.2.9, v5.2.8, v5.2.7, v5.2.6, v5.2.5, v5.2.4, v5.2.3, v5.2.2, v5.2.1, v5.2, v5.1.16, v5.1.15, v5.1.14, v5.1.13, v5.1.12, v5.1.11, v5.1.10, v5.1.9, v5.1.8, v5.1.7, v5.1.6
# c942fddf 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157

Based on 3 normalized pattern(s):

this program is free software you can redistribute it and or modify
it u

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157

Based on 3 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version [author] [kishon] [vijay] [abraham]
[i] [kishon]@[ti] [com] this program is distributed in the hope that
it will be useful but without any warranty without even the implied
warranty of merchantability or fitness for a particular purpose see
the gnu general public license for more details

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version [author] [graeme] [gregory]
[gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
[kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
[hk] [hemahk]@[ti] [com] this program is distributed in the hope
that it will be useful but without any warranty without even the
implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1105 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

show more ...


Revision tags: v5.1.5, v5.1.4, v5.1.3, v5.1.2, v5.1.1, v5.0.14, v5.1, v5.0.13, v5.0.12, v5.0.11, v5.0.10, v5.0.9, v5.0.8, v5.0.7, v5.0.6, v5.0.5, v5.0.4, v5.0.3, v4.19.29, v5.0.2, v4.19.28, v5.0.1, v4.19.27, v5.0, v4.19.26, v4.19.25, v4.19.24, v4.19.23, v4.19.22, v4.19.21, v4.19.20, v4.19.19, v4.19.18, v4.19.17, v4.19.16, v4.19.15, v4.19.14, v4.19.13, v4.19.12, v4.19.11, v4.19.10, v4.19.9, v4.19.8, v4.19.7, v4.19.6, v4.19.5, v4.19.4, v4.18.20, v4.19.3, v4.18.19, v4.19.2, v4.18.18, v4.18.17, v4.19.1, v4.19, v4.18.16, v4.18.15, v4.18.14, v4.18.13, v4.18.12, v4.18.11, v4.18.10, v4.18.9, v4.18.7, v4.18.6, v4.18.5
# 3723c632 23-Aug-2018 Arnd Bergmann <arnd@arndb.de>

treewide: convert ISO_8859-1 text comments to utf-8

Almost all files in the kernel are either plain text or UTF-8 encoded. A
couple however are ISO_8859-1, usually just a few characters

treewide: convert ISO_8859-1 text comments to utf-8

Almost all files in the kernel are either plain text or UTF-8 encoded. A
couple however are ISO_8859-1, usually just a few characters in a C
comments, for historic reasons.

This converts them all to UTF-8 for consistency.

Link: http://lkml.kernel.org/r/20180724111600.4158975-1-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Simon Horman <horms@verge.net.au> [IPVS portion]
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> [IIO]
Acked-by: Michael Ellerman <mpe@ellerman.id.au> [powerpc]
Acked-by: Rob Herring <robh@kernel.org>
Cc: Joe Perches <joe@perches.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

show more ...


Revision tags: v4.17.18, v4.18.4, v4.18.3, v4.17.17, v4.18.2, v4.17.16, v4.17.15, v4.18.1, v4.18, v4.17.14, v4.17.13, v4.17.12, v4.17.11, v4.17.10, v4.17.9, v4.17.8, v4.17.7, v4.17.6, v4.17.5, v4.17.4, v4.17.3
# ac316725 20-Jun-2018 Randy Dunlap <rdunlap@infradead.org>

headers: separate linux/mod_devicetable.h from linux/platform_device.h

At over 4000 #includes, <linux/platform_device.h> is the 9th most
#included header file in the Linux kernel. It do

headers: separate linux/mod_devicetable.h from linux/platform_device.h

At over 4000 #includes, <linux/platform_device.h> is the 9th most
#included header file in the Linux kernel. It does not need
<linux/mod_devicetable.h>, so drop that header and explicitly add
<linux/mod_devicetable.h> to source files that need it.

4146 #include <linux/platform_device.h>

After this patch, there are 225 files that use <linux/mod_devicetable.h>,
for a reduction of around 3900 times that <linux/mod_devicetable.h>
does not have to be read & parsed.

225 #include <linux/mod_devicetable.h>

This patch was build-tested on 20 different arch-es.

It also makes these drivers SubmitChecklist#1 compliant.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kbuild test robot <lkp@intel.com> # drivers/media/platform/vimc/
Reported-by: kbuild test robot <lkp@intel.com> # drivers/pinctrl/pinctrl-u300.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

show more ...


Revision tags: v4.17.2, v4.17.1, v4.17, v4.16, v4.15, v4.13.16, v4.14, v4.13.5, v4.13, v4.12, v4.10.17, v4.10.16, v4.10.15, v4.10.14, v4.10.13, v4.10.12, v4.10.11, v4.10.10, v4.10.9, v4.10.8, v4.10.7, v4.10.6, v4.10.5, v4.10.4, v4.10.3, v4.10.2, v4.10.1, v4.10
# 8b0e1953 25-Dec-2016 Thomas Gleixner <tglx@linutronix.de>

ktime: Cleanup ktime_set() usage

ktime_set(S,N) was required for the timespec storage type and is still
useful for situations where a Seconds and Nanoseconds part of a time value
nee

ktime: Cleanup ktime_set() usage

ktime_set(S,N) was required for the timespec storage type and is still
useful for situations where a Seconds and Nanoseconds part of a time value
needs to be converted. For anything where the Seconds argument is 0, this
is pointless and can be replaced with a simple assignment.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>

show more ...


# 36a1624d 23-Jun-2015 Linus Torvalds <torvalds@linux-foundation.org>

Merge tag 'for-4.2' of git://git.infradead.org/battery-2.6

Pull power supply and reset updates from Sebastian Reichel:

- new charger drivers: BQ24257, BQ25890, AXP288, RT9455

Merge tag 'for-4.2' of git://git.infradead.org/battery-2.6

Pull power supply and reset updates from Sebastian Reichel:

- new charger drivers: BQ24257, BQ25890, AXP288, RT9455

- MAX17042 battery: add health & temperature support

- BQ2415x charger: add ACPI support

- misc fixes and cleanups

* tag 'for-4.2' of git://git.infradead.org/battery-2.6: (32 commits)
power_supply: Correct kerneldoc copy paste errors
wm831x_power: Fix off-by-one at free_irq()
power_supply: rt9455_charger: Fix error reported by static analysis tool
power_supply: bq24257: use flags argument of devm_gpiod_get
power_supply: bq25890: use flags argument of devm_gpiod_get
sbs-battery: add option to always register battery
power: Add devm_power_supply_get_by_phandle() helper function
power_supply: max17042: Add OF support for setting thresholds
power_supply: sysfs: Bring back write to writeable properties
power_supply: rt9455_charger: Check if CONFIG_USB_PHY is enabled
power: reset: gpio-restart: increase priority slightly
power_supply: bq25890: make chip_id int
power_supply: Add support for Richtek RT9455 battery charger
Documentation: devicetree: Add Richtek RT9455 bindings
of: Add vendor prefix for Richtek Technology Corporation
power_supply: 88pm860x_charger: Do not call free_irq() twice
power: bq24190_charger: Change first_time flag reset condition
power: axp288_charger: axp288 charger driver
power: max17042_battery: add HEALTH and TEMP_* properties support
power_supply: Add support for TI BQ25890 charger chip
...

show more ...


Revision tags: v4.9, openbmc-4.4-20161121-1, v4.4.33, v4.4.32, v4.4.31, v4.4.30, v4.4.29, v4.4.28, v4.4.27, v4.7.10, openbmc-4.4-20161021-1, v4.7.9, v4.4.26, v4.7.8, v4.4.25, v4.4.24, v4.7.7, v4.8, v4.4.23, v4.7.6, v4.7.5, v4.4.22, v4.4.21, v4.7.4, v4.7.3, v4.4.20, v4.7.2, v4.4.19, openbmc-4.4-20160819-1, v4.7.1, v4.4.18, v4.4.17, openbmc-4.4-20160804-1, v4.4.16, v4.7, openbmc-4.4-20160722-1, openbmc-20160722-1, openbmc-20160713-1, v4.4.15, v4.6.4, v4.6.3, v4.4.14, v4.6.2, v4.4.13, openbmc-20160606-1, v4.6.1, v4.4.12, openbmc-20160521-1, v4.4.11, openbmc-20160518-1, v4.6, v4.4.10, openbmc-20160511-1, openbmc-20160505-1, v4.4.9, v4.4.8, v4.4.7, openbmc-20160329-2, openbmc-20160329-1, openbmc-20160321-1, v4.4.6, v4.5, v4.4.5, v4.4.4, v4.4.3, openbmc-20160222-1, v4.4.2, openbmc-20160212-1, openbmc-20160210-1, openbmc-20160202-2, openbmc-20160202-1, v4.4.1, openbmc-20160127-1, openbmc-20160120-1, v4.4, openbmc-20151217-1, openbmc-20151210-1, openbmc-20151202-1, openbmc-20151123-1, openbmc-20151118-1, openbmc-20151104-1, v4.3, openbmc-20151102-1, openbmc-20151028-1, v4.3-rc1, v4.2, v4.2-rc8, v4.2-rc7, v4.2-rc6, v4.2-rc5, v4.2-rc4, v4.2-rc3, v4.2-rc2, v4.2-rc1, v4.1, v4.1-rc8, v4.1-rc7, v4.1-rc6, v4.1-rc5
# 9f6cd98f 18-May-2015 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

power: reset: ltc2952: use _optional variant of devm_gpiod_get

devm_gpiod_get_optional returns NULL if devm_gpiod_get would return an
ENOENT error pointer.

There is no semantic

power: reset: ltc2952: use _optional variant of devm_gpiod_get

devm_gpiod_get_optional returns NULL if devm_gpiod_get would return an
ENOENT error pointer.

There is no semantic change intended.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

show more ...


Revision tags: v4.1-rc4, v4.1-rc3, v4.1-rc2, v4.1-rc1
# d8818257 14-Apr-2015 Thomas Gleixner <tglx@linutronix.de>

power: reset: ltc2952: Remove bogus hrtimer_start() return value checks

The return value of hrtimer_start() tells whether the timer was
inactive or active already when hrtimer_start() wa

power: reset: ltc2952: Remove bogus hrtimer_start() return value checks

The return value of hrtimer_start() tells whether the timer was
inactive or active already when hrtimer_start() was called.

The code emits a bogus warning if the timer was active already
claiming that the timer could not be started.

Remove it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Frans Klaver <frans.klaver@xsens.com>
Cc: "René Moll" <linux@r-moll.nl>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-pm@vger.kernel.org
Acked-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

show more ...


# 4101ecc2 13-Apr-2015 Thomas Gleixner <tglx@linutronix.de>

power: reset: ltc2952: Remove bogus hrtimer_start() return value checks

The return value of hrtimer_start() tells whether the timer was
inactive or active already when hrtimer_start() wa

power: reset: ltc2952: Remove bogus hrtimer_start() return value checks

The return value of hrtimer_start() tells whether the timer was
inactive or active already when hrtimer_start() was called.

The code emits a bogus warning if the timer was active already
claiming that the timer could not be started.

Remove it along with the bogus comment in the else path.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Frans Klaver <frans.klaver@xsens.com>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-pm@vger.kernel.org

show more ...


Revision tags: v4.0, v4.0-rc7, v4.0-rc6, v4.0-rc5, v4.0-rc4, v4.0-rc3, v4.0-rc2, v4.0-rc1, v3.19, v3.19-rc7, v3.19-rc6, v3.19-rc5
# ee181853 14-Jan-2015 Frans Klaver <frans.klaver@xsens.com>

power: reset: ltc2952: make trigger input optional

Currently the ltc2952 supports only one button sequence to initiate
powerdown. This is not always desirable, as even prolonged button

power: reset: ltc2952: make trigger input optional

Currently the ltc2952 supports only one button sequence to initiate
powerdown. This is not always desirable, as even prolonged button
presses can happen in use.

Allow ltc2952 users to pick their own power down sequence, by making the
trigger input optional. Since this still means that the ltc2952 may
power down the platform if the power button is pressed for about 5
seconds, we still need to make sure to start the watchdog toggle to
prolong the system power for as long as we need it.

This will still allow the system to control power using the kill signal.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

show more ...


# c1ada2ff 14-Jan-2015 Frans Klaver <frans.klaver@xsens.com>

power: reset: ltc2952: check trigger value before starting timer

In ltc2952_poweroff_handler it is theoretically possible that the timer
fails to start on first pass (button press), but

power: reset: ltc2952: check trigger value before starting timer

In ltc2952_poweroff_handler it is theoretically possible that the timer
fails to start on first pass (button press), but succeeds in starting on
the second (button release). This will cause the button press to be
misinterpreted, and will incorrectly shut down the system. Because a
picture says more than a thousand words:

Expected behavior:
tmr: ++++++++++
btn: -----__________-----

Faulty behavior:
tmr: +++++
btn: -----__________-----

Legend:
+ timer runs
_ button pressed
- button depressed

To prevent this from happening, check the value of the gpio before
starting the timer. If the button is active, we should start the timer,
else we should stop it.

The situation described can now still occur if the polarity of the input
pin is set incorrectly, but that at least is predictable behavior and
can be detected during the first tests.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

show more ...


# 2f6ea8ad 14-Jan-2015 Frans Klaver <frans.klaver@xsens.com>

power: reset: ltc2952: disable timers in _remove

Disable the timers when ltc2952_poweroff is removed. We don't want to
risk calling functions on data that no longer exist.

Signe

power: reset: ltc2952: disable timers in _remove

Disable the timers when ltc2952_poweroff is removed. We don't want to
risk calling functions on data that no longer exist.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

show more ...


# 5689b786 14-Jan-2015 Frans Klaver <frans.klaver@xsens.com>

power: reset: ltc2952: fix C++ style function pointers

The function pointers for the timers and pm_power_off are assigned with
C++ style
foo = &func;

Let's change it

power: reset: ltc2952: fix C++ style function pointers

The function pointers for the timers and pm_power_off are assigned with
C++ style
foo = &func;

Let's change it instead to the more C style
foo = func;

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

show more ...


# 5c3faad2 14-Jan-2015 Frans Klaver <frans.klaver@xsens.com>

power: reset: ltc2952: cleanup control flow in poweroff_handler

ltc2952_poweroff_handler uses gotos to return from the function. Since
we don't do cleanups exiting this function, just re

power: reset: ltc2952: cleanup control flow in poweroff_handler

ltc2952_poweroff_handler uses gotos to return from the function. Since
we don't do cleanups exiting this function, just return IRQ_HANDLED on
the spot and be done with it.

While at it, remove the variable 'ret'. It was never used very much.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

show more ...


# 0428c40d 14-Jan-2015 Frans Klaver <frans.klaver@xsens.com>

power: reset: ltc2952: drop empty suspend/resume functions

Documentation/SubmittingDrivers suggests these be implemented even when
they do nothing. On the other hand, the platform code c

power: reset: ltc2952: drop empty suspend/resume functions

Documentation/SubmittingDrivers suggests these be implemented even when
they do nothing. On the other hand, the platform code calls these
functions 'legacy'. Suspend and resume operations should go into a
pm_ops structure, pointed at by the driver's pm field. This approach
would lead to a lot of boiler plate, while achieving nothing. Drop the
functions instead.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

show more ...


# 818ca4c8 14-Jan-2015 Frans Klaver <frans.klaver@xsens.com>

power: reset: ltc2952: remove global variable poweroff_panic

As per Documentation/CodingStyle ch.4, we should keep global variables
to a mininum. Move the panic state into the driver dat

power: reset: ltc2952: remove global variable poweroff_panic

As per Documentation/CodingStyle ch.4, we should keep global variables
to a mininum. Move the panic state into the driver data, regardless of
whether panic is a system state or not.

This removes the need for the custom _init and _exit functions, so
replace them with a call to the module_platform_driver() macro.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

show more ...


# a5f67be5 14-Jan-2015 Frans Klaver <frans.klaver@xsens.com>

power: reset: ltc2952: reduce dependency on global variables

Documentation/CodingStyle ch.4 mentions in a side node that global
variables should only be used if you really need them. Red

power: reset: ltc2952: reduce dependency on global variables

Documentation/CodingStyle ch.4 mentions in a side node that global
variables should only be used if you really need them. Reduce the use of
the global instance of ltc2952_poweroff so we may eventually remove it
entirely.

While at it, rename ltc2952_poweroff_data to ltc2952_poweroff, just to
save that little bit of typing.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

show more ...


# 62113b31 14-Jan-2015 Frans Klaver <frans.klaver@xsens.com>

power: reset: ltc2952: prefer devm_gpiod_get over gpiod_get

This reduces cleanup code and chance of errors.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: S

power: reset: ltc2952: prefer devm_gpiod_get over gpiod_get

This reduces cleanup code and chance of errors.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

show more ...


# f66472df 14-Jan-2015 Frans Klaver <frans.klaver@xsens.com>

power: reset: ltc2952: unroll gpio_desc array

The three gpio's used by this driver are stored in an array of pointers.
This doesn't add much besides cleanups in a loop. In fact, it makes

power: reset: ltc2952: unroll gpio_desc array

The three gpio's used by this driver are stored in an array of pointers.
This doesn't add much besides cleanups in a loop. In fact, it makes most
of the usage sites harder to read. Unroll the loop, and live with the
fact that cleanups become slightly larger.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

show more ...


# 07d08237 14-Jan-2015 Frans Klaver <frans.klaver@xsens.com>

power: reset: ltc2952: prefer devm_request_irq over request_irq

Make use of the fact that we allocated resources can be automatically
deallocated. This reduces cleanup code and chance of

power: reset: ltc2952: prefer devm_request_irq over request_irq

Make use of the fact that we allocated resources can be automatically
deallocated. This reduces cleanup code and chance of errors. It also
removes the need for the virq member of the ltc2952_poweroff_data
struct.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

show more ...


# 0a5c6a22 14-Jan-2015 Frans Klaver <frans.klaver@xsens.com>

power: reset: ltc2952: prefer devm_kzalloc over kzalloc

Make use of the fact that the allocated resources can be automatically
deallocated. This reduces cleanup code and chance of leaks.

power: reset: ltc2952: prefer devm_kzalloc over kzalloc

Make use of the fact that the allocated resources can be automatically
deallocated. This reduces cleanup code and chance of leaks.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

show more ...


Revision tags: v3.19-rc4, v3.19-rc3, v3.19-rc2, v3.19-rc1, v3.18, v3.18-rc7, v3.18-rc6, v3.18-rc5, v3.18-rc4, v3.18-rc3, v3.18-rc2
# 5938ee2b 20-Oct-2014 Wolfram Sang <wsa@the-dreams.de>

power: reset: drop owner assignment from platform_drivers

A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <

power: reset: drop owner assignment from platform_drivers

A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

show more ...


123