This makes the driver erase a block when it doesn't find any
existing saved log messages which is safer than assuming the
flash was already erased.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Add a magic number to logged kernel oops messages so that they
can be more accurately detected rather than just having to rely
on the sequence number. This also allows easier detection of
saved crashes by userspace.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Make sure there is no confusion about the contexts brightness_set
can be called under by documenting it.
Signed-off-by: Richard Purdie <[email protected]>
Implement the panic_write function for the onenand driver. This waits
for any active command to complete/timeout, performs the write, waits
for it to complete and then returns.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
When the MTD provides a panic_write function, use it.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
MTDs are well suited for logging critical data and the mtdoops driver
allows kernel panics/oops to be written to flash in a blackbox flight
recorder fashion allowing better debugging and analysis of crashes.
Any kernel oops in user context can be easily handled since the kernel
continues as normal and any queued mtd writes are scheduled. Any kernel
oops in interrupt context results in a panic and the delayed writes will
not be scheduled however. The existing mtd->write function cannot be
called in interrupt context so these messages can never be written to
flash.
This patch adds a panic_write function pointer that drivers can
optionally implement which can be called in interrupt context. It is
only intended to be called when its known the kernel is about to panic
and we need to write to succeed. Since the kernel is not going to be
running for much longer, this function can break locks and delay to
ensure the write succeeds (but not sleep).
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
As discussed on LKML some notion of 'function' is needed in
LED naming. This patch adds this to the documentation and
standardises existing LED drivers.
Signed-off-by: Richard Purdie <[email protected]>
Currently, the atags used by kexec are fixed to the ones originally used
to boot the kernel. This is less than ideal as changing the commandline,
initrd and other options would be a useful feature.
This patch exports the atags used for the current kernel to userspace
through an "atags" file in procfs. The presence of the file is
controlled by its own Kconfig option and cleans up several ifdef blocks
into a separate file. The tags for the new kernel are assumed to be at
a fixed location before the kernel image itself. The location of the
tags used to boot the original kernel is unimportant and no longer
saved.
Based on a patch from Uli Luckas <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
Acked-by: Uli Luckas <[email protected]>
Signed-off-by: Russell King <[email protected]>
Various minor cleaups to mtdoops:
* Don't support the mtd->erasesize < OOPS_PAGE_SIZE case
* Tweak printks and make the device mtdoops connects to more visible
* CON_PRINTBUFFER flag is uneeded
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Add a spinlock to ensure writes to the mtdoops buffer memory are
sequential and don't race.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Writing to the flash needs to be done in a workqueue. The console
write functions may be called in any context which can lead to
lockups otherwise.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Add further error return code checks to the mtdoops driver.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
This patch adds a very simple input power event to APM user suspend
event bridge. Its currently only works for the systems using the
emulated APM driver but could easily be extended to work with anything
with a true APM BIOS too.
This covers a standard embedded system need which is to suspend when the
user presses a suspend button. It leaves options open to system
integrators to ignore (or unload) this code and implement their own more
complex event handling system.
Its hidden behind the EMBEDDED Kconfig option since its only likely to
be of use to embedded style systems. It can be built as a module so the
"hardcoded" policy can easily be removed from the kernel at runtime if
desired too.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
This patch refactors the code in corgi_lcd.c moving it to the board
specific corgi and spitz files where appropriate instead of the
existing ifdef mess which hinders readability.
Fix spitz_get_hsync_len() to call get_hsync_invperiod so pxafb can be
compiled as a module.
The confusing variables which represent the inverse horizintal sync
period are renamed to "invperiod" consistently.
An incorrect comment in corgi_ts.c is also corrected.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Suspend/resume on the pxa25x was fairly obviously broken in revision
711be5ccfe.
This patch fixes the damage by adding back the missing code.
Signed-off-by: Richard Purdie <[email protected]>
Acked-by: Eric Miao <[email protected]>
Signed-off-by: Russell King <[email protected]>
input_handle_event() used to pass EV_PWR events to event handlers
but no longer does so in 2.6.23. Modules to trigger power management
events based on input power events exist but rely on the EV_PWR events
being passed to the input event handlers.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The spitz keyboard driver reports KEY_SUSPEND events but doesn't
register its use of this event in the keybit bitfield, breaking
input events for this key. This patch fixes that by registering
the key in the keybit bitfield.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Covert leds_list_lock to a rw_sempahore to match previous LED trigger
locking fixes, fixing lock ordering.
Signed-off-by: Richard Purdie <[email protected]>
Convert part of the led trigger core from rw spinlocks to rw
semaphores. We're calling functions which can sleep from invalid
contexts otherwise. Fixes bug #9264.
Signed-off-by: Richard Purdie <[email protected]>
Convert the corgi backlight driver to a more generic version
so it can be reused by other code rather than being Zaurus/PXA
specific.
Signed-off-by: Richard Purdie <[email protected]>
Convert the backlight and LCD classes from struct class_device
to struct device since class_device is scheduled for removal.
One nasty API break is the backlight power attribute has had to be
renamed to bl_power and the LCD power attribute has had to be renamed
to lcd_power since the original names clash with the core. I can't see
a way around this.
Signed-off-by: Richard Purdie <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Convert the LEDs class from struct class_device to struct device
since class_device is scheduled for removal.
Signed-off-by: Richard Purdie <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Fix led_trigger_unregister_simple to handle the case where
led_trigger_register_simple fails, avoiding a NULL pointer
dereference.
Signed-off-by: Richard Purdie <[email protected]>
The PXA CKEN changes broken syspend/resume on the pxa27x. This patch
corrects the problem and fixes another couple of bad references.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Fix compile warnings from w100fb.c. Attribute registration failure doesn't
stop the driver working so just warn about it.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Antonino Daplas <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Fix compile warnings from sharpsl_pm.c. Attribute registration failure
doesn't stop the driver working so just warn about it.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
The last zlib_inflate update broke certain corner cases for ppp_deflate
decompression handling. This patch fixes some logic to make things work
properly again. Users other than ppp_deflate (the only Z_PACKET_FLUSH
user) should be unaffected.
Fixes bug 8405 (confirmed by Stefan)
Signed-off-by: Richard Purdie <[email protected]>
Cc: Stefan Wenk <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
The sharpsl_pm code depends on some symbols in the APM emulation code.
Add the dependency for now until a better solution can be found.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Fix locomo backlight conversion error and subsequent compile failure
from commit 599a52d126.
Signed-off-by: RIchard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Enabling the backlight by default appears to cause problems for many
users. This patch disables backlight controls unless explicitly
enabled by users via a module parameter. Since PMAC users are known
to work, default to enabled in that case.
Signed-off-by: Richard Purdie <[email protected]>
Fix a mix up when the nvidia driver was converted resulting
in the backlight having an incorrect initial brightness.
Signed-off-by: Richard Purdie <[email protected]>
Always allow backtrace when using oprofile on ARM, even if a PMU
isn't present.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Per device data such as brightness belongs to the indivdual device
and should therefore be separate from the the backlight operation
function pointers. This patch splits the two types of data and
allows simplifcation of some code.
Signed-off-by: Richard Purdie <[email protected]>
Move the setting/unsetting of pmac_backlight into the
backlight core instead of doing it in each driver.
Signed-off-by: Richard Purdie <[email protected]>
fb_info->bl_mutex is badly thought out and the backlight class doesn't
need it if the framebuffer/backlight register/unregister order is
consistent, particularly after the backlight locking fixes.
Fix the drivers to use the order:
backlight_device_register()
register_framebuffer()
unregister_framebuffer()
backlight_device_unregister()
and turn bl_mutex into a lock for the bl_curve data only.
Signed-off-by: Richard Purdie <[email protected]>
The backlight core listens for blanking events and triggers a
backlight_update_status call so these extra calls are not
needed and can be removed.
Signed-off-by: Richard Purdie <[email protected]>
Remove uneeded update_status call from chipsfb.c since the
backlight core now receives software blanking notifications
too.
Signed-off-by: Richard Purdie <[email protected]>
The backlight class wants notification whenever the console is blanked
but doesn't get this when hardware blanking fails and software blanking
is used. Changing FB_EVENT_BLANK to report both would be a behaviour
change which could confuse the console layer so add a new event for
software blanking and have the backlight class listen for both.
Signed-off-by: Richard Purdie <[email protected]>
Currently its possible to build the backlight core as a module yet
compile the drivers into the kernel which gives missing symbols.
Fix.
Signed-off-by: Richard Purdie <[email protected]>
nvidia_bl_set_power isn't needed since the backlight class handles
this by receiving fb events itself and calling update_status so
remove it.
Signed-off-by: Richard Purdie <[email protected]>
backlight_device->sem has a very specific use as documented in the
header file. The external users of this are using it for a different
reason, to serialise access to the update_status() method.
backlight users were supposed to implement their own internal
serialisation of update_status() if needed but everyone is doing
things differently and incorrectly. Therefore add a global mutex to
take care of serialisation for everyone, once and for all.
Locking for get_brightness remains optional since most users don't
need it.
Also update the lcd class in a similar way.
Signed-off-by: Richard Purdie <[email protected]>
Since people use this code as an example, clean it up to
to use platform_*_drvdata instead of a global variable.
Signed-off-by: Richard Purdie <[email protected]>
Since people use this code as an example, clean it up to
to use platform_*_drvdata and remove an unneeded function.
Signed-off-by: Richard Purdie <[email protected]>
Remove uneeded owner field from backlight_properties structure.
Nothing uses it and it is unlikely that it will ever be used. The
backlight class uses other means to ensure that nothing references
unloaded code.
Based on a patch from Dmitry Torokhov <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
Add kexec support to ARM.
Improvements like commandline handling could be made but this patch gives
basic functional support. It uses the next available syscall number, 347.
Once the syscall number is known, userspace support will be
finalised/submitted to kexec-tools, various patches already exist.
Originally based on a patch by Maxim Syrchin but updated and forward
ported by various people.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Compaq touchscreen emulation (drivers/input/tsdev.c) is old,
was obsolete when it was written by the authors own admission
and much better userspace solutions like tslib now exist.
The name is also confusing.
Signed-off-by: Richard Purdie <[email protected]>
Acked-by: James Simmons <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
This patch adds an ASoC Makefile and Kconfig for the WM8731, WM8750 and
WM9712 codecs.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
This patch allows the std Alsa AC97 codec driver to use any AsoC AC97
controller driver. Currently, only HiFi playback and Capture are
supported atm.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
This patch adds ASoC support for the WM9712 codec.
Supported features:-
o Capture/Playback/Sidetone/Bypass.
o Aux DAC.
o 8k - 48k sample rates.
o DAPM.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
This patch adds ASoC support for the WM8750 codec.
Supported features:-
o Capture/Playback/Sidetone/Bypass.
o 16 & 24 bit audio.
o 8k - 96k sample rates.
o DAPM.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
This patch adds ASoC support for the WM8731 codec.
Supported features:-
o Capture/Playback/Sidetone/Bypass.
o 16 & 24 bit audio.
o 8k - 96k sample rates.
o DAPM.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
This patch adds Dynamic Audio Power Management (DAPM) to ASoC.
Dynamic Audio Power Management (DAPM) is designed to allow portable and
handheld Linux devices to use the minimum amount of power within the
audio subsystem at all times. It is independent of other kernel PM and
as such, can easily co-exist with the other PM systems.
DAPM is also completely transparent to all user space applications as
all power switching is done within the ASoC core. No code changes or
recompiling are required for user space applications. DAPM makes power
switching decisions based upon any audio stream (capture/playback)
activity and audio mixer settings within the device.
DAPM spans the whole machine. It covers power control within the entire
audio subsystem, this includes internal codec power blocks and machine
level power systems.
There are 4 power domains within DAPM:-
1. Codec domain - VREF, VMID (core codec and audio power)
Usually controlled at codec probe/remove and suspend/resume, although
can be set at stream time if power is not needed for sidetone, etc.
2. Platform/Machine domain - physically connected inputs and outputs
Is platform/machine and user action specific, is configured by the
machine driver and responds to asynchronous events e.g when HP are
inserted
3. Path domain - audio subsystem signal paths
Automatically set when mixer and mux settings are changed by the user.
e.g. alsamixer, amixer.
4. Stream domain - DAC's and ADC's.
Enabled and disabled when stream playback/capture is started and stopped
respectively. e.g. aplay, arecord.
All DAPM power switching decisions are made automatically by consulting
an audio routing map of the whole machine. This map is specific to each
machine and consists of the interconnections between every audio
component (including internal codec components).
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
This patch adds the ASoC and DAPM headers.
Features:-
o Defines Digital Audio Interface (DAI) API
o Defines Codec, Platform and Machine API
o Defines Dynamic Audio Power Management API
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
Russell King recently reminded us that one shouldn't use
asm/arch/hardware.h but one should use asm/hardware.h
(http://lkml.org/lkml/2006/12/23/26). Unfortunately, the leds-s3c24xx
driver is using the wrong header. This patch is fixing that.
Signed-off-by: Arnaud Patard <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
Acked-by: Ben Dooks <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Fix breakage from commit 519ab5f2be which
didn't update all references to backlight_device_register causing
compile failures.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Len Brown <[email protected]>
If PG_dcache_dirty is set for a page, we need to flush the source page
before performing any copypage operation using a different virtual address.
This fixes the copypage implementations for XScale, StrongARM and ARMv6.
This patch fixes segmentation faults seen in the dynamic linker under
the usage patterns in glibc 2.4/2.5.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Fix pxafb compile failures when CONFIG_FB_PXA_PARAMETERS is enabled
after recent structure changes.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Convert LOMOMO to use struct device * for GPIOs instead of struct
locomo_dev. This enables access to the GPIOs from code which is not
a locomo device itself (such as audio). Access for gpio 31 is removed
for error handling (no such hardware exists).
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Read the return value before we release the nand device otherwise the
value can become corrupted by another user of chip->ops, ultimately
resulting in filesystem corruption.
Signed-off-by: Richard Purdie <[email protected]>
Cc: David Woodhouse <[email protected]>
Acked-by: Josh Boyer <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
spectrum_cs: Fix the logic so we error when the device is *not* present!
This fixes firmware upload failures which prevent the driver from
working (the bug is also present in 2.6.17).
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
The CNE bits are inverted on the device and writeb function is missing a
NOT operation.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Add backlight intensity control to the LOCOMO lcd/backlight driver using the
backlight class and add basic power management support.
This is a reimplementation and improvement of patches by John Lenz and Pavel
Machek
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Antonino Daplas <[email protected]>
Cc: Pavel Machek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Upgrade the zlib_inflate implementation in the kernel from a patched
version 1.1.3/4 to a patched 1.2.3.
The code in the kernel is about seven years old and I noticed that the
external zlib library's inflate performance was significantly faster (~50%)
than the code in the kernel on ARM (and faster again on x86_32).
For comparison the newer deflate code is 20% slower on ARM and 50% slower
on x86_32 but gives an approx 1% compression ratio improvement. I don't
consider this to be an improvement for kernel use so have no plans to
change the zlib_deflate code.
Various changes have been made to the zlib code in the kernel, the most
significant being the extra functions/flush option used by ppp_deflate.
This update reimplements the features PPP needs to ensure it continues to
work.
This code has been tested on ARM under both JFFS2 (with zlib compression
enabled) and ppp_deflate and on x86_32. JFFS2 sees an approx. 10% real
world file read speed improvement.
This patch also removes ZLIB_VERSION as it no longer has a correct value.
We don't need version checks anyway as the kernel's module handling will
take care of that for us. This removal is also more in keeping with the
zlib author's wishes (http://www.zlib.net/zlib_faq.html#faq24) and I've
added something to the zlib.h header to note its a modified version.
Signed-off-by: Richard Purdie <[email protected]>
Acked-by: Joern Engel <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Patch from Richard Purdie
Poodle Updates:
* Update corgi_ssp to make the GPIO chip selects optional
* Enable corgi_ssp for use by poodle
* Add corgi touchscreen platform device for poodle
* Export locomo platform device.
* Set framebuffer device parent correctly
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
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 <[email protected]>
Signed-off-by: Russell King <[email protected]>
Patch from Richard Purdie
Correct the Poodle power control for the MMC/SD port. Also
add write protection switch support.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Patch from Richard Purdie
Add functionality to allow machine specific reboot handlers on ARM.
Add machine specific reboot and poweroff handlers for all PXA Zaurus
models.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Patch from Richard Purdie
Set the default triggers for the LOCOMO LED driver.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Patch from Richard Purdie
Add a power budget variable to the PXA OHCI platform data and add a
default value for the spitz platform(s) which prevents known failures
with certain USB devices.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Remove the numbered SW_* entries from the input system and assign names
to the existing users.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Fix the error handling of some LED _store functions. This corrects them to
return -EINVAL if the value is not numeric with an optional byte of trailing
whitespace.
Signed-off-by: Richard Purdie <[email protected]>
Cc: Greg KH <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
The backlight and LCD class _store functions currently accept values like "34
some random strings" without error. This corrects them to return -EINVAL if
the value is not numeric with an optional byte of trailing whitespace.
Signed-off-by: Richard Purdie <[email protected]>
Cc: Greg KH <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Improve the NEW_LEDS Kconfig information to say what it does as well as what
it doesn't.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Patch from Richard Purdie
The AAPCS says that enums can be variably sized depending on the range
of valid values. This is not the accepted behaviour under linux so for
compatibility gcc has an aapcs-linux target, the main difference being
that enums are always of type int. Change the ARM Makefile to use this
target.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Patch from Richard Purdie
corgi_ssp_probe() should not access GPDR directly but should use
pxa_gpio_mode() which has appropriate locking and other safeguards.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Patch from Richard Purdie
Move platform_scoop_config from the SharpSL scoop PCMCIA driver to
the SCOOP driver. This avoids build failures when PCMCIA is not built
or is modular (scoop.c itself cannot be modular).
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Patch from Richard Purdie
Force the Sharp Zaurus Poodle memory size to 32MB.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Russell King <[email protected]>
Fixes for the pxafb driver:
* Return -EINVAL for resolutions that are too large as per framebuffer
driver policy.
* Increase the error timeout for disabling the LCD controller. The current
timeout is sometimes too short on the Sharp Zaurus Cxx00 hardware and an
extra delay in an error path shouldn't pose any problems.
* Fix a dev reference which causes a compile error when DEBUG is defined.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Antonino Daplas <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Generalise the Corgi backlight driver by moving the default intensity and
limit mask settings into the platform specific data structure. This enables
the driver to support other Zaurus hardware, specifically the SL-6000x (Tosa)
model.
Also change the spinlock to a mutex (the spinlock is overkill).
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Antonino Daplas <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Updates to the HP Jornada 680 Backlight driver:
- Correct the suspend/resume functions so the driver compiles
(SUSPEND_POWER_DOWN/RESUME_POWER_ON no longer exist).
- Convert the driver to match the recent platform device changes.
- Replace the unsafe static struct platform_device with dynamic allocation.
- Convert the driver to the new backlight code.
This has not been tested on a device due to lack of hardware but wouldn't
compile beforehand.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Antonino Daplas <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Backlight class attributes are currently easy to implement incorrectly.
Moving certain handling into the backlight core prevents this whilst at the
same time makes the drivers simpler and consistent. The following changes are
included:
The brightness attribute only sets and reads the brightness variable in the
backlight_properties structure.
The power attribute only sets and reads the power variable in the
backlight_properties structure.
Any framebuffer blanking events change a variable fb_blank in the
backlight_properties structure.
The backlight driver has only two functions to implement. One function is
called when any of the above properties change (to update the backlight
brightness), the second is called to return the current backlight brightness
value. A new attribute "actual_brightness" is added to return this brightness
as determined by the driver having combined all the above factors (and any
driver/device specific factors).
Additionally, the backlight core takes care of checking the maximum brightness
is not exceeded and of turning off the backlight before device removal.
The corgi backlight driver is updated to reflect these changes.
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Antonino Daplas <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Adds an LED driver for LEDs exported by the Sharp LOCOMO chip as found on some
models of Sharp Zaurus.
Signed-off-by: Richard Purdie <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Adds LED drivers for LEDs found on the Sharp Zaurus c7x0 (corgi, shepherd,
husky) and cxx00 (akita, spitz, borzoi) models.
Signed-off-by: Richard Purdie <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>