History log of /linux-master/arch/arm/mach-pxa/spitz_pm.c
Revision Date Author Comments
# 09eadda2 19-Mar-2023 Arnd Bergmann <arnd@arndb.de>

backlight: corgi_lcd: fix missing prototype

The corgi_lcd_limit_intensity() function is called from platform
and defined in a driver, but the driver does not see the declaration:

drivers/video/backlight/corgi_lcd.c:434:6: error: no previous prototype for 'corgi_lcd_limit_intensity' [-Werror=missing-prototypes]
434 | void corgi_lcd_limit_intensity(int limit)

Move the prototype into a header that can be included from both
sides to shut up the warning.

Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# a9ae9c52 16-May-2023 Arnd Bergmann <arnd@arndb.de>

ARM: pxa: fix missing-prototypes warnings

The PXA platform has a number of configurations that end up with
a warning like these when building with W=1:

drivers/hwmon/max1111.c:83:5: error: no previous prototype for 'max1111_read_channel' [-Werror=missing-prototypes]
arch/arm/mach-pxa/reset.c:86:6: error: no previous prototype for 'pxa_restart' [-Werror=missing-prototypes]
arch/arm/mach-pxa/mfp-pxa2xx.c:254:5: error: no previous prototype for 'keypad_set_wake' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa25x.c:70:14: error: no previous prototype for 'pxa25x_get_clk_frequency_khz' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa25x.c:325:12: error: no previous prototype for 'pxa25x_clocks_init' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa27x.c:74:14: error: no previous prototype for 'pxa27x_get_clk_frequency_khz' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa27x.c:102:6: error: no previous prototype for 'pxa27x_is_ppll_disabled' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa27x.c:470:12: error: no previous prototype for 'pxa27x_clocks_init' [-Werror=missing-prototypes]
arch/arm/mach-pxa/pxa27x.c:44:6: error: no previous prototype for 'pxa27x_clear_otgph' [-Werror=missing-prototypes]
arch/arm/mach-pxa/pxa27x.c:58:6: error: no previous prototype for 'pxa27x_configure_ac97reset' [-Werror=missing-prototypes]
arch/arm/mach-pxa/spitz_pm.c:170:15: error: no previous prototype for 'spitzpm_read_devdata' [-Werror=missing-prototypes]

The problem is that there is a declaration for each of these, but
it's only seen by the caller and not the callee. Moving these
into appropriate header files ensures that both use the same
calling conventions and it avoids the warnings.

Acked-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20230516153109.514251-11-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# 726d8c96 11-Sep-2019 Arnd Bergmann <arnd@arndb.de>

ARM: pxa: spitz: use gpio descriptors for audio

The audio driver should not use a hardwired gpio number
from the header. Change it to use a lookup table.

Acked-by: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# 08d3df8c 01-Sep-2019 Arnd Bergmann <arnd@arndb.de>

ARM: pxa: split up mach/hardware.h

The mach/hardware.h is included in lots of places, and it provides
three different things on pxa:

- the cpu_is_pxa* macros
- an indirect inclusion of mach/addr-map.h
- the __REG() and io_pv2() helper macros

Split it up into separate <linux/soc/pxa/cpu.h> and mach/pxa-regs.h
headers, then change all the files that use mach/hardware.h to
include the exact set of those three headers that they actually
need, allowing for further more targeted cleanup.

linux/soc/pxa/cpu.h can remain permanently exported and is now in
a global location along with similar headers. pxa-regs.h and
addr-map.h are only used in a very small number of drivers now
and can be moved to arch/arm/mach-pxa/ directly when those drivers
are to pass the necessary data as resources.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Acked-by: Mark Brown <broonie@kernel.org>
Cc: linux-clk@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: linux-input@vger.kernel.org
Cc: linux-leds@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Cc: linux-mtd@lists.infradead.org
Cc: linux-rtc@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
Cc: linux-watchdog@vger.kernel.org
Cc: alsa-devel@alsa-project.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# d2912cb1 04-Jun-2019 Thomas Gleixner <tglx@linutronix.de>

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

Based on 2 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 version 2 as
published by the free software foundation

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

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

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Enrico Weigelt <info@metux.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ca26475b 01-Aug-2016 Robert Jarzmik <robert.jarzmik@free.fr>

ARM: pxa: fix GPIO double shifts

The commit 9bf448c66d4b ("ARM: pxa: use generic gpio operation instead of
gpio register") from Oct 17, 2011, leads to the following static checker
warning:
arch/arm/mach-pxa/spitz_pm.c:172 spitz_charger_wakeup()
warn: double left shift '!gpio_get_value(SPITZ_GPIO_KEY_INT)
<< (1 << ((SPITZ_GPIO_KEY_INT) & 31))'

As Dan reported, the value is shifted three times :
- once by gpio_get_value(), which returns either 0 or BIT(gpio)
- once by the shift operation '<<'
- a last time by GPIO_bit(gpio) which is BIT(gpio)

Therefore the calculation lead to a chained or operator of :
- (1 << gpio) << (1 << gpio) = (2^gpio)^gpio = 2 ^ (gpio * gpio)

It is be sheer luck the former statement works, only because each gpio
used is strictly smaller than 6, and therefore 2^(gpio^2) never
overflows a 32 bits value, and because it is used as a boolean value to
check a gpio activation.

As the xxx_charger_wakeup() functions are used as a true/false detection
mechanism, take that opportunity to change their prototypes from integer
return value to boolean one.

Fixes: 9bf448c66d4b ("ARM: pxa: use generic gpio operation instead of
gpio register")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>


# 4c25c5d2 30-Jan-2015 Arnd Bergmann <arnd@arndb.de>

ARM: pxa: make more mach/*.h files local

Lots of header files are never included outside of a mach-pxa
directory and do not need to be made visible in include/mach,
so let's just move them all down one level.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# 351a102d 21-Dec-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ARM: drivers: remove __dev* attributes.

CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, __devinitdata,
and __devexit from these drivers.

Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 510fcb0d 25-Oct-2012 Marko Katic <dromede@gmail.com>

ARM: pxa/spitz_pm: Fix hang when resuming from STR

Devices that use spitz_pm.c will fail to resume
from STR (Suspend To Ram) when the charger plug is inserted
or removed when a device is in STR mode. The culprit is
a misconfigured gpio line - GPIO18. GPIO18 should be configured as a
regular GPIO input but it gets configured as an alternate function
GPIO18_RDY. And then later in postsuspend() it gets configured as
a regular GPIO18 input line.

Fix this by removing the GPIO18_RDY configuration so that GPIO18
only gets configured as a regular gpio input.

Signed-off-by: Marko Katic <dromede@gmail.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>


# bc329ad7 06-Feb-2012 Haojian Zhuang <haojian.zhuang@marvell.com>

ARM: pxa: fix wrong parsing gpio event on spitz

(~GPLR0 & GPIO_bit(SPITZ_GPIO_KEY_INT)) | (GPLR0 &
GPIO_bit(SPITZ_GPIO_SYNC));

After using gpio_get_value, the statement should be in below.
((!gpio_get_value(SPITZ_GPIO_KEY_INT)
<< GPIO_bit(SPITZ_GPIO_KEY_INT))
| gpio_get_value(SPITZ_GPIO_SYNC));

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>


# e0bf102e 08-Dec-2011 Haojian Zhuang <haojian.zhuang@marvell.com>

ARM: pxa: fix build error for GPIO_bit()

arch/arm/mach-pxa/spitz_pm.c: In function ‘spitz_presuspend’:
arch/arm/mach-pxa/spitz_pm.c:112:2: error: implicit declaration of
function ‘GPIO_bit’
make[1]: *** [arch/arm/mach-pxa/spitz_pm.o] Error 1

GPIO_bit() is moved into <linux/gpio-pxa.h>.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# 9bf448c6 16-Oct-2011 Haojian Zhuang <haojian.zhuang@marvell.com>

ARM: pxa: use generic gpio operation instead of gpio register

Remove the code of accessing gpio register. Use the generic read
operation instead.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>


# 158f1e95 14-Jun-2011 Randy Dunlap <randy.dunlap@oracle.com>

gpio: include linux/gpio.h where needed

Some files use GPIOF_ macros but don't include the header file
for them. These macros are being moved to <linux/gpio.h>, so add
includes for <linux/gpio.h> where needed.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>


# 04e4ad23 04-Jul-2010 Eric Miao <eric.y.miao@gmail.com>

[ARM] pxa: removed mostly unused and confusing two sharpsl.h

Only a small part of used code is moved into sharpsl_pm.h.

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>


# 05732d7e 04-Jul-2010 Eric Miao <eric.y.miao@gmail.com>

[ARM] pxa: use generic gpio_get_value() instead of READ_GPIO_BIT()

READ_GPIO_BIT() is no way generic by accessing GPIO registers directly,
replace it with gpio_get_value().

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>


# 13a54247 04-Jul-2010 Christoph Egger <siccegge@cs.fau.de>

[ARM] pxa: removing dead BACKLIGHT_CORGI

BACKLIGHT_CORGI was later renamed to BACKLIGHT_GENERIC and has not been
used since then. As it's now safe to completely transition to LCD_CORGI
driver, which incorprates both the LCD and backlight device.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>


# b6eede11 11-Jan-2010 Eric Miao <eric.y.miao@gmail.com>

[ARM] pxa/spitz: use generic GPIO API and remove pxa_gpio_mode()

REVISIT: change to GPIO18 is ugly, need to make sure whether that's
really necessary - GPIO18_RDY as an VLIO input signal - we don't
normally need to do such kind of trick during low power mode.

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>


# 0ba01ebc 22-Oct-2009 Pavel Machek <pavel@ucw.cz>

[ARM] pxa/zaurus: rename spitz_battery_levels_* to sharpsl_*

Battery power levels are shared between spitz and corgi, rename
variable to reflect it.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>


# b64b0b76 22-Oct-2009 Pavel Machek <pavel@ucw.cz>

[ARM] pxa/zaurus: cleanup sharpsl_pm.c

This fixes checkpatch/style problems in sharpsl_pm.c, allowing me to
submit real fixes next.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>


# d48898a3 28-Mar-2009 Dmitry Baryshkov <dbaryshkov@gmail.com>

[ARM] pxa/sharpsl_pm: merge pxa-specific code into generic one

As pxa now is the only user of sharpsl_pm we can drop several startup
functions into generic code thus dropping several global functions.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>


# 5bf3df3f 19-Jan-2009 Eric Miao <eric.miao@marvell.com>

[ARM] pxa: separate definitions from pxa-regs.h and remove it finally

The remaining registers are separated into:

- <mach/regs-ost.h>
- <mach/regs-rtc.h>
- <mach/regs-intc.h>

and then we can remove pxa-regs.h completely. Instead of #include this
file, let's:

1. include the specific <mach/regs-*.h> with care (if that's absolutely
necessary)

2. define the registers in the driver, make cleanly defined API to expose
the register access to external with sufficient reason

Signed-off-by: Eric Miao <eric.miao@marvell.com>


# 5cbff960 28-Oct-2008 Dmitry Baryshkov <dbaryshkov@gmail.com>

[ARM] corgi_lcd: fix simultaneous compilation with corgi_bl

corgi_lcd has symbol conflict with corgi_bl driver.
Fix it by renaming common symbol in new corgi_lcd driver.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>


# fff14720 05-Sep-2008 Eric Miao <eric.miao@marvell.com>

[ARM] pxa/spitz: use generic GPIO API for SCOOP1/SCOOP2 GPIOs

Original patch from Dmitry Baryshkov's inital scoop gpio conversion
work at http://git.infradead.org/users/dbaryshkov/zaurus-2.6.git.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# a09e64fb 05-Aug-2008 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach

This just leaves include/asm-arm/plat-* to deal with.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# be509729 04-Aug-2008 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] Remove asm/hardware.h, use asm/arch/hardware.h instead

Remove includes of asm/hardware.h in addition to asm/arch/hardware.h.
Then, since asm/hardware.h only exists to include asm/arch/hardware.h,
update everything to directly include asm/arch/hardware.h and remove
asm/hardware.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 5806d8ab 31-May-2008 Dmitry Baryshkov <dbaryshkov@gmail.com>

[ARM] 5073/1: spitz_pm: don't register devices on non-spitz machines

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 02a8e769 20-Apr-2008 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] pxa: corgibl_limit_intensity build errors

If CONFIG_BACKLIGHT_CORGI is not selected, then corgibl_limit_intensity()
is not present. However, both corgi_pm.c and sharp_pm.c reference this
symbol, resulting in a link error.

Wrap the references with the relevant ifdefs, and avoid the resulting
NULL pointer dereference by making the code in sharpsl_pm.c also
conditional on the config symbol.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# dc38e2ad 08-May-2008 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] pxa: Fix RCSR handling

Related to d3930614e68bdf83a120d904c039a64e9f75dba1.

RCSR is only present on PXA2xx CPUs, not on PXA3xx CPUs. Therefore,
we should not be unconditionally writing to RCSR from generic code.

Since we now clear the RCSR status from the SoC specific PXA PM code
and before reset in the arch_reset() function, the duplication in
the corgi, poodle, spitz and tosa code can be removed.

Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# a683b14d 02-Mar-2008 eric miao <eric.miao@marvell.com>

[ARM] pxa: separate GPIOs and their mode definitions to pxa2xx-gpio.h

two reasons:
1. GPIO namings and their mode definitions are conceptually not part
of the PXA register definitions

2. this is actually a temporary move in the transition of PXA2xx to
use MFP-alike APIs (as what PXA3xx is now doing), so that legacy
code will still work and new code can be added in step by step

Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 14fca61a 26-Feb-2007 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] Yet more asm/apm-emulation.h stuff

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 75e7153a 09-Feb-2007 Ralf Baechle <ralf@linux-mips.org>

[APM] ARM: Convert to use shared APM emulation.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# f8703dc8 19-Jun-2006 Richard Purdie <rpurdie@rpsys.net>

[ARM] 3564/1: sharpsl_pm: Abstract some machine specific parameters

Patch from Richard Purdie

Abstract some machine specific parameters from the sharpsl_pm core
into the machine specific drivers. This allows the core to support
tosa/poodle.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 2c041f4b 07-Jan-2006 Richard Purdie <rpurdie@rpsys.net>

[ARM] 3235/1: SharpSL PM: Fix a gcc4 build error

Patch from Richard Purdie

Fix a gcc4 build error (incomplete element type) in the pxa SharpSL
PM code.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# b7557de4 05-Jan-2006 Richard Purdie <rpurdie@rpsys.net>

[ARM] 3228/1: SharpSL: Move PM code to arch/arm/common

Patch from Richard Purdie

This patch moves a large chunk of the sharpsl_pm driver to
arch/arm/common so that it can be reused on other devices such as the
SL-5500 (collie). It also abstracts some functions from the core into
the machine and platform specific parts of the driver to aid reuse.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# e8b6f7f4 13-Nov-2005 Richard Purdie <rpurdie@rpsys.net>

[ARM] 3159/1: SharpSL: Add PM device driver for the SL-Cx00 machines.

Patch from Richard Purdie

Add a SharpSL PM device driver for the SL-Cxx00 machines.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>