summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/spitz_pm.c
Commit message (Collapse)AuthorAgeFilesLines
* ARM: pxa: spitz: Open code gpio_request_array()Andy Shevchenko2024-04-031-10/+12
| | | | | | | | | In order to prerare for removal of gpio_request_array(), open code the latter. Note, we are not using gpio_request_one() as it's also deprecated, hence reducing legacy API usage to the very basic ones. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
* backlight: corgi_lcd: fix missing prototypeArnd Bergmann2023-07-271-0/+1
| | | | | | | | | | | | | | 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>
* ARM: pxa: fix missing-prototypes warningsArnd Bergmann2023-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ARM: pxa: spitz: use gpio descriptors for audioArnd Bergmann2022-05-071-1/+1
| | | | | | | | | | 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>
* ARM: pxa: split up mach/hardware.hArnd Bergmann2022-04-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner2019-06-191-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ARM: pxa: fix GPIO double shiftsRobert Jarzmik2016-09-091-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ARM: pxa: make more mach/*.h files localArnd Bergmann2015-12-011-2/+2
| | | | | | | | 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>
* ARM: drivers: remove __dev* attributes.Greg Kroah-Hartman2013-01-031-1/+1
| | | | | | | | | | | | | | | 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>
* ARM: pxa/spitz_pm: Fix hang when resuming from STRMarko Katic2012-10-281-6/+2
| | | | | | | | | | | | | | | | 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>
* ARM: pxa: fix wrong parsing gpio event on spitzHaojian Zhuang2012-02-161-3/+2
| | | | | | | | | | | | (~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>
* ARM: pxa: fix build error for GPIO_bit()Haojian Zhuang2011-12-081-0/+1
| | | | | | | | | | | | 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>
* ARM: pxa: use generic gpio operation instead of gpio registerHaojian Zhuang2011-11-141-2/+8
| | | | | | | Remove the code of accessing gpio register. Use the generic read operation instead. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
* gpio: include linux/gpio.h where neededRandy Dunlap2011-06-161-0/+1
| | | | | | | | | 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>
* [ARM] pxa: removed mostly unused and confusing two sharpsl.hEric Miao2010-08-051-2/+1
| | | | | | Only a small part of used code is moved into sharpsl_pm.h. Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
* [ARM] pxa: use generic gpio_get_value() instead of READ_GPIO_BIT()Eric Miao2010-08-051-3/+3
| | | | | | | 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>
* [ARM] pxa: removing dead BACKLIGHT_CORGIChristoph Egger2010-08-051-2/+0
| | | | | | | | | 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>
* [ARM] pxa/spitz: use generic GPIO API and remove pxa_gpio_mode()Eric Miao2010-05-111-7/+21
| | | | | | | | 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>
* [ARM] pxa/zaurus: rename spitz_battery_levels_* to sharpsl_*Pavel Machek2009-12-011-2/+2
| | | | | | | | 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>
* [ARM] pxa/zaurus: cleanup sharpsl_pm.cPavel Machek2009-12-011-5/+5
| | | | | | | | 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>
* [ARM] pxa/sharpsl_pm: merge pxa-specific code into generic oneDmitry Eremin-Solenikov2009-06-111-2/+1
| | | | | | | | 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>
* [ARM] pxa: separate definitions from pxa-regs.h and remove it finallyEric Miao2009-03-091-1/+0
| | | | | | | | | | | | | | | | | | | 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>
* [ARM] corgi_lcd: fix simultaneous compilation with corgi_blDmitry Baryshkov2008-10-291-1/+3
| | | | | | | | 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>
* [ARM] pxa/spitz: use generic GPIO API for SCOOP1/SCOOP2 GPIOsEric Miao2008-09-231-19/+9
| | | | | | | | | 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>
* [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machRussell King2008-08-071-6/+6
| | | | | | This just leaves include/asm-arm/plat-* to deal with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Remove asm/hardware.h, use asm/arch/hardware.h insteadRussell King2008-08-071-1/+1
| | | | | | | | | 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>
* [ARM] 5073/1: spitz_pm: don't register devices on non-spitz machinesDmitry Baryshkov2008-06-021-0/+5
| | | | | | 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>
* [ARM] pxa: corgibl_limit_intensity build errorsRussell King2008-05-191-0/+2
| | | | | | | | | | | | 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>
* [ARM] pxa: Fix RCSR handlingRussell King2008-05-081-3/+0
| | | | | | | | | | | | | | 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>
* [ARM] pxa: separate GPIOs and their mode definitions to pxa2xx-gpio.heric miao2008-04-191-0/+1
| | | | | | | | | | | | | 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>
* [ARM] Yet more asm/apm-emulation.h stuffRussell King2007-03-021-1/+2
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [APM] ARM: Convert to use shared APM emulation.Ralf Baechle2007-02-091-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [ARM] 3564/1: sharpsl_pm: Abstract some machine specific parametersRichard Purdie2006-06-191-0/+15
| | | | | | | | | | | 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>
* [ARM] 3235/1: SharpSL PM: Fix a gcc4 build errorRichard Purdie2006-01-071-1/+0
| | | | | | | | | | 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>
* [ARM] 3228/1: SharpSL: Move PM code to arch/arm/commonRichard Purdie2006-01-051-21/+26
| | | | | | | | | | | | 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>
* [ARM] 3159/1: SharpSL: Add PM device driver for the SL-Cx00 machines.Richard Purdie2005-11-131-0/+233
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>